11
Role and Mechanism of Queue Internet Engineering

Role and Mechanism of Queue Internet Engineering

Embed Size (px)

Citation preview

Page 1: Role and Mechanism of Queue Internet Engineering

Role and Mechanism of Queue

Internet Engineering

Page 2: Role and Mechanism of Queue Internet Engineering

Internet Engineering

2

What is Queue ( buffer )

Packet exchange = Store – and – forward

– Router temporary stores packet in buffer Packet is queued and then stored ( In Drop Tail ) earlier income packet will transmit

soon, what comes in first is handled

– If the queue overflows, packets will be dropped

Router

Queue( buffer )

Page 3: Role and Mechanism of Queue Internet Engineering

Internet Engineering

3

Relationship between Node, Queue, Link

PacketQueue(Buffer) Link Node

Node 0Node 2 Node 3 Node 4

In NS2, each link has a queue Packets go through queue before sent out to the link If input rate is larger than output rate, overflow packets

will be accumulated in queue– It can response to temporary traffic increase– Packet are dropped if queue length exceeds its capacity

Bandwidth

Page 4: Role and Mechanism of Queue Internet Engineering

Internet Engineering

4

Packet flow

Observe the packet ( ID=62 ) ( % awk ‘$12==62’ out.tr )※experiment 1 - 1 -(b): bandwidth 4Mbps

Node 0 Node 2 Node 3 Node 4

+ 0.062 0 2 cbr 1000 ------- 0 0.0 4.0 62 62- 0.062 0 2 cbr 1000 ------- 0 0.0 4.0 62 62r 0.0682 0 2 cbr 1000 ------- 0 0.0 4.0 62 62+ 0.0682 2 3 cbr 1000 ------- 0 0.0 4.0 62 62- 0.1302 2 3 cbr 1000 ------- 0 0.0 4.0 62 62r 0.1522 2 3 cbr 1000 ------- 0 0.0 4.0 62 62+ 0.1522 3 4 cbr 1000 ------- 0 0.0 4.0 62 62- 0.1522 3 4 cbr 1000 ------- 0 0.0 4.0 62 62r 0.1584 3 4 cbr 1000 ------- 0 0.0 4.0 62 62

40Mbps6ms

40Mbps6ms

4Mbps20ms

84ms62ms22ms

Why?

Page 5: Role and Mechanism of Queue Internet Engineering

Internet Engineering

5

Time for forwarding packet

Node 0 Node 2 Node 3 Node 440Mbps

6ms40Mbps

6ms4Mbps20ms

Queuing time in queue

+Forwarding time

+Time for transmission

between links

→ (Queue length)×(Time for sending packet out) ※Queue length : the number of packet kept in queue, 31 in this ex

→ (Packet size [bytes])÷(Bandwidth of Link [Mbps])       1000[bytes] 4[Mbps]

→ ( Link delay )

Time for sending packet from node 2 to node 3

62ms

2ms

20msTotal 84ms

Page 6: Role and Mechanism of Queue Internet Engineering

Internet Engineering

6

Packet flow ( Dropped packet )

Observe packet ( ID=63 ) by  ( % awk ‘$12==63’ out.tr )※In experiment 1 - 1 -(b), bandwidth is 4Mbps

Node 0 Node 2 Node 3 Node 4

+ 0.063 0 2 cbr 1000 ------- 0 0.0 4.0 63 63- 0.063 0 2 cbr 1000 ------- 0 0.0 4.0 63 63r 0.0692 0 2 cbr 1000 ------- 0 0.0 4.0 63 63+ 0.0692 2 3 cbr 1000 ------- 0 0.0 4.0 63 63d 0.0692 2 3 cbr 1000 ------- 0 0.0 4.0 63 63

40Mbps6ms

40Mbps6ms

4Mbps20ms

Drop

Dropped after join a queue

Page 7: Role and Mechanism of Queue Internet Engineering

Internet Engineering

7

Experiment 2

Consider following relationship– Sending traffic rate – Bandwidth of bottleneck link – Queue length– Number of bytes discarded from queue

0

1

4

5

2 3

CBR/UDP

Bandwidth: Bw(Bottleneck link)

40Mbps40Mbps Queue Size: B

Page 8: Role and Mechanism of Queue Internet Engineering

Internet Engineering

8

【 Supplement 】 Execution of Experiment 2

% ns problem2.tcl 1.0Mb 32

– out.tr out.nam out.queue out.udp are created

% gnuplotgnuplot> l “problem2.gp”gnuplot> …gnuplot> set term post colorgnuplot> set output “graph.ps”gnuplot> repgnuplot> q

If you don’t like the format, you can modify kadai1-2.gp

(Bw) (B)

Page 9: Role and Mechanism of Queue Internet Engineering

Internet Engineering

9

【 Supplement 】 out.queue content

out.queue (Trace file of queue)– $1 : time– $2, $3 : position of queue ( link )– $4 : accumulated data in queue (queue length) [bytes]– $5 : accumulated packet number in queue [packets]– $6 : number of packets arrived to queue [packets]– $7 : number of packets sent out from queue [packets]– $8 : number of packets dropped by queue [packets]– $9 : amount of data arrived to queue [bytes]– $10 : amount of data send out from queue [bytes]– $11 : amount of data dropped by queue [bytes]

※ $5 ~ $11 is cumulative value from start of simulation

Page 10: Role and Mechanism of Queue Internet Engineering

Internet Engineering

10

【 Supplement 】 out.udp content

out.udp (Trace file of UDP)– $1 : time– $2 : send traffic rate [Mbps]– $3 : bandwidth of bottleneck link [Mbps]

Page 11: Role and Mechanism of Queue Internet Engineering

Internet Engineering

11

Example of graph ( attention point )

※In experiment 2 when Bw is 1.0Mbps and B is 32kbytes

31