SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
The Link Layer: Links,access Networks, And Lans
Exercise:
Problems
Question:14 | ISBN:9780132856201 | Edition: 6

Question

Consider three LANs interconnected by two routers, as shown in Figure 5.33. a. Assign IP addresses to all of the interfaces. For Subnet 1 use addresses ofthe form 192.168.1.xxx; for Subnet 2 uses addresses of the form 192.168.2.xxx; and for Subnet 3 use addresses of the form 192.168.3.xxx.

b. Assign MAC addresses to all of the adapters.

c. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables are up to date. Enumerate all the steps, as done for the single- outer example in Section 5.4.1.
d. Repeat (c), now assuming that the ARP table in the sending host is empty

(and the other tables are up to date).

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

a)

To assign IP addresses to the interfaces in the three LANs, following the given format:

Subnet 1:

  • Router 1 Interface 0: 192.168.1.1
  • Host A: 192.168.1.2
  • Host B: 192.168.1.3

Subnet 2:

  • Router 1 Interface 1: 192.168.2.1
  • Router 2 Interface 0: 192.168.2.2
  • Host C: 192.168.2.3
  • Host D: 192.168.2.4

Subnet 3:

  • Router 2 Interface 1: 192.168.3.1
  • Host E: 192.168.3.2
  • Host F: 192.168.3.3

 

b)

Assigning MAC addresses to the adapters:

  • Router 1 Interface 0: MAC_A
  • Router 1 Interface 1: MAC_B
  • Router 2 Interface 0: MAC_C
  • Router 2 Interface 1: MAC_D
  • Host A: MAC_E
  • Host B: MAC_F
  • Host C: MAC_G
  • Host D: MAC_H
  • Host E: MAC_I
  • Host F: MAC_J

 

c)

Steps for sending an IP datagram from Host E to Host B:

  1. Host E checks its ARP table to find the MAC address for 192.168.3.1 (Router 2 Interface 1). Suppose the MAC address is MAC_D.
  2. Host E encapsulates the IP datagram destined for Host B inside an Ethernet frame.
    • Source IP: 192.168.3.2 (Host E's IP address)
    • Destination IP: 192.168.1.3 (Host B's IP address)
    • Source MAC: MAC_I (Host E's MAC address)
    • Destination MAC: MAC_D (Router 2 Interface 1's MAC address)
  3. Host E sends the Ethernet frame onto its LAN.
  4. The Ethernet frame reaches Router 2 Interface 1.
  5. Router 2 checks its ARP table to find the MAC address for 192.168.1.3 (Host B). Suppose the MAC address is MAC_F.
  6. Router 2 encapsulates the received Ethernet frame inside a new Ethernet frame.
    • Source IP: 192.168.3.1 (Router 2 Interface 1's IP address)
    • Destination IP: 192.168.1.3 (Host B's IP address)
    • Source MAC: MAC_D (Router 2 Interface 1's MAC address)
    • Destination MAC: MAC_F (Host B's MAC address)
  7. Router 2 sends the new Ethernet frame onto its LAN.
  8. The Ethernet frame reaches Host B.
  9. Host B receives the frame, extracts the IP datagram, and processes it.

 

d)

Assuming the ARP table in the sending host (Host E) is empty:

  1. Host E checks its empty ARP table and realizes it doesn't have the MAC address for 192.168.3.1 (Router 2 Interface 1).
  2. Host E sends an ARP broadcast message:
    • Source IP: 192.168.3.2 (Host E's IP address)
    • Source MAC: MAC_E (Host E's MAC address)
    • Target IP: 192.168.3.1 (Router 2 Interface 1's IP address)
  3. The ARP broadcast reaches Router 2 Interface 1, which learns Host E's MAC address (MAC_E) from the ARP message.
  4. Router 2 Interface 1 sends an ARP unicast reply back to Host E:
    • Source IP: 192.168.3.1 (Router 2 Interface 1's IP address)
    • Source MAC: MAC_D (Router 2 Interface 1's MAC address)
    • Target IP: 192.168.3.2 (Host E's IP address)
    • Target MAC: MAC_E (Host E's MAC address)
  5. Host E receives the ARP reply, updates its ARP table, and now knows the MAC address of Router 2 Interface 1.
  6. Host E encapsulates the IP datagram destined for Host B inside an Ethernet frame.
    • Source IP: 192.168.3.2 (Host E's IP address)
    • Destination IP: 192.168.1.3 (Host B's IP address)
    • Source MAC: MAC_E (Host E's MAC address)
    • Destination MAC: MAC_D (Router 2 Interface 1's MAC address)
  7. Host E sends the Ethernet frame onto its LAN.
  8. The Ethernet frame follows the same steps as in part c from Step 4 onwards to reach Host B.
0 0

Discussions

Post the discussion to improve the above solution.