5b-futureInternet

Shared by: msaleem
Tags
-
Stats
views:
85
posted:
11/9/2007
language:
English
pages:
0
Document Sample
scope of work template
							TDC 562:Computer Network Design & Analysis (Internet Engineering)
Lecture # 5-b: Routers Behavior
( Packet Scheduling, Discarding & QoS)

Dr. Ehab S. Al-Shaer
School of Computer Science & Telecommunications DePaul University Chicago, IL

1

What is inside a router?
Input Port Output Port
Pkt Sched & Buffer Mgmt

Switch Fabric

Pkt Sched & Buffer Mgmt

Input Port Routing Processor

Output Port

2 Dr. Ehab Al-Shaer/Network Design & Analysis

1

What is insider a router?
Input Ports Functionality
• • • • • • • • Physical layer/connection Data Link (decapsulation) lookup and forward to output ports if packets are control (e.g., RIP, IGMP ..), they are forwarded to routing processor Store and Forward Data Link (encapsulation) and Physical layer Packet Scheduling (packet forward policy) Buffer management (packet discarding policy)
3 Dr. Ehab Al-Shaer/Network Design & Analysis

Output Ports Functionality

What is inside a router?
Switching Fabric
• connects Ips with Ops • Types
– memory based (e.g., Cisco 8500) – shared bus -- 1 Gbps (Cisco 1900 and CoreBuilder) – Interconnection - 60 Gbps (Cisco 12000)

Routing Processor
• performs routing protocol • maintain the routing table and lookup (sometimes lookup is done in separate processor in input port) • network management
Dr. Ehab Al-Shaer/Network Design & Analysis

4

2

Where does queuing occur?
Queuing and packet loss IF (Speed(Ip) = Speed (Op) AND Speed (SW Fabric) = #Ip x Speed(Ip) ) then, Queuing occurs in the Output Ports Packet Scheduling is needed in the Ops
• which packet to forward next?

Buffer Management or Discarding Policy
• which packet to drop when buffer overflow
5 Dr. Ehab Al-Shaer/Network Design & Analysis

Packet Scheduling Techniques
FIFO
• first received first forwarded • simple and mostly used in the Internet today • no QoS -- examples

Priority Queuing
• divide packets into classes • transmits higher priority packet first • uses TOS field of IP
6

classifier

Dr. Ehab Al-Shaer/Network Design & Analysis

3

Packet Scheduling Techniques
Round Robin Weighted Fair Queuing (WFQ)
• round robin is used in stead of strict priority • if one queue is empty, the next queue is served • Generalized WFQ is different because each queue could take a different service interval • queue i will have wi/Σwj ;this means if R is the bandwidth, then R* wi/Σwj is guaranteed for queuei

classifier

7

Dr. Ehab Al-Shaer/Network Design & Analysis

Packet Discarding Techniques
Naive drop policy leads to unfairness
• E.g., FCFS drop incoming pkts from tail, but misbehaved sources may abuse the network

Packet-drop policies classification based on
• • • • • • • • degree of aggregation drop priorities early drop drop position flows aggregation vs. per-connection state per-connection requires state but more protective less aggregation, more protection E.g., drop a pkt from the longest queue (WFQ)
8 Dr. Ehab Al-Shaer/Network Design & Analysis

Degree of Aggregation

4

Packet Discarding Techniques
Drop Priorities
• pkts are marked with P by the source and if congested, drop with minimal P • Examples
– audio and video hierarchical encoding – cell lost, then drop the entire frame (related cells) – dorp pkts from nearby rather than long lived ones

Drop Position
• • • • Tail Head Random position drop entire queue
9

Early or Overloaded Drop
• Do you really need to wait till congestion? Can’t you somehow proactive?
Dr. Ehab Al-Shaer/Network Design & Analysis

Drawbacks of FIFO with Drop Tail
Buffer lock out by misbehaving flows Global Synchronizing effect for multiple TCP flows
• Senders go to slow start and they increases their cnwd simultaneously => causing harm:
– Less throughput/network utilization – Undesirable queue size fluctuating => high delay and jitter

Burst or multiple consecutive packet drops
• bad for TCP fast recovery
10 Dr. Ehab Al-Shaer/Network Design & Analysis

5

FIFO Router with Two TCP Sessions

unutilized bandwidth

11 Dr. Ehab Al-Shaer/Network Design & Analysis

Random Early Detection (RED) Routers
Random Early Detection (RED) [Floyed & Fall 93]
• based in exponential average of queue length (why average?) • Probabilistically discard: packet drop probability is linear with average queue length • The exponential waited average (EWA) s for the queue is calculate after each packet n received (where sn-1 is the EWA of the queue after packet n-1 and qn is the instantaneous queue length)

sn = (1-w) sn-1 + w * qn
• • • • The queue has to threshold Tmin and Tmax sn < Tmin => packet is accepted sn > Tmax => packet is discarded Tmin < sn < Tmax => the packet is dropped with probability:

pn = p max

( sn − T min) (T max − T min) Dr. Ehab Al-Shaer/Network Design & Analysis

12

6

Early Packet Discard Techniques
Random Early Detection (RED) [Floyed & Jacobson 93]
• based in exponential avg. of queue length • packet drop probability is linear with queue length • The exponential waited average (EWA) s for the queue is calculate after each packet n received (where sn-1 is the EWA of the queue after packet n-1 and qn is the instantaneous queue length)

sn = (1-w) sn-1 + w * qn
• • • • The queue has to threshold Tmin and Tmax Sn < Tmin => packet is accepted Sn > Tmax => packet is discarded Tmin < Sn < Tmax the packet is dropped with probability:

pn = p max

( sn − T min) (T max − T min)

13

Dr. Ehab Al-Shaer/Network Design & Analysis

RED: the big picture
 0 sn < T min  (sn − T min)  Pd =  p max T min ≤ sn < T max (T max− T min)   1 T max ≤ sn 

P
1

Pmax Tmin Tmax K
14

Dr. Ehab Al-Shaer/Network Design & Analysis

7

RED Advantages
Avoids global synchronization affect Signal end systems earlier: better network utilization (avoid more re-transmission and drop in the network) Minimize delay jitter by controlling the average queue size Absorb burst better
• supporting burst traffic without bias because burst traffic will have less average queue than bulk and therefore get less drops

Supporting drop tail if the sources are noncooperated
15 Dr. Ehab Al-Shaer/Network Design & Analysis

RED Router with Two TCP Sessions

16 Dr. Ehab Al-Shaer/Network Design & Analysis

8

RIO: RED In and Out
First paper that influenced DiffServ [Clark 1998]
• Separate flows into two classes: IN and OUT service profile • router maintains two different statistics for each service profiles.
– Different parameters and average queue lengths – Avgs: for IN packet: avgIN, for OUT profile: avgTOTAL

• When congested, apply different control to each classes

p

1

Pmax_OUT Pmax_IN
Tmin_OUT Tmax_OUT = Tmin_IN Tmax_IN

avg
17

Dr. Ehab Al-Shaer/Network Design & Analysis

Future of Internet
Problems with current Internet Goals:
• QoS assurances (min bandwidth and max/avg delay) • fair sharing of network resources

QoS Architectures
• Integrated Services: based on reserve and protect using RSVP • Differentiated Services: based on mark, classify, forward

Long term solution is mix of both IntServ, DiffServ and others like MPLS
Dr. Ehab Al-Shaer/Network Design & Analysis

18

9

Elements of QoS-based Networks
Traffic shaping
Source-initiated Resource Reservation

Network
Scheduling

Policing Admission control
Receiver-initiated Resource Reservation

19 Dr. Ehab Al-Shaer/Network Design & Analysis

Integrated Services (RSVP)
• install and maintain per-flow state + perflow classification + Per-flow scheduling RESV
PATH PATH

Sender

Receiver

20 Dr. Ehab Al-Shaer/Network Design & Analysis

10

Differentiated Services-Marking
DS-capable Edge Routers function:
• Marking is done at DS-capable host or closest router • Packet classification: pkts are classified based on the headers (e.g., IP src, dest, proto type)to the appropriate marking function (How pkt are classified is unspecified yet! Could be manual by sysadmin.)

forward
• Subsequent routers use this marking to provide the associated services (scheduling, forwarding, dropping)
21 Dr. Ehab Al-Shaer/Network Design & Analysis

Differentiated Services-Policing
DS-capable Edge Routers function:
• This offers all pkts that have the same headers the same service type regardless of the trans rate! • Solution: using metering function to decide to mark, drop, delay or forward based on the user traffic profile

forward drop
22 Dr. Ehab Al-Shaer/Network Design & Analysis

11

Improving the Performance of Interactive Application
Interactive applications are sensitive to delay/latency more than others (e.g., telnet, games, www, ..) Interactive applications have different level of interactivity (e.g., telnet and Web) TCP “SendWin” parameter can indicate the level of interactivity of an application SendWin = min(CongWin, ReceiverWin) • the smaller SendWin the more interactivity Using AF DiffServ and RED [Nouriddine and Tobagi, Infocom’2002]:
• Use three drop priority by computing three avg queue sizes, one for each priority: HIGHq, MEDq and LOWq • EWAM = 0.5 and maxp = 0.1 for three levels • Three thresholds for send window are used: HIGHthresh < Medthresh < Lowthresh
23 Dr. Ehab Al-Shaer/Network Design & Analysis

Premium Bandwidth Delivery
Premium Customers

Broadband Pipe ISP1

Customer

Premium bandwidth allocation enforced by WRED or WFQ
Standard Customers

Premium charging via NetFlow Bi-directional premium traffic via BGP policy propagation Standard traffic bursts to fill capacity
Dr. Ehab Al-Shaer/Network Design & Analysis

ISP2
24

12

ISP Web Hosting
Premium Traffic Standard Traffic Medium Traffic

Multiple classes of hosting customers Rate limit or allocate bandwidth to each server Classify traffic from/to each server Measure and bill with NetFlow and CAR MIB

ISP Network

25

Dr. Ehab Al-Shaer/Network Design & Analysis

DiffServ Example in NS: 1. creating physical topology
# Topology layout # # ftps ----- ftpc # \ / # \ / # e1 ----- r0 ----- e2 # / \ # / \ # cbrs ----- cbrc # set ns [new Simulator] set trc [open "ds.tr" w] $ns trace-all $trc # Create nodes set r0 [$ns node] set e1 [$ns node] set e2 [$ns node] set ftpc [$ns node] set ftps [$ns node] set cbrc [$ns node] Dr. Ehab Al-Shaer/Network Design & Analysis set cbrs [$ns node]

26

13

DiffServ Example in NS: 2. Create links/queues
# Create links: must create two direction to define different PHB #to do marking, we configure the traffic classification from e1-to-r0-to-e2 $ns simplex-link $e1 $r0 1Mb 25ms dsRED/edge $ns simplex-link $r0 $e2 1Mb 25ms dsRED/core # no need for classifications for the other direction $ns simplex-link $r0 $e1 1Mb 25ms DropTail $ns simplex-link $e2 $r0 1Mb 25ms DropTail # crearting the edge links - full duplex $ns duplex-link $ftps $e1 10Mb 2ms DropTail $ns duplex-link $cbrs $e1 10Mb 2ms DropTail $ns duplex-link $ftpc $e2 10Mb 2ms DropTail $ns duplex-link $cbrc $e2 10Mb 2ms DropTail # Configure DiffServ policy/Queues set qE1toR [[$ns link $e1 $r0] queue] set qRtoE2 [[$ns link $r0 $e2] queue]
27 Dr. Ehab Al-Shaer/Network Design & Analysis

DiffServ Example in NS: 3. Configuring the Queues
# From edge router e1 to core router r # you need to have at least two queues bec Q0 will be used for best effort. # you can have more queues for more service differentiation $qE1toR set numQueues_ 2 # number of classes per queue 2-color-RED: Gold, Silver (non best-effortQ, Q0) $qE1toR setNumPrec 2 # specify queue scheduler, WRR=Weighted Round Robin $qE1toR setSchedularMode WRR # specify scheduling weights for queues: 33% best effort, 66% differentiated $qE1toR addQueueWeights 0 1 $qE1toR addQueueWeights 1 2 # sepcify average packet size for proper RED operation $qE1toR set meanPktSize 1000
28 Dr. Ehab Al-Shaer/Network Design & Analysis

14

DiffServ Example in NS: 4. Configuring classes
# CONFIGURING CLASSES # define DS classes # <Queue> addPHBEntry <Code> <QID> <Precedence> $qE1toR addPHBEntry 00 0 0 # CP 0 maps to queue 0, prec 0 = Best effort $qE1toR addPHBEntry 10 1 0 # CP 10 maps to queue 1, prec 0 = Gold $qE1toR addPHBEntry 11 1 1 # CP 11 maps to queue 1, prec 1 = Silver # define policer behavior #Qname addPolicerEntry <Marker_Type> <Initial_CP> <Downgraded_CP> $qE1toR addPolicerEntry TSW2CM 00 00 # BEST EFFORT $qE1toR addPolicerEntry TSW2CM 10 11 # GOLD $qE1toR addPolicerEntry TSW2CM 11 00 # SILVER # define RED parameters #<Queue> configQ <Q_num> <PrecNum> <min> <max> <drop_prob> $qE1toR configQ 0 0 10 10 1.00 $qE1toR configQ 1 0 20 40 0.01 $qE1toR configQ 1 1 10 20 0.20
Dr. Ehab Al-Shaer/Network Design & Analysis

29

DiffServ Example in NS: 5. Policy creation
# Traffic classification (assign session to classes): map session to policer # <Queue> addPolicyEntry <source> <destin> <Marker_type> <CP> <CIR> # # Add policy for each FTP client-server to PHB $qE1toR addPolicyEntry [$ftps id] [$ftpc id] TSW2CM 10 1000000 # Add policy for each CBR client-server to PHB $qE1toR addPolicyEntry [$cbrs id] [$cbrc id] TSW2CM 11 1000000 # print edge router configuration $qE1toR printPolicyTable $qE1toR printPolicerTable # From core router r to edge router e2: same as before $qRtoE2 set numQueues_ 2 $qRtoE2 addPHBEntry 00 0 0 $qRtoE2 setNumPrec 2 $qRtoE2 addPHBEntry 10 1 0 $qRtoE2 setSchedularMode WRR $qRtoE2 addPHBEntry 11 1 1 $qRtoE2 addQueueWeights 0 1 $qRtoE2 configQ 0 0 10 10 1.00 $qRtoE2 addQueueWeights 1 2 $qRtoE2 configQ 1 0 20 40 0.01 $qRtoE2 set meanPktSize 1000 $qRtoE2 configQ 1 1 10 20 0.20
Dr. Ehab Al-Shaer/Network Design & Analysis

30

15

DiffServ Example in NS: 6. Creating Traffic
# Create FTP traffic puts "Creating ftp traffic sources..." set tcpsrc($ftps) [new Agent/TCP] $ns attach-agent $ftps $tcpsrc($ftps) set tcpsnk($ftpc) [new Agent/TCPSink] $ns attach-agent $ftpc $tcpsnk($ftpc) $ns connect $tcpsrc($ftps) $tcpsnk($ftpc) set ftpapp [new Application/FTP] $ftpapp attach-agent $tcpsrc($ftps) # Create CBR traffic puts "Creating cbr traffic sources..." set udpsrc($cbrs) [new Agent/UDP] $ns attach-agent $cbrs $udpsrc($cbrs) set udpsnk($cbrc) [new Agent/Null] $ns attach-agent $cbrc $udpsnk($cbrc) $ns connect $udpsrc($cbrs) $udpsnk($cbrc) set cbrapp [new Application/Traffic/CBR] $cbrapp attach-agent $udpsrc($cbrs) $cbrapp set packetSize_ 1000 Dr. Ehab Al-Shaer/Network Design & Analysis $cbrapp set rate_ 1M

31

DiffServ Example in NS: 7. Running the simulation
puts "\nSetting start/stop time of ftp and cbr streams..." $ns at 01 "$ftpapp start" $ns at 15 "$cbrapp start" $ns at 35 "$cbrapp stop" $ns at 50 "$ftpapp stop" proc finish {} { global ns num_pairs log puts "\tSimulation completed." $ns flush-trace exit 0 } $ns at 50 "finish" puts "\nRunning simulation..." $ns run
32 Dr. Ehab Al-Shaer/Network Design & Analysis

16


						
Related docs