Computer Networks - Chapter 5 - Data Link Layer
Computer Networks - Chapter 5 - Data Link Layer
of CSE, UIU
CHAPTER 5
Data Link Layer
5.5 Ethernet
5.5.1 Ethernet Frame Structure
5.5.2 CSMA/CD: Ethernet's Multiple Access Protocol
5.5.3 Ethernet Technologies
MAC Table
Exercise 1:
Consider the figure below. The IP and MAC addresses are shown for nodes A, B, C and D, as well as
for the router's interfaces. Consider an IP datagram being sent from node C to node A.
ii. Consider an ARP request send by node C. Which IP address will respond to the request?
iii. Now, the ARP table is filled up. For the data packet from C-to-A, what are the MAC source
and destination address and IP source and destination addresses at points (6), (4), (2), and
(1)?
Exercise 2:
Let’s consider the operation of a learning switch in the context of a network in which 6 nodes labeled
A through F are star connected into an Ethernet switch. Suppose that (i) B sends a frame to E, (ii) E
replies with a frame to B, (iii) A sends a frame to B, (iv) B replies with a frame to A. The switch table is
initially empty. Show the state of the switch table before and after each of these events. For each of
these events, identify the link(s) on which the transmitted frame will be forwarded, and briefly justify
your answers.
E replies with a
frame to B
A sends a frame to B
B replies with a
frame to A
Knowledge Test # 1
Q.1 Describe 6 (six) data link layer services.
Q.2 Why Multiple Access Protocols (MAC) are used? Describe 3 (three) basic categories of MAC
protocols (Channel partitioning, random access and taking turns).
5.5 Ethernet
Exercise 3:
Consider the figure below. Now, we replace the router between subnets 1 and 2 with a switch S1, and
label the router between subnets 2 and 3 as R1.
a. Consider sending an IP datagram from Host E to Host F. Will Host E ask router R1 to help
forward the datagram? Why? In the Ethernet frame containing the IP datagram, what are the
source and destination IP and MAC addresses?
b. Suppose E would like to send an IP datagram to B, and assume that E’s ARP cache does not
contain B’s MAC address. Will E perform an ARP query to find B’s MAC address? Why? In
the Ethernet frame (containing the IP datagram destined to B) that is delivered to router R1,
what are the source and destination IP and MAC addresses?
c. Suppose Host A would like to send an IP datagram to Host B, and neither A’s ARP cache
contains B’s MAC address nor does B’s ARP cache contain A’s MAC address. Further
suppose that the switch S1’s forwarding table contains entries for Host B and router R1
only. Thus, A will broadcast an ARP request message. What actions will switch S1 perform
once it receives the ARP request message? Will router R1 also receive this ARP request
message? If so, will R1 forward the message to Subnet 3? Once Host B receives this ARP
request message, it will send back to Host A an ARP response message. But will it send an
ARP query message to ask for A’s MAC address? Why? What will switch S1 do once it
receives an ARP response message from Host B?
CSMA/CD
Exercise 4:
Two hosts, A and B, are connected to an Ethernet Network along with some other hosts. Host A
wishes to send frame aandhost B wants to send frame bto some other hosts on the Ethernet.
Suppose that host A has had 5 collisions while trying to send frame a (with some hosts other than host
B) and host B has had 3 collisions while trying to send frame b (with some hosts other than host A). At
time T, only hosts A and B are the ones that are ready to transmit some data. All other hosts remain
idle.
a. What is the maximum number K that A & B can get to calculate waiting time for
retransmission?
b. If bit time is 1 µs, K= 10 for A, K = 5 for B, calculate waiting times for both A and B.
Knowledge Test # 2
Q.1 What is Ethernet?
Q.3 Consider Figure 5.33. Now we replace the router between subnets 2 and 3with a switch S2, and
label the router between subnets 1 and 2 as R1.
a. Consider sending an IP datagram from Host E to Host F. Will Host E ask router R1 to help forward the
datagram? Why? In the Ethernet frame containing the IP datagram, what are the source and destination IP and
MAC addresses?
b. Suppose Host E would like to send an IP datagram to Host B, and assume that E’s ARP cache does not
contain B’s MAC address. Will E perform an ARP query to find B’s MAC address? Why? In the Ethernet frame
(containing the IP datagram destined to B) that is delivered to router R1, what are the source and destination IP
and MAC addresses?
c. Suppose Host A would like to send an IP datagram to Host B, and neither A’s ARP cache contains B’s
MAC address nor does B’s ARP cache contain A’s MAC address. Further suppose that the switch S1’s (switch
connecting A and B) forwarding table contains entries for Host B and router R1 only. Thus, A will broadcast an
ARP request message.
i. What actions will switch S1 perform once it receives the ARP request message?
ii. Will router R1 also receive this ARP request message? If so,will R1 forward the message to Subnet 2?
iii. Once Host B receives this ARP request message, it will send back to Host A an ARP response message.
But will it send an ARP query message to ask for A’s MAC address? Why?
iv. What will switch S1 do once it receives an ARP response message from Host B?