1 / 17

EEC-484/584 Computer Networks

This discussion session covers various framing methods used in data link protocols, including character count, flag bytes with byte stuffing, and starting and ending flag bytes with bit stuffing. It also explores error-detecting coding schemes and the use of CRC for error detection.

mfish
Télécharger la présentation

EEC-484/584 Computer Networks

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. EEC-484/584Computer Networks Discussion Session for Data Link Layer Wenbing Zhao wenbingz@gmail.com

  2. Reminder • Wiki project: • Peer review due midnight today! • Quiz #4 (Lecture 12-14, Lab 5) • Wednesday, May 12 6-8pm EEC-484/584: Computer Networks

  3. Q1. The following character encoding is used in a data link protocol: A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000 Show the bit sequence transmitted (in binary) for the four-character frame: A B ESC FLAG when each of the following framing methods are used: (a) Character count. (b) Flag bytes with byte stuffing. (c) Starting and ending flag bytes, with bit stuffing EEC-484/584: Computer Networks

  4. Q1.Solution: (a) 4 characters in the frame, so prefix and 5, i.e., 00000101 00000101 01000111 11100011 11100000 01111110 (b) FLAG A B ESC ESC ESC FLAG FLAG, i.e., 01111110 (FLAG) 01000111 (A) 11100011 (B) 11100000 (ESC) 11100000 (ESC) 11100000 (ESC) 01111110 (FLAG, in original frame) 01111110 (FLAG) (c) 01111110 01000111 110100011 111000000 011111010 01111110 EEC-484/584: Computer Networks

  5. Q2. To provide more reliability than a single parity bit can give, an error-detecting coding scheme uses one parity bit for checking all the odd-numbered bits and a second parity bit for all the even-numbered bits. What is the Hamming distance of this code? 1/1/2020 EEC-484/584: Computer Networks Wenbing Zhao

  6. Q2 Solution • Making one change to any valid character cannot generate another valid character • Due to the nature of parity bits, making two changes to even bits or two changes to odd bits will give another valid character, so the distance is 2

  7. Q3. A bit stream 10011101 is to be transmitted using the standard CRC method described in the text. The generator polynomial is x3 + 1. Show the actual bit string transmitted. Suppose the third bit from the left is inverted during transmission. Show that this error is detected at the receiver's end.

  8. Q3. Solution: • The frame is 10011101. The generator is 1001. The message after appending • three zeros is 10011101000. The remainder on dividing 10011101000 by • 1001 is 100. So, the actual bit string transmitted is 10011101100. The • received bit stream with an error in the third bit from the left is 10111101100. • Dividing this by 1001 produces a remainder 100, which is different from zero. • Thus, the receiver detects the error and can ask for a retransmission.

  9. Q4. An IP packet to be transmitted by Ethernet is 60 bytes long. Is padding needed in the Ethernet frame, and if so, how many bytes? EEC-484/584: Computer Networks

  10. Q4. Solution The minimum Ethernet frame is 64 bytes, including both addresses in the Ethernet frame header, the type/length field, and the checksum Since the header fields occupy 18 bytes and the packet is 60 bytes, the total frame size is 78 bytes, which exceeds the 64-byte minimum Therefore, no padding is used EEC-484/584: Computer Networks

  11. Q5. Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size? EEC-484/584: Computer Networks

  12. Q5. Solution For a 1-km cable, the one-way propagation time is 5 μsec, so 2 = 10 μsec To make CSMA/CD work, it must be impossible to transmit an entire frame within this interval At 1 Gbps, all frames shorter than 10,000 bits can be completely transmitted in under 10 μsec So the minimum frame is 10,000 bits or 1250 bytes EEC-484/584: Computer Networks

  13. Q6. Self-Learning Multi-Switch Suppose C sends frame to I, I responds to C S4 1 S1 2 S3 S2 A F I D C B H G E • Q: show switch tables and frame forwarding in S1, S2, S3, S4 EEC-484/584: Computer Networks

  14. Q6. Solution • S1 • When frame from C arrived, S1 floods it on all interfaces except S1-C. • In the mean time, it adds an entry in its switch table: <C, 3, ttl> • When the frame from I arrived, S1 forward it directly to C on interface 3 • Also, S1 adds an entry in its switch table: <I, 4, ttl>

  15. S4: • When it receives the frame from C, S4 adds an entry in its switch table: <C, 1, ttl> • S4 then floods the frame to all other interfaces (2 and 3) • When the frame from I arrives at S4, S4 adds an entry in its switch table: <I, 3, ttl> • Since frame from I is for destination C, and there is already an entry for C in the switch table, S4 directly forward the frame to interface 1

  16. S2: • When it receives the frame from C, S2 adds an entry to its switch table: <C,4, ttl> • It then floods the frame to all other interfaces • It won’t receive the frame from I!

  17. S3: • When it receives the frame from C, it adds an entry: <C, 4, ttl> • It then floods the frame to all other interfaces • When it receives the frame from I, it adds another entry: <I, 3, ttl> • It then forward the frame directly to 4 since there is an entry for C in its switch table

More Related