Download presentation
1
EEC-484/584 Computer Networks
Discussion Session for Data Link Layer Wenbing Zhao
2
EEC-484/584: Computer Networks
Reminder Wiki project: Peer review due midnight today! Quiz #4 (Lecture 12-14, Lab 5) Wednesday, May pm 4/16/2017 EEC-484/584: Computer Networks
3
EEC-484/584: Computer Networks
Q1. The following character encoding is used in a data link protocol: A: ; B: ; FLAG: ; ESC: 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 4/16/2017 EEC-484/584: Computer Networks
4
EEC-484/584: Computer Networks
Q1.Solution: (a) 4 characters in the frame, so prefix and 5, i.e., (b) FLAG A B ESC ESC ESC FLAG FLAG, i.e., (FLAG) (A) (B) (ESC) (ESC) (ESC) (FLAG, in original frame) (FLAG) (c) 4/16/2017 EEC-484/584: Computer Networks
5
EEC-484/584: Computer Networks
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? 4/16/2017 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 is to be transmitted using the standard CRC method described in the text. The generator polynomial is x 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 The generator is The message after appending three zeros is The remainder on dividing by 1001 is 100. So, the actual bit string transmitted is The received bit stream with an error in the third bit from the left is 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
EEC-484/584: Computer Networks
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? 4/16/2017 EEC-484/584: Computer Networks
10
EEC-484/584: Computer Networks
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 4/16/2017 EEC-484/584: Computer Networks
11
EEC-484/584: Computer Networks
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? 4/16/2017 EEC-484/584: Computer Networks
12
EEC-484/584: Computer Networks
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 4/16/2017 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 D I B C G H E Q: show switch tables and frame forwarding in S1, S2, S3, S4 4/16/2017 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.