63
Link Layer 5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing, ARP Ethernet switches VLANS 5.5 link virtualization: MPLS 5.6 data center networking 5.7 a day in the life of a web request

Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs addressing,

Embed Size (px)

Citation preview

Page 1: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-1

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-2

MAC Addresses and ARP

32-bit IP address network-layer address used to get datagram to destination IP subnet

MAC (or LAN or physical or Ethernet) address used to get datagram from one interface to

another physically-connected interface (same network)

48 bit MAC address (for most LANs) burned in the adapter ROM

5 DataLink Layer 5-3

LAN Addresses and ARPEach adapter on LAN has a unique LAN address

Broadcast address =FF-FF-FF-FF-FF-FF

= adapter

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN(wired orwireless)

5 DataLink Layer 5-4

LAN Address (more)

MAC address allocation administered by IEEE manufacturer buys portion of MAC address space

(to assure uniqueness) Each vendor registers one or more 3 octet OUIs

(Organizationally Unique Identifier ) httpwwwmacvendorlookupcom Many Wireless LANs use MAC address for access control

MAC flat address portability can move LAN card from one LAN to another

IP hierarchical address NOT portable depends on IP subnet to which node is attached

Link Layer 5-5

ARP address resolution protocol

ARP table each IP node (host router) on LAN has table

IPMAC address mappings for some LAN nodes

lt IP address MAC address TTLgt

TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)

Question how to determineinterfacersquos MAC address knowing its IP address

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137196723

137196778

137196714

137196788

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 2: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-2

MAC Addresses and ARP

32-bit IP address network-layer address used to get datagram to destination IP subnet

MAC (or LAN or physical or Ethernet) address used to get datagram from one interface to

another physically-connected interface (same network)

48 bit MAC address (for most LANs) burned in the adapter ROM

5 DataLink Layer 5-3

LAN Addresses and ARPEach adapter on LAN has a unique LAN address

Broadcast address =FF-FF-FF-FF-FF-FF

= adapter

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN(wired orwireless)

5 DataLink Layer 5-4

LAN Address (more)

MAC address allocation administered by IEEE manufacturer buys portion of MAC address space

(to assure uniqueness) Each vendor registers one or more 3 octet OUIs

(Organizationally Unique Identifier ) httpwwwmacvendorlookupcom Many Wireless LANs use MAC address for access control

MAC flat address portability can move LAN card from one LAN to another

IP hierarchical address NOT portable depends on IP subnet to which node is attached

Link Layer 5-5

ARP address resolution protocol

ARP table each IP node (host router) on LAN has table

IPMAC address mappings for some LAN nodes

lt IP address MAC address TTLgt

TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)

Question how to determineinterfacersquos MAC address knowing its IP address

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137196723

137196778

137196714

137196788

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 3: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-3

LAN Addresses and ARPEach adapter on LAN has a unique LAN address

Broadcast address =FF-FF-FF-FF-FF-FF

= adapter

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN(wired orwireless)

5 DataLink Layer 5-4

LAN Address (more)

MAC address allocation administered by IEEE manufacturer buys portion of MAC address space

(to assure uniqueness) Each vendor registers one or more 3 octet OUIs

(Organizationally Unique Identifier ) httpwwwmacvendorlookupcom Many Wireless LANs use MAC address for access control

MAC flat address portability can move LAN card from one LAN to another

IP hierarchical address NOT portable depends on IP subnet to which node is attached

Link Layer 5-5

ARP address resolution protocol

ARP table each IP node (host router) on LAN has table

IPMAC address mappings for some LAN nodes

lt IP address MAC address TTLgt

TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)

Question how to determineinterfacersquos MAC address knowing its IP address

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137196723

137196778

137196714

137196788

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 4: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-4

LAN Address (more)

MAC address allocation administered by IEEE manufacturer buys portion of MAC address space

(to assure uniqueness) Each vendor registers one or more 3 octet OUIs

(Organizationally Unique Identifier ) httpwwwmacvendorlookupcom Many Wireless LANs use MAC address for access control

MAC flat address portability can move LAN card from one LAN to another

IP hierarchical address NOT portable depends on IP subnet to which node is attached

Link Layer 5-5

ARP address resolution protocol

ARP table each IP node (host router) on LAN has table

IPMAC address mappings for some LAN nodes

lt IP address MAC address TTLgt

TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)

Question how to determineinterfacersquos MAC address knowing its IP address

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137196723

137196778

137196714

137196788

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 5: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-5

ARP address resolution protocol

ARP table each IP node (host router) on LAN has table

IPMAC address mappings for some LAN nodes

lt IP address MAC address TTLgt

TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)

Question how to determineinterfacersquos MAC address knowing its IP address

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137196723

137196778

137196714

137196788

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 6: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-6

ARP protocol same LAN

A wants to send datagram to B Brsquos MAC address not in Arsquos

ARP table A broadcasts ARP query

packet containing Bs IP address dest MAC address = FF-FF-

FF-FF-FF-FF all nodes on LAN receive

ARP query B receives ARP packet

replies to A with its (Bs) MAC address frame sent to Arsquos MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state information

that times out (goes away) unless refreshed

ARP is ldquoplug-and-playrdquo nodes create their ARP

tables without intervention from net administrator

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 7: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-7

walkthrough send datagram from A to B via R focus on addressing ndash at IP (datagram) and MAC layer (frame) assume A knows Brsquos IP address assume A knows IP address of first hop router R (how) assume A knows Rrsquos MAC address (how)

Addressing routing to another LAN

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 8: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-8

Addressing routing to another LAN

IPEthPhy

IP src 111111111111 IP dest 222222222222

A creates IP datagram with IP source A destination B A creates link-layer frame with Rs MAC address as dest frame

contains A-to-B IP datagram

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 9: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-9

Addressing routing to another LAN

IPEthPhy

frame sent from A to R

IPEthPhy

frame received at R datagram removed passed up to IP

MAC src 74-29-9C-E8-FF-55 MAC dest E6-E9-00-17-BB-4B

IP src 111111111111 IP dest 222222222222

IP src 111111111111 IP dest 222222222222

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 10: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-10

Addressing routing to another LAN

IP src 111111111111 IP dest 222222222222

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 11: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-11

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

IPEthPhy

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 12: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

R

1A-23-F9-CD-06-9B222222222220

111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D

111111111112

11111111111174-29-9C-E8-FF-55

A

22222222222249-BD-D2-C7-56-2A

22222222222188-B2-2F-54-1A-0F

B

Link Layer 5-12

Addressing routing to another LAN

R forwards datagram with IP source A destination B R creates link-layer frame with Bs MAC address as dest frame

contains A-to-B IP datagram

IP src 111111111111 IP dest 222222222222

MAC src 1A-23-F9-CD-06-9B MAC dest 49-BD-D2-C7-56-2A

IPEthPhy

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 13: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-13

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 14: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-14

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

Old cable-line ethernet

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 15: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-15

Bus topology bus topology popular through mid 90s

all nodes in same collision domain (can collide with each other)

bus coaxial cable

10BASE2 cable showing BNC Connector end

10BASE2 cable with BNC T-Connector

10BASE2 Pictures are from Wikipiedia

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 16: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Star topology

today star topology prevails active switch in center each ldquospokerdquo runs a (separate) Ethernet protocol

(nodes do not collide with each other)

5 DataLink Layer 5-16

switch

star

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 17: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-17

Images from httpatomklubchippl

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 18: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-18

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

MAC addr CRC-32

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 19: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-19

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

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 20: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-20

Unreliable connectionless service Connectionless No handshaking between

sending and receiving adapter Unreliable receiving adapter doesnrsquot send

acks or nacks to sending adapter Data field is 46bytes -1500 bytes

bull If data less than 46 bytes stuff to be 46bytesndash Network layer uses ldquolengthrdquo field to remove stuffing

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 21: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-21

Ethernet uses CSMACD

No slots (no sync clock) Preamble in Ethernet

frame is used to sync clock between sender and receiver

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

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 22: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-22

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 (48-bit Why)

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

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 23: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-23

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

Why exponentialWhy random number picking

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 24: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-24

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

Why

transprop tt 51

1efficiency

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 25: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-25

8023 Ethernet Standards Link amp Physical Layers

many different Ethernet standards common MAC protocol and frame format different speeds 2 Mbps 10 Mbps 100

Mbps 1Gbps 10G bps different physical layer media fiber cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 26: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-26

Manchester encoding

Used in 10BaseT Each bit has a transition Allows clocks in sending and receiving nodes to

synchronize to each other no need for a centralized global clock among nodes

Hey this is physical-layer stuff

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 27: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-27

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 28: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-28

10BaseT and 100BaseT 10100 Mbps rate latter called ldquofast ethernetrdquo T stands for Twisted Pair Nodes connect to a hub ldquostar topologyrdquo 100

m max distance between nodes and hub

twisted pair

hub

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 29: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-29

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

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 30: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-30

Switch link-layer device smarter than hubs take active

role store forward Ethernet frames examine incoming framersquos MAC address selectively

forward frame to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment

transparent hosts are unaware of presence of switches

plug-and-play self-learning switches do not need to be configured

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 31: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-31

Switch allows multiple simultaneous transmissions

hosts have dedicated direct connection to switch

switches buffer packets Ethernet protocol used on

each incoming link but no collisions full duplex each link is its own collision

domain switching A-to-Arsquo and B-

to-Brsquo simultaneously without collisions not possible with dumb hub

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 32: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-32

Switch Table

Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5

A each switch has a switch table each entry (MAC address of host interface

to reach host time stamp)

looks like a routing table Q how are entries created

maintained in switch table something like a routing

protocol

A

Arsquo

B

Brsquo

C

Crsquo

switch with six interfaces(123456)

1 23

45

6

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 33: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-33

Switch self-learning

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

A

Arsquo

B

Brsquo

C

Crsquo

1 23

45

6

A Arsquo

Source ADest Arsquo

MAC addr interface TTL

Switch table (initially empty)

A 1 60

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 34: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-34

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

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 35: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-35

Interconnecting switches

switches can be connected together

Q sending from A to G - how does S1 know to forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)

A

B

S1

C D

E

F

S2

S4

S3

H

I

G

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 36: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-36

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 37: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-37

Switches vs Routers both store-and-forward devices

routers network layer devices (examine network layer headers) switches are link layer devices

routers maintain routing tables implement routing algorithms

switches maintain switch tables implement filtering learning algorithms

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 38: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

5 DataLink Layer 5-38

Summary comparison

hubs routers switches

traffi c isolation

no yes yes

plug amp play yes no yes

optimal routing

no yes no

cut through

yes no yes

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 39: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-39

VLANs motivation (virtual LAN)

consider CS user moves office to EE

but wants connect to CS switch

single broadcast domain all layer-2 broadcast

traffic (ARP DHCP unknown location of destination MAC address) must cross entire LAN

securityprivacy efficiency issues

Computer Science Electrical

Engineering

ComputerEngineering

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 40: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-40

VLANsport-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

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 41: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-41

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

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 42: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-42

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

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 43: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-43

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

destaddress

sourceaddress data (payload) CRCpreamble

data (payload) CRC

type

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 44: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-44

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 45: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-45

Multiprotocol label switching (MPLS)

initial goal high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than

shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address

PPP or Ethernet header

IP header remainder of link-layer frameMPLS header

label Exp S TTL

20 3 1 5

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 46: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-46

MPLS capable routers

aka label-switched router forward packets to outgoing interface based only

on label value (donrsquot inspect IP address) MPLS forwarding table distinct from IP forwarding tables

flexibility MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to

same destination differently (traffic engineering) re-route flows quickly if link fails pre-computed backup

paths (useful for VoIP)

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 47: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-47

R2

D

R3R5

A

R6

MPLS versus IP paths

IP router IP routing path to destination

determined by destination address alone

R4

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 48: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-48

R2

D

R3R4

R5

A

R6

MPLS versus IP paths

IP-onlyrouter

IP routing path to destination determined by destination address alone

MPLS and IP router

MPLS routing path to destination can be based on source and dest address fast reroute precompute backup routes

in case of link failure

entry router (R4) can use different MPLS routes to A based eg on source address

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 49: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-49

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 50: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-50

Data center networks

10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximity e-business (eg Amazon) content-servers (eg YouTube Akamai Apple Microsoft) search engines data mining (eg Google)

challenges multiple applications each

serving massive numbers of clients

managingbalancing load avoiding processing networking data bottlenecks

Inside a 40-ft Microsoft container Chicago data center

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 51: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-51

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

Load balancer

Load balancer

B

1 2 3 4 5 6 7 8

A C

Border router

Access router

Internet

Data center networks

load balancer application-layer routingreceives external client requestsdirects workload within data centerreturns results to external client (hiding data center internals from client)

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 52: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Server racks

TOR switches

Tier-1 switches

Tier-2 switches

1 2 3 4 5 6 7 8

Data center networks rich interconnection among switches racks

increased throughput between racks (multiple routing paths possible) increased reliability via redundancy

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 53: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-53

Link layer LANs outline

51 introduction services

52 error detection correction

53 multiple access protocols

54 LANs addressing ARP Ethernet switches VLANS

55 link virtualization MPLS

56 data center networking

57 a day in the life of a web request

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 54: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-54

Synthesis a day in the life of a web request

journey down protocol stack complete application transport network link

putting-it-all-together synthesis goal identify review understand protocols (at all

layers) involved in seemingly simple scenario requesting www page

scenario student attaches laptop to campus network requestsreceives wwwgooglecom

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 55: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer5-55

A day in the life scenario

Comcast network 68800013

Googlersquos network 64233160019 64233169105

web server

DNS server

school network 68802024

web page

browser

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 56: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-56

A day in the lifehellip connecting to the Internet

connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCPDHCP

DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet

Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server

Ethernet demuxed to IP demuxed UDP demuxed to DHCP

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 57: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-57

DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCPUDP

IPEthPhy

DHCP

DHCP

DHCP

DHCP

DHCP

encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client

Client now has IP address knows name amp addr of DNS server IP address of its first-hop router

DHCP client receives DHCP ACK reply

A day in the lifehellip connecting to the Internet

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 58: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-58

A day in the lifehellip ARP (before DNS before HTTP)

before sending HTTP request need IP address of wwwgooglecom DNS

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP

ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface

client now knows MAC address of first hop router so can now send frame containing DNS query

ARP query

EthPhy

ARP

ARP

ARP reply

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 59: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-59

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

DNS

IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router

IP datagram forwarded from campus network into comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server

demuxrsquoed to DNS server DNS server replies to

client with IP address of wwwgooglecom

Comcast network 68800013

DNS server

DNSUDP

IPEthPhy

DNS

DNS

DNS

DNS

A day in the lifehellip using DNS

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 60: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-60

A day in the lifehellipTCP connection carrying HTTP

HTTPTCPIP

EthPhy

HTTP

to send HTTP request client first opens TCP socket to web server

TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server

TCP connection established64233169105

web server

SYN

SYN

SYN

SYN

TCPIP

EthPhy

SYN

SYN

SYN

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

SYNACK

web server responds with TCP SYNACK (step 2 in 3-way handshake)

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 61: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

router(runs DHCP)

Link Layer 5-61

A day in the lifehellip HTTP requestreply

HTTPTCPIP

EthPhy

HTTP

HTTP request sent into TCP socket

IP datagram containing HTTP request routed to wwwgooglecom

IP datagram containing HTTP reply routed back to client

64233169105

web server

HTTPTCPIP

EthPhy

web server responds with HTTP reply (containing web page)

HTTP

HTTP

HTTPHTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

web page finally () displayed

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 62: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-62

Chapter 5 Summary

principles behind data link layer services error detection correction sharing a broadcast channel multiple access link layer addressing

instantiation and implementation of various link layer technologies Ethernet switched LANS VLANs virtualized networks as a link layer MPLS

synthesis a day in the life of a web request

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath
Page 63: Link Layer5-1 Link layer, LANs: outline 5.1 introduction, services 5.2 error detection, correction 5.3 multiple access protocols 5.4 LANs  addressing,

Link Layer 5-63

Chapter 5 letrsquos take a breath

journey down protocol stack complete (except PHY)

solid understanding of networking principles practice

hellip could stop here hellip but lots of interesting topics wireless multimedia security network management

  • Link layer LANs outline
  • MAC Addresses and ARP
  • LAN Addresses and ARP
  • LAN Address (more)
  • ARP address resolution protocol
  • ARP protocol same LAN
  • Addressing routing to another LAN
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Ethernet
  • Bus topology
  • Star topology
  • PowerPoint Presentation
  • Ethernet Frame Structure
  • Ethernet Frame Structure (more)
  • Unreliable connectionless service
  • Ethernet uses CSMACD
  • Ethernet CSMACD algorithm
  • Ethernetrsquos CSMACD (more)
  • CSMACD efficiency
  • 8023 Ethernet Standards Link amp Physical Layers
  • Manchester encoding
  • Slide 27
  • 10BaseT and 100BaseT
  • Hubs
  • Switch
  • Switch allows multiple simultaneous transmissions
  • Switch Table
  • Switch self-learning
  • FilteringForwarding
  • Interconnecting switches
  • Institutional network
  • Switches vs Routers
  • Summary comparison
  • VLANs motivation (virtual LAN)
  • VLANs
  • Port-based VLAN
  • VLANS spanning multiple switches
  • Slide 43
  • Slide 44
  • Multiprotocol label switching (MPLS)
  • MPLS capable routers
  • MPLS versus IP paths
  • Slide 48
  • Slide 49
  • Data center networks
  • Slide 51
  • Slide 52
  • Slide 53
  • Synthesis a day in the life of a web request
  • A day in the life scenario
  • A day in the lifehellip connecting to the Internet
  • Slide 57
  • A day in the lifehellip ARP (before DNS before HTTP)
  • A day in the lifehellip using DNS
  • A day in the lifehellipTCP connection carrying HTTP
  • A day in the lifehellip HTTP requestreply
  • Chapter 5 Summary
  • Chapter 5 letrsquos take a breath