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) (decapsulation) lookup and forward to output ports if packets are control (e.g., RIP, IGMP ..), they are forwarded to routing processor
? Output
Ports Functionality
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
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 ) 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(Ip) Speed (SW Fabric) = # Ip x Speed( Ip) ) 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 queue i 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
?
PacketPacket-drop policies classification based on
• • • • degree of aggregation drop priorities early drop drop position flows aggregation vs. per- connection state perperper- 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
Early Packet Discard Techniques
?
Random Early Detection (RED) [Floyed & Jacobson 93]
• based in exponential avg. of queue length • pkt 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 snafter packet n - 1 and qn is the instantaneous queue length) n-
sn = (1-w) sn-1 + w * qn
• • • • The queue has to threshold Tmin and Tmax Sn < T min => pkt is accepted Sn > T max => pkt is discarded Tmin Sn Tmax the pakcet is dropped with probability:
pn ? p max
( sn ? T min ) (T max ? T min )
10
Dr. Ehab Al-Shaer/Network Design & Analysis
5
Future of Internet
? Problems ? Goals:
with current Internet
• 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, IntServ, DiffServ and others like MPLS
Dr. Ehab Al-Shaer/Network Design & Analysis
11
Elements of QoS-based Networks
Traffic shaping
Source-initiated Resource Reservation
Network
Scheduling
Policing Admission control
Receiver-initiated Resource Reservation
12 Dr. Ehab Al-Shaer/Network Design & Analysis
6
Integrated Services (RSVP)
• install and maintain per-flow state + perperperflow classification + Per-flow scheduling RESV
PATH PATH
Sender
Receiver
13 Dr. Ehab Al-Shaer/Network Design & Analysis
Differentiated Services -Marking
?
DSDS-capable Edge Routers function:
• Marking an also be done at DS - capable host or closest DSrouter • 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.) sysadmin.)
forward
• Subsequent routers use this marking to provide the associated services (scheduling, forwarding, dropping)
14 Dr. Ehab Al-Shaer/Network Design & Analysis
7
Differentiated Services -Policing
?
DSDS-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
15 Dr. Ehab Al-Shaer/Network Design & Analysis
8