eecs 122: introduction to computer networks switch and ...ee122/fa05/notes/08...note: packets are...
TRANSCRIPT
![Page 1: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/1.jpg)
1
EE122 F05
EECS 122:Introduction to Computer Networks
Switch and Router Architectures
Computer Science DivisionDepartment of Electrical Engineering and Computer Sciences
University of California, BerkeleyBerkeley, CA 94720-1776
2EE122 F05
Today’s Lecture
Network (IP)
Application
Transport
Link
Physical
Today!
![Page 2: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/2.jpg)
2
3EE122 F05
IP Routers
6
7
8
5
4
31
2
12
10
13
11
Router
� Router consists of- Set of input interfaces where
packets arrive- Set of output interfaces from
which packets depart- Some form of interconnect
connecting inputs to outputs� Router implements
- (1) Forward packet to corresponding output interface
- (2) Manage bandwidth and buffer space resources
4EE122 F05
Generic Architecture
� Input and output interfaces are connected through an interconnect
� Interconnect can be implemented by
- Shared memory • Low capacity routers
(e.g., PC-based routers)- Shared bus
• Medium capacity routers
- Point-to-point (switched) bus • High capacity routers
input interface output interface
Inter-connect
![Page 3: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/3.jpg)
3
5EE122 F05
Shared Memory (1 st Generation)
RouteTableCPU Buffer
Memory
LineInterface
MAC
LineInterface
MAC
LineInterface
MAC
Typically < 0.5Gbps aggregate capacityLimited by rate of shared memory
Shared Backplane
Line Interface
CPU
Memory
(* Slide by Nick McKeown)
6EE122 F05
Shared Bus (2 nd Generation)
RouteTableCPU
LineCard
BufferMemory
LineCard
MAC
BufferMemory
LineCard
MAC
BufferMemory
FwdingCache
FwdingCache
FwdingCache
MAC
BufferMemory
Typically < 5Gb/s aggregate capacity; Limited by shared bus
(* Slide by Nick McKeown)
![Page 4: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/4.jpg)
4
7EE122 F05
Point-to-Point Switch (3 rd Generation)
LineCard
MAC
LocalBuffer
Memory
CPUCard
LineCard
MAC
LocalBuffer
Memory
Switched Backplane
Line Interface
CPUMemory Fwding
Table
RoutingTable
FwdingTable
Typically ~ 100Gbps aggregate capacity (*Slide by Nick McKeown)
8EE122 F05
What a Router Looks Like
� � � � � � � � � � � � � � � � � � � � �
6ft
19�
2ft
Capacity: 160Gb/sPower: 4.2kW
3ft
2.5ft
19�
Capacity: 80Gb/sPower: 2.6kW
Slide by Nick McKeown
![Page 5: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/5.jpg)
5
9EE122 F05
Interconnect
� Point-to-point switch allows simultaneous transfer of packet between any two disjoint pairs of input-output interfaces
� Goal: come-up with a schedule that- Provides Quality of Service- Maximizes router throughput
� Challenges:- Address head-of-line blocking at inputs- Resolve input/output speedups contention- Avoid packet dropping at output if possible
� Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs
10EE122 F05
Output Queued Routers
� Only output interfaces store packets
� Advantages- Easy to design algorithms:
only one congestion point� Disadvantages
- Requires an output speedup (Ro/C) of N, where N is the number of interfaces � not feasible
input interface output interface
Backplane
CRO
![Page 6: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/6.jpg)
6
11EE122 F05
Input Queued Routers� Only input interfaces store packets� Advantages
- Easy to build • Store packets at inputs if
contention at outputs - Relatively easy to design algorithms
• Only one congestion point, but not output…
• Need to implement backpressure� Disadvantages
- Hard to achieve utilization � 1 (due to output contention, head-of-line blocking)
• However, theoretical and simulation results show that for realistic traffic an input/output speedup (RI/C) of 2 is enough to achieve utilizations close to 1
input interface output interface
Backplane
C R
12EE122 F05
Head-of-line Blocking
� Cell at head of an input queue cannot be transferred, thus blocking the following cells
Cannot betransferred because output buffer overflow
Cannot be transferred because is blocked by red cell
Output 1
Output 2
Output 3
Input 1
Input 2
Input 3
![Page 7: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/7.jpg)
7
13EE122 F05
0% 20% 40% 60% 80% 100%Load
Del
ay
A Router with Input QueuesHead of Line Blocking
The best that any queueingsystem can
achieve.
2 2 58%− ≈Slide by Nick McKeown
14EE122 F05
Solution to Avoid Head-of-line Blocking
� Maintain at each input N virtual queues, i.e., one per output port
Output 1
Output 2
Output 3
Input 1
Input 2
Input 3
![Page 8: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/8.jpg)
8
15EE122 F05
Combined Input-Output Queued (CIOQ) Routers
� Both input and output interfaces store packets
� Advantages- Easy to built
• Utilization 1 can be achieved with limited input/output speedup (<= 2)
� Disadvantages- Harder to design algorithms
• Two congestion points• Need to design flow control
input interface output interface
Backplane
16EE122 F05
Input Interface
� Packet forwarding: decide to which output interface to forward each packet based on the information in packet header
- Examine packet header- Lookup in forwarding table- Update packet header
input interface output interface
Inter-connect
![Page 9: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/9.jpg)
9
17EE122 F05
Lookup
� Identify the output interface to forward an incoming packet based on packet’s destination address
� Routing tables summarize information by maintaining a mapping between IP address prefixes and output interfaces
- How are routing tables computed?� Route lookup
�find the longest prefix in the table
that matches the packet destination address
18EE122 F05
IP Routing� Packet with destination address 12.82.100.101 is
sent to interface 2, as 12.82.100.xxx is the longest prefix matching packet’s destination address
……
312.82.xxx.xxx
1128.16.120.xxx
1
2128.16.120.111
12.82.100.101
12.82.100.xxx 2
![Page 10: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/10.jpg)
10
19EE122 F05
Patricia Tries
� Use binary tree paths to encode prefixes
� Advantage: simple to implement� Disadvantage: one lookup may take O(m), where
m is number of bits (32 in the case of IPv4)
001xx 20100x 310xxx 101100 5
0 1
0
1 0
1
1
0
0
0
0
2
3
5
1
20EE122 F05
Another Forwarding Technique: Source Routing
� Each packet specifies the sequence of routers, or alternatively the sequence of output ports, from source to destination
1234
1234
1234
1234
1234
1234
4
source
3 4
4 3 44 3 4
![Page 11: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/11.jpg)
11
21EE122 F05
Source Routing (cont’d)
� Gives the source control of the path� Not scalable
- Packet overhead proportional to the number of routers- Typically, require variable header length which is harder
to implement� Hard for source to have complete information� Loose source routing
�sender specifies only a
subset of routers along the path
22EE122 F05
Output Functions
� Buffer management: decide when and which packet to drop� Scheduler: decide when and which packet to transmit
1
2
SchedulerBuffer
![Page 12: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/12.jpg)
12
23EE122 F05
Example: FIFO router
� Most of today’s routers� Drop-tail buffer management: when buffer is full
drop the incoming packet� First-In-First-Out (FIFO) Scheduling: schedule
packets in the same order they arrive
24EE122 F05
Output Functions (cont’d)
� Packet classification: map each packet to a predefined flow/connection (for datagram forwarding)
- Use to implement more sophisticated services (e.g., QoS)� Flow: a subset of packets between any two endpoints in
the network
1
2
Scheduler
flow 1
flow 2
flow n
Classifier
Buffer management
![Page 13: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/13.jpg)
13
25EE122 F05
Packet Classification
� Classify an IP packet based on a number of fields in the packet header, e.g.,
- source/destination IP address (32 bits)- source/destination port number (16 bits)
- Type of service (TOS) byte (8 bits)- Type of protocol (8 bits)
� In general fields are specified by range
1
2
Scheduler
flow 1
flow 2
flow n
Classifier
Buffer management
26EE122 F05
Example of Classification Rules
� Access-control in firewalls- Deny all e-mail traffic from ISP-X to Y
� Policy-based routing- Route IP telephony traffic from X to Y via ATM
� Differentiate quality of service - Ensure that no more than 50 Mbps are injected from
ISP-X
![Page 14: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/14.jpg)
14
27EE122 F05
Scheduler
� One queue per flow � Scheduler decides when and from which queue to send a
packet- Each queue is FIFO
� Goals of a scheduler:- Quality of service- Protection (stop a flow from hogging the entire output link)- Fast!
1
2
Scheduler
flow 1
flow 2
flow n
Classifier
Buffer management
28EE122 F05
PriorityScheduler
Example: Priority Scheduler
� Priority scheduler: packets in the highest priority queue are always served before the packets in lower priority queues
High priority
Medium priority
Low priority
![Page 15: EECS 122: Introduction to Computer Networks Switch and ...ee122/fa05/notes/08...Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs EE122 F05 10 Output](https://reader036.vdocuments.mx/reader036/viewer/2022071302/60aa9b4abb37df37d65c3289/html5/thumbnails/15.jpg)
15
29EE122 F05
Example: Round Robin Scheduler
� Round robin: packets are served in a round-robin fashion
PriorityScheduler
High priority
Medium priority
Low priority
30EE122 F05
Discussion
� Priority scheduler vs. Round-robin scheduler- What are advantages and disadvantages of each
scheduler?