Download Chapter 6 the link layer and more Summaries Computer Science in PDF only on Docsity!
Networking
Chapter 6 The Link Layer and LANs
Computer Networking: A Top-Down Approach 8 th^ edition Jim Kurose, Keith Ross Pearson, 2020
Chapter 6
The Link Layer
and LANs
Link layer, LANs: roadmap ▪ a day in the life of a web request
▪ introduction
▪ error detection, correction ▪ multiple access protocols ▪ LANs
- addressing, ARP
- Ethernet
- switches
- VLANs ▪ link virtualization: MPLS ▪ data center networking
Link layer: introduction terminology: ▪ hosts and routers: nodes ▪ communication channels that connect adjacent nodes along communication path: links
- wired
- wireless
- LANs ▪ layer-2 packet: frame , encapsulates datagram mobile network enterprise network national or global ISP datacenter network link layer has responsibility of transferring datagram from one node to physically adjacent node over a li nk
Link layer: services ▪ framing, link access:
- encapsulate datagram into frame, adding header, trailer
- channel access if shared medium
- “MAC” addresses in frame headers identify source, destination (different from IP address!) ▪ reliable delivery between adjacent nodes
- we already know how to do this!
- seldom used on low bit-error links
- wireless links: high error rates
- Q: why both link-level and end-end reliability? … …
Link layer: services (more) ▪ flow control:
- pacing between adjacent sending and receiving nodes ▪ error detection:
- errors caused by signal attenuation, noise.
- receiver detects errors, signals retransmission, or drops frame ▪ error correction:
- receiver identifies and corrects bit error(s) without retransmission ▪ half-duplex and full-duplex:
- with half duplex, nodes at both ends of link can transmit, but not at same time … …
controller physical memory (^) CPU Interfaces communicating controller physical cpu memory application transport network link link physical application transport network link link physical sending side: ▪ encapsulates datagram in frame ▪ adds error checking bits, reliable data transfer, flow control, etc. receiving side: ▪ looks for errors, reliable data transfer, flow control, etc. ▪ extracts datagram, passes to upper layer at receiving side link linkhh datagram datagram datagram
Link layer, LANs: roadmap
▪ a day in the life of a web
request
▪ introduction
▪ error detection, correction
▪ multiple access protocols
▪ LANs
- addressing, ARP
- Ethernet
- switches
- VLANs
▪ link virtualization: MPLS
▪ data center networking
Parity checking single bit parity: ▪ detect single bit errors 0111000110101011 1 parity bit d data bits two-dimensional bit parity: ▪ detect and correct single bit errors d1, d2, di,
... d1,j+ d2,j+ di,j+ ... ... d1,j d2,j di,j ... di+1,1 d i+1,j+ di+1,j ... ... ... ... row parity column parity 0 1 1 1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 1 0 1 0 no errors: 0 1 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 parity error parity error detected and correctable single-bit error: Even parity: set parity bit so there is an even number of 1’s
- Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/
Internet checksum (review)
sender:
▪ treat contents of UDP segment (including UDP header fields and IP addresses) as sequence of 16-bit integers ▪ checksum: addition (one’s complement sum) of segment content ▪ checksum value put into UDP checksum field receiver: ▪ compute checksum of received segment ▪ check if computed checksum equals checksum field value:
- not equal - error detected
- equal - no error detected. But maybe errors nonetheless? More later ….
Goal: detect errors ( i.e., flipped bits) in transmitted segment
Transport Layer: 3- 14
Cyclic Redundancy Check (CRC): example We want: D . 2 r XOR R = nG
- Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ D . 2 r G R = remainder [ ] or equivalently: D . 2 r = nG XOR R or equivalently: if we divide D . 2 r by G, want remainder R to satisfy: 1 0 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 D R 1 0 0 1
G
1 0 1 1 1 0 0 0 0 2 r
1 0 1
Link layer, LANs: roadmap
▪ a day in the life of a web
request
▪ introduction
▪ error detection, correction
▪ multiple access protocols
▪ LANs
- addressing, ARP
- Ethernet
- switches
- VLANs
▪ link virtualization: MPLS
▪ data center networking
Multiple access protocols
▪ single shared broadcast channel
▪ two or more simultaneous transmissions by nodes: interference
- collision if node receives two or more signals at the same time ▪ distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit ▪ communication about channel sharing must use channel itself! - no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
given: multiple access channel (MAC) of rate R bps
desiderata:
- when one node wants to transmit, it can send at rate R.
- when M nodes want to transmit, each can send at average rate R/M
- fully decentralized:
- no special node to coordinate transmissions
- no synchronization of clocks, slots
- simple