Lecture2 NP Sep 2018
Lecture2 NP Sep 2018
Lecture 2
M Boulmalf, PhD
Advanced Network
International University of Rabat
1
Packet Switching
Outline
Introduction (Devices)
Store-and-Forward and Cut-Through
Switches
Bridges and Extended LANs
Cell Switching
Segmentation and Reassembly
2
LAN Devices
Repeater
Copies bits from one network to another
Does not look at any bits
Allows the extension of a network beyond
physical length limitations
REPEATER
Bridge/Switch
BRIDGE
Router
Copies packets from one network to another.
Makes decisions about what route a packet
should take (looks at network headers).
ROUTER
ROUTER
Ethernet LAN Segmentation
Collision Domain
A collision domain is a physical network segment
where data packets can "collide" with one another for
being sent on a shared medium, in particular in the
Ethernet networking protocol. This is an Ethernet term
used to describe a network scenario wherein one
particular device sends a packet on a network segment,
forcing every other device on that same segment to pay
attention to it.
Ethernet LAN Segmentation
•
Broadcast Domain
A broadcast domain is a logical division of a
computer network, in which all nodes can reach each
other by broadcast at the data link layer. A broadcast
domain can be within the same LAN or it can be routed
towards other LAN segments.
In terms of current popular technologies: Any computer
connected to the same Ethernet repeater or switch is a
member of the same broadcast domain. Further, any
computer connected to the same set of inter-connected
switches/repeaters is a member of the same broadcast
domain. Routers and other higher-layer devices form
Ethernet LAN Segmentation
•
Broadcast Domain
This is as compared to a collision domain, which would
be all nodes on the same set of inter-connected
repeaters, divided by switches and learning bridges.
Collision domains are generally smaller than broadcast
domains.
Ethernet
13
Scalable Networks
Switch
Forwards frames from input port to output port
Port selected based on address in frame header
T3 T3
T3 Switch T3
STS-1 STS-1
Input Output
ports ports
Advantages
Cover large geographic area (tolerate latency)
Support large numbers of hosts (scalable bandwidth)
14
Switching
Switching of frames is based on
fields in the header
Three approaches to switching
frames:
Datagrams (connectionless approach)
Virtual Circuit (connection-oriented
approach)
Source routing
15
Datagram Model
There is no round trip “RTT” delay waiting for connection
setup; a host can send data as soon as it is ready.
16
Datagram Switching
No connection setup phase
Each packet forwarded independently
Sometimes called connectionless model
Analogy: postal system
Each switch maintains a
forwarding (routing) table
17
Datagram Switching
Host D
A 3 0
B 0 Host A
C 3
D 3
Host G 0 Switch 3 Host B
E 2 1 3
F 1 2
G 0
Host H
H 0
s also called a routing table for switch 2
s harder to create theses tables statically by a Network 18
Amdinistrator
Datagram Switching
A switch or Link failure might not have any serious
effect on communication if it is possible to find an
alternate route around the failure and to update the
forwarding table accordingly
19
Virtual Circuit Switching
Explicit connection setup (and tear-down)
phase
Subsequence packets follow same circuit
Sometimes called connection-oriented
model
Analogy: phone call
Each switch maintains a VC table
20
Host D
0 Switch 1 Host E
Host F
3 1
Tables Host C
2 3
2 Switch 2
1
Host A
… … …
… … … … …
Host A Host B
4
22
Virtual Circuit Model
A signaling protocol is used for setting up and tearing
down VCs.
Typically wait full RTT for connection setup before
sending first data packet.
While the connection request contains the full address
for destination, each data packet contains only a small
identifier, making the per-packet header overhead
small. (advantage vs datagram)
If a switch or a link in a connection fails, the connection
is broken and a new one needs to be established.
Connection setup provides an opportunity to manage
resources
23
Flow Control
Connection-oriented model employs the
following strategy:
Buffers are allocated per VC when established
A sliding window protocol runs between the two end-
points of the VC to control the occupancy of the
buffers
A VC is rejected by a given node during set up if not
enough resource are available
Hop-by-hop flow control
Quality of service per VC
Examples of connection-oriented technologies:
Frame Relay and ATM
24
Source Routing
• All information needed to
forward packets are 0 Switch 1
0
provided by the source 3 1
3 1
host. 2 Switch 2
2 3 1
2
•Ordered list of switch 3 0 1 1 3 0
output ports 0
Port 1
Bridge
Port 2
X Y Z
Ethernet Switch = Bridge on Steroids
26
Learning Bridges
Do not forward when unnecessary
Maintain forwarding table
Host
A B C A Port 1
B 1
C 1
Port 1 X 2
Bridge Y 2
Port 2 Z 2
X Y Z
Learn table entries based on source address
Table is an optimization; need not be complete
Always forward broadcast frames
27
Spanning Tree Algorithm
Problem: loops A
B
B3
C B5
D B7
B2 K
E F
B1
G H
(a) (b)
B6 B4
I
J
Bridges run a distributed spanning tree algorithm
select which bridges actively forward
developed by Radia Perlman
now IEEE 802.1 specification
28
Algorithm Overview
Each bridge has unique id (e.g., B1, B2,
B3)
Select bridge with smallest id as root
Select bridge on each LAN closest to root
as designated
Each bridge (use id to break ties)
bridge forwards
frames over each LAN
A
B
for which it is the B3
designated bridge
C B5
D B7
B2 K
E F
B1
G H
B6
B4
I
29 J
A
B
B3
C B5
D B7
B2 K
E F
G H
B6
B4
I
1. B3 receives (B2,0,B2) J
30
Algorithm Details
Bridges exchange configuration messages
id for bridge sending the message
id for what the sending bridge believes to be
root bridge
distance (hops) from sending bridge to root
bridge
Each bridge records current best
configuration message for each port
Initially, each bridge believes it is the root
31
Algorithm Detail (cont)
When learn not root, stop generating config messages
in steady state, only root generates configuration messages
When learn not designated bridge, stop forwarding
config messages
in steady state, only designated bridges forward config
messages
Root continues to periodically send config messages
If any bridge does not receive config message after a
period of time, it starts generating config messages
claiming to be the root
32
Broadcast and Multicast
Forward all broadcast/multicast frames
current practice
Learn when no group members
downstream
Accomplished by having each member of
group G send a frame to bridge multicast
address with G in source field
33
Limitations of Bridges
Do not scale
spanning tree algorithm does not
scale
broadcast does not scale
Do not accommodate
heterogeneity
Caution: beware of transparency
34
VLANs
VLAN
s W X
VLAN 100
VLAN 100
B1 B2
VLAN 200 VLAN 200
Y Z
When a packet sent by X arrives at B2 the bridge observes that it come in a port
that was configured as being in VLAN100. It inserts a VLAN header
35 between the
Ethernet header and its payload.
Activities in Class
Problem 13
Given the extended LAN shown in Figure below,
indicate which ports are not selected by the
spanning algorithm
7
7
2
1 5
4 6
36
Activities in Class
Sol Problem 13
37
Activities in Class
Problem 14
Given the extended LAN shown in Figure 3.34, assume that bridge
B1 suffers catastrophic failure. Indicate which ports are selected by
the STA after the recovery process and a new tree has been formed
7
7
2
1 5
4 6
38
Activities in Class
Sol Problem 14
The mapping between LANs and their DB
B1 dead [B7]
B2 A,B,D
B3 E,F,G,H
B4 I
B5 idle
B6 J
B7 C
39
Activities in Class
Problem 15
Consider the arrangement of learning bridges shown in Figure below. Assuming all are initially empty, give the
forwarding table for each of the bridges B1-B4 after the following transmissions
A sends to C
C sends to A
D sends to C
Identify ports with the unique neighbor reached directly from that port, that is, the ports for B1 are to be labeled “A” and
“B”
B3 C
A B1 B2
40
B4 D
Activities in Class
Sol Problem 15
41
Activities in Class
Problem 16
As in the previous problem, consider the arrangement of learning bridges shown in Figure 3.35.
Assuming all are initially empty, give the forwarding tables for each of the bridges B1-B4 after
the following transmissions
D sends to C
C sends to D
A sends to C
B3 C
A B1 B2
B4 D
42
Activities in Class
Sol Problem 16
All the bridges see the packet from D to C. Only B3,
B2, and B4 see the packet from C to D. Only B1, B2,
and B3 see the packet from A to C.
B1 A-interface: A B2-interface :D (not C)
B2 B1-interface :A B3-interface :C B4-
interface: D
B3 C-interface :C B2-interface: A,D
B4 D-interface : D B2-interface: C (not A)
43