Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Data Link Layer Moving Frames

2 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

3 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

4 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

5 Error Detection

6 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

7 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

8 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

9 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

10 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

11 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%

12 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

13

14 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

15 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

16 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…)

17 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

18 A B We want to get a frame from A to B If our link address is 49-BD … we will never get out of 111 subnet We have to use router’s E6-E9 address first (with IP 222.222)

19 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

20 Ethernet Ethernet has taken over the wired LAN market Bob Metcalf’s original bar napkin:

21 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

22 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

23 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]

24 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

25 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)

26

27 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

28 Now have three collision domains, thanks to switch

29 A to A’ at 10 B to B’ at 10 C to C’ at 10 for total of 30Mbps

30 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)


Download ppt "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."

Similar presentations


Ads by Google