1 / 36

Data Link Layer

Data Link Layer. Application. Transport. Network. Data Link. Physical. Introduction to DLL. Receives service from physical layer and provides service to the network layer. Two models Internet model and IEEE model Responsible for carrying data from one hop to the next hop.

nia
Download Presentation

Data Link Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Link Layer

  2. Application Transport Network Data Link Physical Introduction to DLL • Receives service from physical layer and provides service to the network layer. • Two models • Internet model and IEEE model • Responsible for carrying data from one hop to the next hop. • Packet integrity. • Flow control. • Access control. • Examples of LL protocol • Ethernet, token ring, FDDI, ATM Media access control(MAC) Data Link layer Logical Link control Physical Layer Physical Layer Transmission medium IEEE Internet

  3. Services Provided by LL • Framing and Link access – • frame has data filed+header; NL datagram is placed in data field, header includes physical address. Point-to-point, shared • Reliable delivery • Acknowledgement and transmission • Flow control • Prevents from loosing pkts • Error detection & detection • Detection is implemented in HW, ATM provides correction of Header field only. • Half-duplex & Full-duplex

  4. Error detection and correction • Parity checks • 2-D Single bit • Checksumming • Internet CS 16 bit integers • Cyclic Redundancy Check • Generator G is r+1 bit pattern with msb 1; 1001 if r=3. • For a given d-bit data, D, sender will choose r additional bits, R, and append them to D such that resulting d+r bit pattern is exactly divisible by G using modulo 2 arithmetic. • All CRC calculation are done mod 2 arithmatic without carries or borrows. This is identical to XOR operation. d bits r bits D: data bits to be sent R:CRC D*2r XOR R

  5. Example 1010 xor 1001=0011 Again, 0011 xor 1001=1010 Let D = 101110, d=6 and G =1001, r = 3. The nine bits transmitted here is 101110 011. D.2r = 101110000.

  6. Medium access control • Network links: • Point – to – point: PPP and HDLC • Broadcast – Ethernet • Multiple access problem • MA protocol category • Channel partitioning • Random access • Taking turn • A MA protocol for a broadcast channel of rate R bps sud have the following charac: • When one node is active, throughput is R bps. • For M nodes, each has avrg R/M bps over some suitable interval of time. • Decentralized, no master node. • Simple and inexpensive.

  7. Channel partitioning • TDM • Time frame, N time slots. • Perfectly fair, avoids collisions. • Poor BW utilization. • FDM • Avoids collisions but poor BW utilization. • CDMA • CDMA code, orthogonal • Chip rate is much faster than transmission rate. • Encoding, Zi,m=di.cm • Decoding,

  8. Random Access • When there is a collision a sender waits for random length of time and retransmits the frame • Aloha: slotted, unslotted (pure) • Pure ALOHA efficiency 1/2e =0.184. • Slotted efficiency max. = 0.368 • CSMA – ethernet.

  9. ALOHA Will overlap with end of i’s frame • Fully decentrlized. • When a frame first arrives, the node immediately transmits the entire frame. If the frame experiences a collision with one or more frames, it then immediately retransmits the frame with probability p. Otherwise, the node waits for a frame time. After this wait the node retransmits the frame with probability p, or waits for another frame time with probability 1-p. Node i Will overlap with start of i’s frame to- 1 to to +1 probability that only one node put frame at time t0 = Thus the probability that given node is successful is

  10. Pure ALOHA • Let users transmit whenever they have data to be sent. • If two packets collide in the medium, both will retransmit their packet after a random delay • What is the efficiency of pure ALOHA.? • Infinite users. • t = frame time. • new frames generated per t according to Poisson distribution with mean N frames. If N>1 there will be collision for almost every frame. So, 0<N<1. • Let, k transmission attempts including new and retransm packet are done per t with mean G frames/t. • For low load N≈0, few collision, therefore, G≈N. • At high load GN. • Probability of zero frame is generated per frame time, Pr[0] = P0 = e-G. t0 t0+t t0+2t t0+3t

  11. Under all load, throughput S = GP0, where P0 is the success probability of a frame. Collision occurs if a frame is transmitted within t0 to t0+t or within t+t0 to t+2t0; i.e collision occurs in 2 frame times long with mean 2G. No other frame is generated within 2 frame time is P0= e-2G. Throughput S = Ge-2G. At G=0.5, S = 1/2e = 0.184. that is best channel utilization is 18.4%.

  12. Slotted ALOHA • When the node has a new frame, it waits until the beginning of the next slot and transmit the entire frame in the slot. • If there isn’t a collision, the node has successful transmission. • If there is a collision, the node detects the collision before the end of the slot. The node retransmit its frame in each subsequent slot with probability p until the frame is successfully transmitted.

  13. 1 1 1 1 2 2 2 3 3 3 C E C S E C E S S • collision period is t, i.e. one frame time. Therefore, probability that no other traffic is sent during the same slot time is, e-G. So, throughput = Ge-G. • At G=1, S = 0.368. • If the probability that a frame avoid collision is e-G. then probability that it suffers a collision is 1-e-G. then probability that k attempts require for a successful transmission is • Expected number of transmissions per frame time,

  14. Carrier sense multiple access Wait random time… Sense carrier • Listen before talk. • No detection. • Non-persistent. • Persistent. • 1 persistent • p persistent yes Busy? no Non-persistent Send the frame Sense carrier Sense carrier yes yes Busy? Busy? no no Send the frame with probability p Send the frame with probability 1 persistent

  15. CSMA • Persistent • 1 persistent: Stations continually checks the channel. If the channel is free sends frame instantly. • the longer the propagation delay the worse the performance of the protocol. • Even when the delay is 0, collision can be happed. If two stations become ready in the middle of the transmission of a third one, both with start transmitting as soon as they find the channel empty after the 3rd stations transmission is over. • p- persistent: when a station is has data to send, it senses the channel. If it is idle, it transmits with probability p. otherwise it defers to the next slot with probability q = 1-p. the process repeat until either the frame has been transmitted or another station has begun transmission. • Nonpersistent • If the channel is busy the station does not continually check it for detecting the end of ongoing transmission. It waits for a random time then checks the channel. If the channel is idle, sends the frame.

  16. A B C D t0 t1 t CSMA/CD • First listen, if the line is busy, backoff. • If collision occurs, abort the transmission. • waits a random period of time, and then tries again. • Why collision.

  17. CSMA/CD Flowchart start • Exponential backoff, e.g 2Nx max_prop_time. Set backoff To zero Persistent strategy Wait backoff time Send the frame no yes Collision? Backoff Limit? Increment backoff Send jam signal no yes abort success

  18. CSMA/CA start Set backoff To zero • Used in wireless LAN. Persistent strategy Wait IFG time Wait backoff time Wait a random time Send the frame Set a timer no no Backoff Limit? ACk recvd before timeout? Increment backoff yes yes success abort

  19. Controlled access • Reservation • Polling.

  20. Token passing • Token ring • Wait for a token • Captures the token. • If it has data frame to send, then send it. • If allocated time is expired, remove the token, else send more frames. • FDDI • The same as token ring, but token is removed by the destination.

  21. LAN • Local Area Networks, one broadcast channel. • LAN address or Physical Address, 48 bits, unique. • IEEE manages LAN address. Assigns MS 24 bits. • Most dominant technology is Ethernet.

  22. Address Resolution Protocol • A table that resolves LAN address to IP. • ARP frame is broadcasted (LAN add FF-FF-FF-FF) to get the LAN address of a particular computer with a given IP.

  23. LAN operation FF-2C-CC-FF-AD-03 111.111.111.110 222.222.222.113 FF-2C-CC-00-0D-01 111.111.111.111 FF-2C-CC-00-0D-02 FF-2C-CC-A2-0D-03 111.111.111.115 111.111.111.112 FF-2C-CC-00-0D-03 111.111.111.113 FF-2C-CC-FF-0D-03 FF-2C-CC-00-0D-04 222.222.222.110 111.111.111.114 FF-2C-CC-00-0D-05 Routing table ARP query packt uses LAN broadcast address

  24. Ethernet • Ethernet was developed in 1976 at Xerox's Palo Alto Research Center. • Data Link Layer • Logical Link control sublayer. • Machine Access Control sublayer. • LAN topology • Bus or star • MAC sublayer • Governs the access method. • Access method: traditional Ethernet uses 1-persistent CSMA/CD. • Ethernet Frame • Preamble (7 bytes).- alternating 0, 1 • Start Field delimiter (1). - 10101011 • Destination Address (6). • Source Address (6). • Length/type of protocol data unit (PDU) (2). For <1518 it defines the length. If >1536 it defines type • Data and padding (min 46, max 1500) . • CRC (4).

  25. Ethernet frame Length • Min frame length is 64 bytes, required for correct operation of CSMA/CD. • Max. frame length is 1518 bytes. • Ethernet provided unreliable connection-less service: no handshaking, no ackn.

  26. Ethernet Address • Embeded into the Network Interface Card (NIC). • 6-bytes. • Expressed in hex notation.e.g. 06-01-02-01-2C-4B. • Unicast or multicast • LSB of the first byte 0: unicast. • LSB of the first byte 1: multicast.

  27. Physical Layer Signaling • Uses Manchester encoding. • Includes a transition in the middle of each bit. • Helps synchronize sender and recvr. To transceiver Manchester encoder From MAC From transceiver Manchester Decoder To MAC

  28. Ethernet CSMA/CD operation • Adapter obtains a network-layer PDU from its parent node, prepares an ethernet frame, and puts the frame in the adapter buffer. • If the adapter senses that the channel is idle (i.e. der is no signal energy from other channel), it starts to transmit the frame. If the adapter senses that the channel is busy, it waits until it senses no signal energy plus 96 bits time and then transmits the frame. • While transmitting, the adapter monitors for the presence of signal energy from other apaters. If the adapter finds some signal energy from other sources before completing its transmission, it aborts instantly and sends a 48 bit jam signal. • After aborting, the adapter enters into a backoff phase. Specifically, when transmitting a given frame, after experiencing the n collision in for this frame, the adapter chooses a value for K at random from {0,1,2, . . ., 2m-1} where m:= min(n,10).i The adapter then waits K.512 bit times and then returns to step to.

  29. Efficiency • Efficiency drops when number of nodes increases. • Let tpropdenote the max prop delay, ttran be the time to transmit maximum size ethernet frame (approx 1.2 ms for 10Mbps). The efficiency,

  30. Ethernet technologies • 10Base2 • Coaxial cable, bus topology, 10 Mbps • Max node distance is 200m (actually 185m) • 10BaseT • Twisted pair copper wire, star topology, 10Mbps. Max length betwn two nodes=200m • 100BaseT • Category -5 cable, use4B5B encoding • Gigabit Ethernet • Both fiber and twisted-pair

  31. Hubs • Multi-tier, stacked hub connections • LAN segment • Collision domain. • Restrictions on max. number of nodes in a collision domain, max distance between two nodes, max number of stacking

  32. Bridge • Division of LAN by Bridge. • Raises Bandwidth. • Separate collision domain. • Bridge filtering and forwarding is done by bridge table. • Performs CSMA/CD. • No theoretical limit on the geographical reach. • Bridge may connect Wireless LAN with Ethernet.

  33. Switched Ethernet • It is like multiport high performance bridge. Makes N separate collision domain . • Usually bridges have small number of interfaces (2-4), but switches have dozens.

  34. Spanning tree bridges

  35. Data Communication and Networking by Behrouz A. Forouzan

More Related