Link Layer: Switch, MPLS, VLAN

DATA COMMUNICATOIN
NETWORKING
Instructor: Ouldooz Baghban Karimi
Course Book & Slides:
Computer Networking, A Top-Down Approach
By: Kurose, Ross
Course Overview

Basics of Computer Networks






Internet & Protocol Stack
Application Layer
Transport Layer
Network Layer
Data Link Layer
Advanced Topics




Case Studies of Computer Networks
Internet Applications
Network Management
Network Security
Link Layer
2
Ethernet Switch
 Link-layer device: takes an active role
 Store & forward Ethernet frames
 Examine incoming frame’s MAC address
 Selectively forward frame to one-or-more outgoing
links when frame is to be forwarded on segment
 Uses CSMA/CD to access segment
 Transparent
 Hosts are unaware of presence of switches
 Plug-and-play
Link Layer
3
Switch
 Hosts have dedicated, direct
connection to switch
A
B
C’
 Switches buffer packets
6
 Ethernet protocol used on each
incoming link, but no collisions
5
 Full duplex
 Each link is its own collision domain
 Switching
 A-to-A’ and B-to-B’ can transmit
simultaneously, without collisions
Link Layer
1
2
4
3
C
B’
A’
Switch with six interfaces
(1,2,3,4,5,6)
4
Switch
 Hosts have dedicated, direct connection to
switch
A
 Switches buffer packets





6
Ethernet protocol used on each incoming link,
but no collisions
Full duplex
Each link is its own collision domain
 Switching
A-to-A’ and B-to-B’ can transmit
simultaneously, without collisions
Each switch has a switch table, each entry:
 MAC address of host, interface to reach host,
time stamp
 Looks like a routing table!
Link Layer
B
C’
5
1
2
4
3
C
B’
A’
Switch with six interfaces
(1,2,3,4,5,6)
5
Switch: Self Learning
Source: A
Dest: A’
A
A A’
B
C’
 Switch learns which hosts can
be reached through which
interfaces
6
 When frame received, switch
“learns” location of sender:
B’
incoming LAN segment
 Records sender/location pair in
switch table
MAC addr interface
A
Link Layer
1
1
2
4
5
3
C
A’
TTL
60
Switch table
(initially empty)
6
Switch: Frame Filtering/Forwarding
When frame received at switch:
1. record incoming link, MAC address of sending host
2. index switch table using MAC destination address
3. if entry found for destination
then {
if destination on segment from which frame arrived
then drop frame
else forward frame on interface indicated by entry
}
else flood /* forward on all interfaces except arriving
interface */
Link Layer
7
Switch:
Source: A
Dest: A’
Self Learning/Forwarding
A
A A’
B
C’
6
• Frame destination, A’,
location unknown: Flood
• Destination A location
known: Selectively just
send on one link
A A’
A’
5
Link Layer
2
4
3
C
B’
A’ A
A’
MAC addr interface
A
A’
1
1
4
TTL
60
60
switch table
(initially empty)
8
Interconnecting Switches
S4
S1
S3
S2
A
B
C
F
D
E
I
G
H
Q: Sending from A to G - how does S1 know to forward frame
destined to F via S4 and S3?
Self learning! Works exactly the same as in single-switch case!
Link Layer
9
Institutional Network
mail server
to external
network
router
web server
IP subnet
Link Layer
10
Switches vs. Routers
Both are store-and-forward
datagram
 Routers: network-layer
devices (examine network-frame
layer headers)
 Switches: link-layer devices
(examine link-layer headers)
Both have forwarding tables
 Routers: compute tables
using routing algorithms, IP
addresses
 Switches: learn forwarding
table using flooding,
learning, MAC addresses
Link Layer
application
transport
network
link
physical
frame
link
physical
switch
network datagram
link
frame
physical
application
transport
network
link
physical
11
Switches vs. Routers
Consider
 CS user moves office to EE, but
wants connect to CS switch?
 Single broadcast domain
 All layer-2 broadcast traffic
(ARP, DHCP, unknown location
of destination MAC address)
must cross entire LAN
 Security/privacy, efficiency
issues
Link Layer
Computer
Science
Electrical
Engineering
Computer
Engineering
12
VLANs
Port-based VLAN: switch ports grouped
(by switch management software) so
that single physical switch ……
7
9
15
2
8
10
16
…
Virtual Local Area Network
Switch(es) supporting VLAN
capabilities can be configured
to define multiple virtual LANS
over single physical LAN
infrastructure.
1
Electrical Engineering
(VLAN ports 1-8)
Computer Science
(VLAN ports 9-15)
… operates as multiple virtual switches
1
7
9
15
2
8
10
16
…
Electrical Engineering
(VLAN ports 1-8)
Link Layer
…
…
Computer Science
(VLAN ports 9-16)
13
Port Based VLANs
router
 Traffic isolation: frames to/from
ports 1-8 can only reach ports 1-8


Can also define VLAN based on MAC
addresses of endpoints, rather than
switch port
Dynamic membership: ports
can be dynamically assigned
among VLANs
1
7
9
15
2
8
10
16
…
Electrical Engineering
(VLAN ports 1-8)

…
Computer Science
(VLAN ports 9-15)
Forwarding between VLANS: done
via routing (just as with separate
switches)
 In practice vendors sell combined
switches plus routers
Link Layer
14
VLANs Spanning Multiple Switches
1
7
9
15
1
3
5
7
2
8
10
16
2
4
6
8
…
Electrical Engineering
(VLAN ports 1-8)
…
Computer Science
(VLAN ports 9-15)
Ports 2,3,5 belong to EE VLAN
Ports 4,6,7,8 belong to CS VLAN
• Trunk port: carries frames between VLANS defined over
multiple physical switches
•
Frames forwarded within VLAN between switches can’t be vanilla
802.1 frames (must carry VLAN ID info)
•
802.1q protocol adds/removed additional header fields for frames
forwarded between trunk ports
Link Layer
15
802.1Q VLAN Frame Format
type
preamble
dest.
address
source
address
data (payload)
CRC
802.1 frame
type
preamble
dest.
address
source
address
data (payload)
2-byte Tag Protocol Identifier
(value: 81-00)
CRC
802.1Q frame
Recomputed
CRC
Tag Control Information (12 bit VLAN ID field,
3 bit priority field like IP TOS)
Link Layer
16
Multiprotocol Label Switching
 Initial goal: high-speed IP forwarding using fixed length label
(instead of IP address)



Fast lookup using fixed length identifier (rather than shortest prefix matching)
Borrowing ideas from Virtual Circuit (VC) approach
But IP datagram still keeps IP address!
PPP or Ethernet
header
label
20
Link Layer
IP header
MPLS header
remainder of link-layer frame
Exp S TTL
3
1
5
17
MPLS Capable Routers
 a.k.a. label-switched router
 Forward packets to outgoing interface based only on label
value (don’t inspect IP address)
 MPLS forwarding table distinct from IP forwarding tables
 Flexibility: MPLS forwarding decisions can differ from those
of IP
 Use destination and source addresses to route flows to same
destination differently (traffic engineering)
 Re-route flows quickly if link fails: pre-computed backup
paths (useful for VoIP)
Link Layer
18
MPLS vs IP Path
R6
D
R4
R5
R3
A
R2
IP routing: path to destination determined
by destination address alone
Link Layer
IP router
19
MPLS vs IP Path
R6
D
R4
R5
R3
A
R2
IP routing: path to destination determined by
destination address alone
Link Layer
IP router
20
MPLS vs IP Path
entry router (R4) can use different MPLS
routes to A based, e.g., on source address
R6
D
R4
R5
R3
A

IP routing


R2
Path to destination determined by destination
address alone
MPLS routing


Path to destination can be based on source and
destination address
Fast reroute: pre-compute backup routes in case of link
failure
Link Layer
IP-only
router
MPLS and
IP router
21
MPLS Signaling
 Modify OSPF, IS-IS link-state flooding protocols to carry info
used by MPLS routing,
 e.g., link bandwidth, amount of “reserved” link bandwidth
 Entry MPLS router uses RSVP-TE signaling protocol to set up MPLS
forwarding at downstream routers
RSVP-TE
R6
D
R4
R5
Link Layer
modified
link state
flooding
A
22
MPLS Forwarding Tables
in
label
out
label dest
10
12
8
out
interface
A
D
A
in
label
0
0
1
out
label dest
10
12
6
9
out
interface
A
D
1
0
R6
0
0
R3
R4
R5
D
1
1
0
0
R2
in
label
8
Link Layer
out
label dest
6
A
out
interface
in
label
6
out
label dest
R1
-
A
A
out
interface
0
0
23
Download PDF
Similar pages