0% found this document useful (0 votes)
18 views43 pages

Lecture2 NP Sep 2018

Uploaded by

aymane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views43 pages

Lecture2 NP Sep 2018

Uploaded by

aymane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 43

Packet Switching

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

 Copies frames from one network to another


 Can operate selectively - does not copy all
frames (must look at data-link headers).
 Extends the network beyond physical length
limitations.

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

Switches break collision domains.


Routers break collision domains as well as broadcast domai
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

 Multi-access (shared medium).


 Every Ethernet interface has a
unique 48 bit address (hardware
address, Physical Address, MAC
address)
 Example: C0:B3:44:17:21:17
 The broadcast address is all 1’s.
 Addresses are assigned to
vendors by a central authority.
CSMA/CD
Carrier Sense Multiple Access
with
Collision Detection

 Carrier Sense: can tell when


another host is transmitting
 Multiple Access: many hosts
share one wire
 Collision Detection: can tell when
another host transmits at the
same time.
Packet Switching
 Store-and-Forward Switches

Is a telecommunications technique in which information is sent to
an intermediate station where it is kept and sent at a later time to
the final destination or to another intermediate station

A switching device that stores a complete incoming data packet
before it is sent out. Such switches are used when incoming and
outgoing speeds differ.
 Cut-Through Switches

A switching device that begins to output an incoming data packet
before the packet is completely received

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.

 Source host has no way of knowing if the network is


capable of delivering a packet or if the destination host is
even up.

 Since packets are treated independently, it is possible to


route around link and node failures.

 Since every packet must carry the full address of the


destination, the overhead per packet is higher than for
the connection-oriented model.

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

Forwarding table for switch 2


0 Switch 1 Host E
Host F
Destinatio Port 3 1
2 Switch 2
n Host C
2 3 1

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

 This fact is particularly important to the history of


datagram networks. One of the important design
goals of the Internet is Robustness to failures, and
the history has shown it to be quite effective at
meeting this goal

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 G 0 Switch 3 Host B


1 3

 Circuit Table  Forwarding Table 2

(switch 1, port 2) (switch 1) Host H

VC In VC Out Port Out Address Port Switch 2


A 2 VC In VC Out Port Out
C 3
5 11 1
F 1
G 1 11 7 0

… … …
… … … … …

•VC tables are maintained in each switch. Each VC table entry


contains
• VCI, incoming interface number, outgoing interface number.
21
• Outgoing packets might use a different VCI number
Virtual Circuits
 Virtual connections are uniquely identified on a switch
using the VCI and the incoming interface number VCIs
have local significance 0
0 0 3 1
3 1 11
3 1
Switch 1 Switch 2 2
2 2
5 0 Switch 3
7
3 1

Host A Host B
4

 Permanent Virtual Circuits


 Switched Virtual Circuits or signaled VC

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

•This approach assumes


Host A
that the host knows
enough about the topology 0 1 3
of the network 0 Switch 3
1 3
• Variable header lengths
Host B
•Suffers from a scalability 2
problem
25
Bridges and Extended LANs
 LANs have physical limitations (e.g., 2500m)
 Connect two or more LANs with a bridge
 accept and forward strategy
 level 2 connection (does not add packet header)
A B C

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

Problem in the Algorithm B1

G H

B6
B4
I

1. B3 receives (B2,0,B2) J

2. Since 2<3, B3 accepts B2 as root


3. B3 adds one to the distance advertised by B2 (0) and thus
sends (B2,1,B3) towards B5
4. Meanwhile, B2 accepts B1 as root because it has the lower ID,
and it sends (B1,1,B2) towards B3
5. B5 accepts B1 as root and sends (B1,1,B5) toward B3
6. B3 accepts B1 as root and it notes that both B2 and B5 are
closer to the root than it is. Thus B3 stops forwarding
messages on both its interfaces

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

Spanning Tree Animation

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

You might also like