data link layer moving frames. link layer protocols: ethernet, 802.11 wireless, 802.5 token ring and...
TRANSCRIPT
![Page 1: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/1.jpg)
Data Link Layer
Moving Frames
![Page 2: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/2.jpg)
Link Layer
• Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP
• Has node-to-node job of moving network layer datagrams over a single link in the path
• Protocol implemented in adapter/NIC
![Page 3: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/3.jpg)
Possible services
• Framing: encapsulate network datagram into frame
• Link Access: Medium Access Control protocol describes who gets access when
• Reliable delivery: wireless links need this
• Flow control: response to limited buffering
• Error detection: done in hardware
• Half-duplex and full-duplex
![Page 4: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/4.jpg)
Error Detection
• Parity check: use one bit; detects odd number of errors (even number undetected)
• Two dimensional parity: can detect and correct any one error
![Page 5: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/5.jpg)
Error Detection
![Page 6: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/6.jpg)
Cyclic Redundancy Check
• CRC codes also known as polynomial codes
• Agree on generator, G
• For given data D, choose r additional bits such that the resulting d+r bit pattern is exactly divisible by G
![Page 7: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/7.jpg)
Multiple Access Protocols
• Broadcast link: more than one node on the (shared) channel wants to use the channel
• Categories:– Channel partitioning– Random access– Taking-turns
• S
![Page 8: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/8.jpg)
Channel Partitioning
• TDM divides time into sections and further divides sections into (N) time slots; channel rate is R bps
• Eliminates collisions and is perfectly fair
• But: a node is limited to an average rate of R/N even if only node transmitting
• But: a node must always wait for its turn, even if only node transmitting
![Page 9: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/9.jpg)
Code Division Multiple Access
• CDMA
• Assign a different code to each transmitting node; encode data bits; receiver can sort out correct transmission
• Used in wireless channels
![Page 10: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/10.jpg)
Random Access
• Transmitting node at full channel rate• If collision, retransmit packet until packet
gets through without collision• Slotted ALOHA
– Node waits for beginning of next slot; transmits packet
– No collision; transmit another packet– Collision; retransmit [randomly] until success
• 1970
![Page 11: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/11.jpg)
8
After all the math, the maximum efficiency of the protocol is 37% of Slots do useful work
In pure ALOHA, efficiency drops to 18%
![Page 12: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/12.jpg)
Carrier Sense Multiple Access
• Listen before sending (carrier sensing)
• If collision, stop sending (collision detection)
• There are a lot of these that have been proposed
![Page 13: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/13.jpg)
![Page 14: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/14.jpg)
Taking-Turns Protocols
• Polling Protocol– Master node– Master polls each node in round-robin fashion– If master fails, the whole channel goes down
• Token-passing protocol– Small, special purpose frame = token– Can send frames if node has the token– Decentralized and highly efficient
![Page 15: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/15.jpg)
MAC addresses
• Not the node, but the (NIC) adapter that has a link-layer address– LAN address– Physical Address– MAC address
• Permanent – burned into ROM• 6 bytes long; 3 for manufacturer, 3 for
adapter – expressed in Hex notation• IEEE manages address space
![Page 16: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/16.jpg)
Addressing
• Frame includes destination MAC address
• Each adapter on LAN sees each frame– If address is a match, adapter sends frame up
the protocol stack in parent node– If address is not a match, adapter discards
frame
• Broadcast address is all ones (FF FF…)
![Page 17: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/17.jpg)
Address Resolution Protocol
• We have both network addresses (IP) and link addresses (MAC); ARP does translation
• On same LAN
• ARP table stored in RAM
• TTL typically 20 minutes
• ARP query sent in broadcast frame; response in a standard frame
![Page 18: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/18.jpg)
A
B
We want to get a frame from A to BIf our link address is 49-BD … we will never get out of 111 subnetWe have to use router’s E6-E9 address first (with IP 222.222)
![Page 19: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/19.jpg)
Dynamic Host Configuration Protocol
• DHCP is a client/server protocol– Client is newly arriving host
• DHCP server discovery– UDP packet to port 67– Destination address 255.255 and source 0.0 (this host)– Frame has FF-FF destination address
• DHCP server offer(s)– Includes lease time– Link layer frame containing the IP datagram containing the UDP
segment containing the DHCP offer message is then sent
• DHCP request by client• DHCP ACK to client
![Page 20: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/20.jpg)
Ethernet
• Ethernet has taken over the wired LAN market
• Bob Metcalf’s original bar napkin:
![Page 21: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/21.jpg)
Ethernet Frame
• The sending adapter encapsulates the IP datagram within an ethernet frame and passes the frame to the physical layer…
• Preamble: 8 bytes, seven of 10101010 and one of 10101011
• Destination address: 6 bytes• Source address: 6 bytes (MAC address)• Type: IP, IPX, AppleTalk, ARP• Data: 46-1500 bytes• Cyclic Redundancy Check: 4 bytes
![Page 22: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/22.jpg)
Ethernet
• Uses baseband transmission
• Connectionless service (like IP’s datagram and UDP’s segment)
• Unreliable service: adapter B runs CRC check; if pass frame handed to network layer; if fail, frame is discarded; no message back to adapter A
![Page 23: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/23.jpg)
CSMA/CD
• An adapter may begin to transmit at any time (provided the channel is clear)
• Adapter never transmits when it senses that some other adapter is (carrier sense)
• Adapter aborts transmission as soon as it detects another adapter transmitting (collision detection) – sends 48-bit jam signal
• Before attempting retransmission, adapter waits a random time (typically small) [exponential backoff]
![Page 24: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/24.jpg)
Ethernet Technologies
• Most common are 10BaseT and 100BaseT which use twisted pair copper wire in a star/bus topology
• Two wires for transmit; two for receive
• T is for twisted pair
• Maximum cable length is 100 meters
![Page 25: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/25.jpg)
Hubs
• Physical layer device: simply senses bits and amplifies the signal to all ports
• Extends the collision domain
• Can also extend the reach of a LAN by 100 meters each
• Can only connect similar-speed LANs (10- or 100BaseT)
![Page 26: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/26.jpg)
![Page 27: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/27.jpg)
Switches
• Operate on ethernet frames – layer 2 devices
• Forward frames based on LAN destination addresses
• Switch does not have MAC addresses• Thanks to buffers, can connect differing
technologies (10Base2, 10BaseT, 100BaseT)
• Switches are self-learning
![Page 28: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/28.jpg)
Now have three collision domains, thanks to switch
![Page 29: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/29.jpg)
A to A’ at 10B to B’ at 10C to C’ at 10 for total of 30Mbps
![Page 30: Data Link Layer Moving Frames. Link Layer Protocols: ethernet, 802.11 wireless, 802.5 Token Ring and PPP Has node-to-node job of moving network layer](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c1715f/html5/thumbnails/30.jpg)
Point-to-Point Protocol
• Used between modem and ISP; still have a lot of that
• Flag field• Address field (only 11111111)• Control field (only 11)• Protocol field (IP, AppleTalk, DECnet)• Information (packet)• Checksum (2 or 4 byte CRC)