Data Link Layer! Multiple Access Problem!
Data Link Layer! Multiple Access Problem!
The Data Link layer can be further subdivided into:! Broadcast channel of rate R bps, shared medium!
1.! Logical Link Control (LLC): error and flow control! •! if two users send at the same time, collision results in no packet
2.! Media Access Control (MAC): framing and media being received (interference)!
application
access! •! if no users send, channel goes idle!
different link protocols may provide different services, •! thus, want to have only one user send at a time!
e.g., Ethernet doesn’t provide reliable delivery (error transport
recovery)!
network Media Access Control: !
MAC topics:! •! determines who gets to send next!
LLC •! what to do if more than one hosts "
•! framing and MAC address assignment!
MAC send at the same time and there’s collision!
•! LAN forwarding!
•! IP to MAC address resolution! physical
•! IP to MAC: Address Resolution Protocol (ARP)!
Duplex mode:!
•! MAC to IP: Reverse ARP (RARP), BOOTstrap Protocol •! half duplex: only one end can send at a time!
(BOOTP), Dynamic Host Configuration Protocol (DHCP)! •! full duplex: both ends can send simultaneously!
•! media access control!
•! within ! time after the transmission " Answer: sender must hold carrier for 2! period, "
of a frame (t), all nodes on the segment " i.e., it must be transmitting for the whole 2! "
would have sensed carrier! t +! period each Ethernet frame must be at "
•! worst case scenario for collision: " least 2! *linkspeed long!
what if
a node at the other end of the wire " transmission
ends here?!
starts transmitting at time!t + ! " # t +! "# Example:!
•! the node closest to the collision sends " •! 10 Mbps Ethernet allows maximum of 5 segments, each 500 m long!
out a jamming signal to ensure collision " Comer!
•! speed of light 3x108m/s, but coax propagation 2x108m/s!
is detected by the other node! t + 2!
Peterson & Davie! •! round-trip propagation delay ( 2! ) on 2.5 km coax is 25 µsecs!
•! it takes another ! period for the collision to get back to the original •! allowing for 4 repeaters makes end-to-end delay 50 µsecs!
sender! •! 50 µsecs means 62.5 bytes!
Hence the original sender must listen for 2! period! •! 802.3 standard requires stations to hold carrier for "
64 bytes/10 Mbps = 51.2 µsecs!
CSMA/CD Efficiency ( ! )! Repeaters and Bridges!
tprop = max propagation time between 2 nodes in the LAN! Each Ethernet segment is limited to 500 m long by signal
ttrans = time to transmit maximum-size frame! attenuation!
Repeaters: repeat and strengthen signal (physical layer)!
ttrans 1 Ethernet only allows 4 repeaters: max 2.5 km. Why?!
!= =
ttrans + 5t prop 1 + 5t prop / ttrans
Bridges: equivalence of routers at the data link layer!
! " 1 as t prop " 0 or as ttrans " # •! forward frames between segments!
•! unlike routers, only know whether a node is in a segment!
•! does not propagate interference and collisions (must buffer)!
•! increase effective/aggregate bandwidth of a LAN by taking
min frame size
Tanenbaum! advantage of spatial locality!
•! can connect segments with different MAC protocols"
twisted pair!
Halsall!
•! small amount of additional info to carry: one additional 16-bit or 32-bit server that has been up 40 days:! ethernet! (CRC) 446! 1.7x108!
integer! IP! 14! 1.7x108!
UDP! 5! 1.4x108!
TCP! 350! 3x107!
Usually, you just look up a commonly used G, e.g., Ethernet uses CRC-32!
CRC-32: 100000100110000010001110110110111!
CRC-CCITT: 10001000000100001!
Peterson & Davie!
Link Layer Services! Link Layer Services!
Half-duplex and full-duplex!
•! with half duplex, nodes at both ends of link can transmit, but not
at same time! Error Correction: !
•! receiver identifies and corrects bit error(s) without resorting to
Framing, link access: ! retransmission!
•! encapsulate datagram into frame, adding header, trailer!
•! channel access if shared medium! Flow Control: !
•! “MAC” addresses used in frame headers to identify source, dest ! •! pacing between adjacent sending and receiving nodes!
•! different from IP address!!
Reliable delivery between adjacent nodes!
Error Detection: ! •! seldom used on low bit error link (fiber, some twisted pair)!
•! errors caused by signal attenuation, noise. ! •! wireless links: high error rates!
•! receiver detects presence of errors: ! •! Q: why both link-level and end-end reliability?!
•! signals sender for retransmission or drops frame!