Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the network in Figure 1. Suppose that host A just connected to the netw

ID: 3709366 • Letter: C

Question

Consider the network in Figure 1. Suppose that host A just connected to the network and has an empty ARP table. Suppose that the ARP tables at other hosts are up to date.

a) How many subnets are there in this network? List the interfaces in each subnet (by their IP

address and MAC address).

b) Suppose A is a mobile host (e.g., laptop). How does A obtain its IP address? How does it obtain

its MAC address?

c) Suppose B is a server whose hostname is known to A. A wants to send a packet to B. How does A

know B’ IP address?

d) In the packet sent by A destined to B, what are the values of these header fields: MAC src, MAC

dest, IP src, IP dest?

e) How does A know the IP address of the left interface of R1 (i.e., IP3)? How does A know the MAC

address of this interface (i.e., MAC3)?

f) Repeat d) for the packet sent by R1 (i.e., the frame containing the A-to-B IP datagram that is

sent by R1).

R1 R2 IP 1 MAC1 IP7 ???7 IP4 MAC4 P6 MAC6 IP2 MAC2 IP3 MAC3 IP8 MAC8 ???5

Explanation / Answer

a) How many subnets are there in this network? List the interfaces in each subnet (by their IP address and MAC address).

Answer: There are three subnets in the network.

The interfaces in each subnet are as follows:

Subnet 1: Node A (IP1,MAC1), Node C (IP2, MAC2), R1's Left Interface (IP3,MAC3)

Subnet 2: R1's Right Interface (IP4,MAC4), R2's Left Interface (IP5,MAC5)

Subnet 3: R1's Right Interface (IP6,MAC6), Node B (IP7,MAC7) and Node D (IP8,MAC8)

-----------------------------------------------------------------------------------------------------------------------------------------------------

b) Suppose A is a mobile host (e.g., laptop). How does A obtain its IP address? How does it obtain its MAC address?

Answer: There is no need to obtain its own MAC address. The MAC address will be provided by the manufacturer and it is unique.

Node A will obtain its IP address by broadcasting a request to the DHCP server. The DHCP server will assign the IP addresses dynamically for the hosts in the network.

----------------------------------------------------------------------------------------------------------------------------------------------------

c) Suppose B is a server whose hostname is known to A. A wants to send a packet to B. How does A know B’ IP address?

Answer: Node A knows the hostname of Node B and needs to send a packet. Now, Node A will send an request to DNS server of the network. The DNS server will recieve the request from Node A, extracts the IP address of node B and gives it to node A. Now, using the IP address given by DNS server, Node A will send a packet to node B.

---------------------------------------------------------------------------------------------------------------------------------------------------------

d) In the packet sent by A destined to B, what are the values of these header fields: MAC src, MAC dest, IP src, IP dest?

Answer:

MAC Src: MAC1

MAC Dest: MAC7

IP Src: IP1

IP Dest: IP7

---------------------------------------------------------------------------------------------------------------------------------------------

e) How does A know the IP address of the left interface of R1 (i.e., IP3)? How does A know the MAC address of this interface (i.e., MAC3)?

Answer:

Node A will get to know the IP address of the left interface of R1 (i.e., IP3) with the help of Routing protocols and Routing Tables.

Once it identifies the IP address, To get the MAC of left interface of R1, It sends an ARP request and gets the MAC address. ARP maps the IP address to MAC address.

------------------------------------------------------------------------------------------------------------------------------------------------------

f) Repeat d) for the packet sent by R1 (i.e., the frame containing the A-to-B IP datagram that is sent by R1).

Answer:

MAC Src: MAC1

MAC Dest: MAC7

IP Src: IP1

IP Dest: IP7

It remains same, Router R1 will not modify the IP datagram header. It uses the header to route the packet to reach its destination.

-----------------------------------------------------------------------------------------------------------------------------------------------------