datalink layer3-1 2011 session 1 tele3118: network technologies week 3: data link layer wireless,...

42
DataLink Layer 3-1 2011 session 1 TELE3118: Network Technologies Week 3: Data Link Layer Wireless, Ethernet Some slides have been taken from: Computer Networking: A Top Down Approach Featuring the Internet , 3 rd edition. Jim Kurose, Keith Ross. Addison-Wesley, July 2004. All material copyright 1996-2004. J.F Kurose and K.W. Ross, All Rights Reserved. Computer Networks, 4 th edition. Andrew S. Tanenbaum. Prentice- Hall, 2003.

Upload: ross-haynes

Post on 16-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

DataLink Layer 3-1

2011 session 1TELE3118 Network

Technologies

Week 3 Data Link LayerWireless Ethernet

Some slides have been taken fromComputer Networking A Top Down Approach Featuring the Internet 3rd edition Jim Kurose Keith Ross Addison-Wesley July 2004 All material copyright 1996-2004 JF Kurose and KW Ross All Rights ReservedComputer Networks 4th edition Andrew S Tanenbaum Prentice-Hall 2003

DataLink Layer 3-2

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

DataLink Layer 3-3

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each

other interferring at B

DataLink Layer 3-4

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

DataLink Layer 3-5

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-2

IEEE 80211 Wireless LAN

80211b 24-5 GHz unlicensed

radio spectrum up to 11 Mbps direct sequence

spread spectrum (DSSS) in physical layer

bull all hosts use same chipping code

widely deployed using base stations

80211a 5-6 GHz range up to 54 Mbps

80211g 24-5 GHz range up to 54 Mbps

All use CSMACA for multiple access

All have base-station and ad-hoc network versions

DataLink Layer 3-3

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each

other interferring at B

DataLink Layer 3-4

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

DataLink Layer 3-5

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-3

Wireless network characteristicsMultiple wireless senders and receivers create

additional problems (beyond multiple access)

AB

C

Hidden terminal problem B A hear each other B C hear each other A C can not hear each

othermeans A C unaware of their

interference at B

A B C

Arsquos signalstrength

space

Crsquos signalstrength

Signal fading B A hear each other B C hear each other A C can not hear each

other interferring at B

DataLink Layer 3-4

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

DataLink Layer 3-5

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-4

IEEE 80211 multiple access avoid collisions 2+ nodes transmitting at same

time 80211 CSMA - sense before transmitting

donrsquot collide with ongoing transmission by other node

80211 no collision detection difficult to receive (sense collisions) when transmitting

due to weak received signals (fading) canrsquot sense all collisions in any case hidden terminal

fading goal avoid collisions CSMAC(ollision)A(voidance)

AB

CA B C

Arsquos signalstrength

space

Crsquos signalstrength

DataLink Layer 3-5

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-5

IEEE 80211 MAC Protocol CSMACA

80211 sender1 if sense channel idle for DIFS then

transmit entire frame (no CD)2 if sense channel busy then

start random backoff timetimer counts down while channel idletransmit when timer expiresif no ACK increase random backoff

interval repeat 2

80211 receiver- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-6

Avoiding collisions (more)

idea allow sender to ldquoreserverdquo channel rather than random access of data frames avoid collisions of long data frames

sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyrsquore

short) BS broadcasts clear-to-send CTS in response to RTS RTS heard by all nodes

sender transmits data frame other stations defer transmissions

Avoid data frame collisions completely using small reservation packets

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-7

Collision Avoidance RTS-CTS exchange

APA B

time

RTS(A)RTS(B)

RTS(A)

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

reservation collision

defer

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-8

Ethernet

ldquodominantrdquo wired LAN technology cheap $20 for 100Mbs first widely used LAN technology Simpler cheaper than token LANs and ATM Kept up with speed race 10 Mbps ndash 10 Gbps

Metcalfersquos Ethernetsketch

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-9

Ethernet Addressing 6 byte address (unique to each adapter)

Example 08-0b-db-e4-b1-02 2^48 = 281 trillion can produce 100 million LAN

devices every day for 2000 years Interpretation of address

Upper 24 bits OUI (Organizationally Unique Identifier) Lower 24 bits Organization-assigned portion Unicast lowest bit of first byte is 0 Multicast lowest bit of first byte is 1 Broadcast ff-ff-ff-ff-ff-ff

Adaptor accept frame if and only if Destination address matches adapter address or Destination address is broadcast or Destination address is multicast and adapter has

been configured to accept it

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-10

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble 7 bytes with pattern 10101010 followed by one

byte with pattern 10101011 used to synchronize receiver sender clock

rates

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-11

Ethernet Frame Structure (more) Addresses 6 bytes

if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to net-layer protocol

otherwise adapter discards frame

Type indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk)

CRC checked at receiver if error is detected the frame is simply dropped

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-12

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter stream of datagrams passed to network layer can

have gaps gaps will be filled if app is using TCP otherwise app will see the gaps

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-13

Ethernet uses CSMACD

No slots adapter doesnrsquot

transmit if it senses that some other adapter is transmitting that is carrier sense

transmitting adapter aborts when it senses that another adapter is transmitting that is collision detection

Before attempting a retransmission adapter waits a random time that is random access

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-14

Ethernet CSMACD algorithm

1 Adaptor receives datagram from net layer amp creates frame

2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits

3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame

4 If adapter detects another transmission while transmitting aborts and sends jam signal

5 After aborting adapter enters exponential backoff after the mth collision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-15

Ethernetrsquos CSMACD (more)

Jam Signal make sure all other transmitters are aware of collision 48 bits

Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec

Exponential Backoff Goal adapt retransmission

attempts to estimated current load heavy load random wait

will be longer first collision choose K

from 01 delay is K 512 bit transmission times

after second collision choose K from 0123hellip

after ten collisions choose K from 01234hellip1023

Seeinteract with Javaapplet on AWL Web sitehighly recommended

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-16

CSMACD efficiency Tprop = max prop between 2 nodes in LAN

ttrans = time to transmit max-size frame

Efficiency goes to 1 as tprop goes to 0

Goes to 1 as ttrans goes to infinity Much better than ALOHA but still decentralized simple and cheap

transprop tt 51

1efficiency

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-17

Ethernet Technologies Coax

10Base2 10Mbps 200 meters max cable length thin coaxial cable in a bus topology repeaters connect multiple segments

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-18

Ethernet Technologies Twisted Pair

10BaseT 100BaseT ldquofast ethernetrdquo 10100Mbps Twisted pair Nodes connect to a hub in ldquostar topologyrdquo

hub

nodes

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-19

HubsHubs are essentially physical-layer repeaters

bits coming from one link go out all other links at the same rate no frame buffering no CSMACD at hub adapters detect collisions provides net management functionality

twisted pair

hub

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-20

Interconnecting with hubs Backbone hub interconnects LAN segments Extends max distance between nodes But individual segment collision domains become one large

collision domain Canrsquot interconnect 10BaseT amp 100BaseT

hub

hubhub

hub

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-21

Ethernet Technologies Switching 1 Gbps and 10 Gbps Ethernet

High data speed + larger distance + increasing number of devices per LAN =gt switching

Switch Link layer device Stores-and-forwards Ethernet frames when frame is to be forwarded on segment

uses CSMACD to access segment Transparent hosts unaware of presence of

switches Plug-and-play do not need to be configured

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-22

Switching

bull How do determine onto which LAN segment to forward framebull Looks like a routing problem

hub

hubhub

switch1

2 3

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-23

Self learning

A switch has a switch table entry in switch table

(MAC Address Interface Time Stamp) stale entries in table dropped (TTL can be 60

min) switch learns which hosts can be reached through

which interfaces when frame received switch ldquolearnsrdquo location

of sender incoming LAN segment records senderlocation pair in switch table

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-24

FilteringForwardingWhen switch receives a frame

index switch table using MAC dest addressif entry found for destination

then if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated else flood

forward on all but the interface on which the frame arrived

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-25

Switch example 1

Suppose C sends frame to D

Switch receives frame from from C notes in bridge table that C is on interface 1 because D is not in table switch forwards frame into

interfaces 2 and 3

frame received by D

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEG

1123

12 3

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-26

Switch example 1

Suppose D replies back with frame to C

Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table switch forwards frame only to

interface 1

frame received by C

hub

hub hub

switch

A

B CD

EF

G H

I

address interface

ABEGC

11231

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-27

Switch example 2 unicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 4

08-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-46 08-00-60-00-17

08-00-60-00-46 08-00-60-00-09

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-28

Switch example 2 flooding multicast

08-00-60-00-00-09 1

08-00-60-00-00-C2 4

08-00-60-00-00-23 3

08-00-60-00-00-46 1

08-00-60-00-00-51 2

08-00-60-00-00-92 3

08-00-60-00-00-17 2

08-00-60-00-00-1B 408-00-60-00-00-0908-00-60-00-00-46 08-00-60-00-00-51 08-00-60-00-00-17

08-00-60-00-00-C2 08-00-60-00-00-1B 08-00-60-00-00-23 08-00-60-00-00-92

Learnt address table

port 4

port 1 port 2

port 3

08-00-60-00-00-2C

08-00-60-00-46 08-00-60-00-2C

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-29

Switch traffic isolation Breaks up a ldquobroadcast domainrdquo (LAN) into

multiple ldquocollision domainsrdquo (LAN segments) Increased total max throughput limitless nodes and geographical coverage Can connect different Ethernet types Transparent ldquoplug-and-playrdquo

hub hub hub

switch

collision domain collision domain

collision domain

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-30

Institutional network

hub

hubhub

switch

to externalnetwork

router

IP subnet

mail server

web server

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-31

VLANs motivation

What happens if CS user moves office to

EE but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP) crosses entire LAN (securityprivacy efficiency issues)

each lowest level switch has only few ports in use

Computer Science Electrical

Engineering

ComputerEngineering

Whatrsquos wrong with this picture

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-32

VLANs Port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip

Switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure

Virtual Local Area Network

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

Electrical Engineering(VLAN ports 1-8)

hellip

1

82

7 9

1610

15

hellip

Computer Science(VLAN ports 9-16)

hellip operates as multiple virtual switches

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-33

Port-based VLAN

1

8

9

16102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

traffic isolation frames tofrom 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

router

forwarding between VLANS done via routing (just as with separate switches) in practice vendors sell

combined switches plus routers

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-34

VLANS spanning multiple switches

trunk port carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches canrsquot be

vanilla 8021 frames (must carry VLAN ID info) 8021q protocol addsremoved additional header fields

for frames forwarded between trunk ports

1

8

9

102

7

hellip

Electrical Engineering(VLAN ports 1-8)

Computer Science(VLAN ports 9-15)

15

hellip

2

73

Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN

5

4 6 816

1

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-35

Type

2-byte Tag Protocol Identifier (value 81-00)

Tag Control Information (12 bit VLAN ID field

3 bit priority field like IP TOS)

Recomputed CRC

8021Q VLAN frame format

8021 frame

8021Q frame

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-36

Loops disaster

08-00-60-00-0908-00-60-00-46 08-00-60-00-51 08-00-60-00-17

08-00-60-00-C2 08-00-60-00-1B 08-00-60-00-23 08-00-60-00-92

port 4

port 1 port 2

port 3

Frame loops forever Learning messed up

Inadvertant Intentional for redundancy

08-00-60-00-46 08-00-60-00-17

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-37

Breaking the loop Spanning Tree Disable set of switch interfaces so that resulting

topology is a ldquotreerdquo that ldquospansrdquo all LAN segments

Disabled

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-38

Spanning tree protocol (IEEE 8021d)

Every bridge has bridge-id bridge-id = 2-byte priority + 6-byte MAC addr

bull Question MAC address of bridge

Every port of bridge has port-id = 1-byte priority + 1-byte port-number port-cost = inversely proportional to link speed

Bridge with lowest bridge-id is root bridge On each LAN segment bridge with lowest path

cost to root is designated bridge (use bridge-id and port-id to break ties)

A bridge forwards frames through a port only if it is a designated bridge for that LAN segment

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-39

STP terminology Port roles

Root port (switch port leading to root) Designated port (LAN port leading to root) Alternate backup port (anything else)

Port states Blocking (no sendrcv except STP bpdus) Listening (prepare for learningforwarding) Learning (learn MAC addr but no forwarding) Forwarding (sendrcv frames)

Can disable STP on port or switch All frames are forwarded How about Bridge Protocol Data Units

(BPDUs)

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-40

STP operation

BPDU carries 4-tuple ltroot-id root-cost bridge-id port-idgt

Store rcvd and send 4-tuple for each port port with best rcvd 4-tuple is root port

bull root bridge has no such port if send 4-tuple better than rcv 4-tuple port

is designated port rest of the ports are alternatebackup ports

Various timers

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-41

A

C

E

D

B

K

F

H

J

G

I

B5

B2

B3

B7

B4

B1

B6

Spanning tree example

rootDPDP

DPDP

DP

RP

DP

DP

DP

RP

RP

DPDP

DP

RP

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary

DataLink Layer 3-42

Ethernet Summary

Broadcast Ethernet Framing Addressing Media access

From broadcast to switched Ethernet Transparent bridging (switching) Loops and the spanning tree protocol

  • 2011 session 1 TELE3118 Network Technologies Week 3 Data Link Layer Wireless Ethernet
  • IEEE 80211 Wireless LAN
  • Wireless network characteristics
  • IEEE 80211 multiple access
  • IEEE 80211 MAC Protocol CSMACA
  • Avoiding collisions (more)
  • Collision Avoidance RTS-CTS exchange
  • Ethernet
  • Ethernet Addressing
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • Ethernet Technologies Coax
  • Ethernet Technologies Twisted Pair
  • Hubs
  • Interconnecting with hubs
  • Ethernet Technologies Switching
  • Switching
  • Self learning
  • FilteringForwarding
  • Switch example 1
  • Slide 26
  • Switch example 2 unicast
  • Switch example 2 flooding multicast
  • Switch traffic isolation
  • Institutional network
  • VLANs motivation
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 35
  • Loops disaster
  • Breaking the loop Spanning Tree
  • Spanning tree protocol (IEEE 8021d)
  • STP terminology
  • STP operation
  • Spanning tree example
  • Ethernet Summary