Working of ARP and IP Forwarding in LAN and Across A Router
Working of ARP and IP Forwarding in LAN and Across A Router
Working of ARP and IP Forwarding in LAN and Across A Router
(Reference: A good reference for this topic is Section 5.4.1: Link Layer Addressing and ARP, of the book,
Computer Networking, A Top-Down Approach, 6th Edition by Kurose and Ross)
9. The ARP table also contains a Time-to-live (TTL) value, which indicates when each
mapping will be deleted from the table.
The ARP message format is designed to accommodate layer two and layer three addresses
of various sizes. This diagram shows the most common implementation, which uses 32 bits
for the layer three (“Protocol”) addresses, and 48 bits for the layer two hardware addresses.
Figure 1-2: List of scenarios for the example of Working of ARP and IP Forwarding within a LAN and
across a router
NetSim UI displays the configuration file corresponding to this experiment as shown below
Figure 1-3.
Figure 1-3: Network set up for studying the ARP across a LAN
1.6 Procedure
ARP across a LAN
Step 2: Configure an application between any two nodes by selecting a CBR application
from the Set Traffic tab. Right click on the Application Flow App1 CBR and select
Properties.
A CBR Application is generated from Wired Node 1 i.e., Source to Wired Node 2 i.e.,
Destination with Packet Size remaining 1460Bytes and Inter Arrival Time remaining
20000µs.
Transport Protocol is set to UDP instead of TCP. If set to TCP, the ARP table will get
updated due to the transmission of TCP control packets thereby eliminating the need for
ARP to resolve addresses.
Step 3: Packet Trace is enabled in the NetSim GUI, and hence we can view the ARP
Request and ARP Reply packets exchanged initially, before transmission of the data
packets.
Step 4: Enable the plots and click on Run simulation. The simulation time is set to 10
seconds.
Step 5: Under Options, the “Static ARP” tab, Static ARP is set to disable see Figure 1-4.
If Static ARP is enabled, then NetSim will automatically create an ARP table for each node.
To see the working of the ARP protocol users should disable Static ARP.
By doing so, ARP request would be sent to the destination to find out the destinations MAC
Address.
NODE 1 will send ARP_REQUEST to SWITCH-4, SWITCH-4 sends this to ROUTER-6, and
SWITCH-4 also sends this to NODE-2. ARP-REPLY is sent by the NODE-2 to SWITCH -4,
and in-turn SWITCH-4 sends it to NODE-1.
NetSim UI displays the configuration file corresponding to this experiment as shown below
Figure 1-7.
Figure 1-7: Network set up for studying the ARP across a WAN
1.9 Procedure
The following set of procedures were done to generate this sample.
Step 1: A network scenario is designed in the NetSim GUI comprising of 3 Wired Nodes, 2
L2 Switches, and 1 Router.
Step 2: Click on Set Traffic tab and configure any application between the nodes. Right click
on the application and set the properties.
APP 1 CBR is created from Wired Node 1 to Wired Node 3, Packet size set as 1460 bytes
and Inter arrival time as 20000 Micro sec and Transport layer protocol to UDP.
APP 2 CBR is created from Wired Node 2 to Wired Node 3, Packet size set as 1460 bytes
and Inter arrival time as 20000 Micro sec and Transport layer protocol to UDP. Additionally,
the start time is set to 1 second and end time to 3 second.
Transport Protocol is set to UDP instead of TCP. If set to TCP, the ARP table will get
updated during transmission of TCP control packets thereby eliminating the need for ARP to
resolve addresses.
Step 3: Packet Trace is enabled in the NetSim GUI, and hence we can view the ARP
Request and ARP Reply packets exchanged initially, before transmission of the data
packets.
Step 5: Under Options, the “Static ARP” tab, Static ARP is set to disable.
Once the simulation is complete, to view the packet trace file, click on “Open Packet Trace”
option present in the left-hand-side of the Results Dashboard.
In packet trace, filter the CONTROL PACKET TYPE/ APP NAME filed to view APP 1CBR,
ARP_REQUEST, ARP_REPLY.
NODE 1 will send ARP_REQUEST to SWITCH-4, SWITCH-4 sends this to ROUTER-6, and
SWITCH-4 also sends this to NODE-2. ARP-REPLY is sent by the ROUTER-6 to SWITCH -
4, and in-turn SWITCH-4 sends it to NODE-1. Again ROUTER-6 will send ARP_REQUEST
to SWITCH-5, SWITCH-5 sends this to NODE-3. ARP_REPLY is sent by NODE-3 to
SWITCH-5 and in-turn SWITCH-5 sends it to ROUTER-6.
The IP forwarding table formed in the router can be accessed from the IP_Forwarding_Table
list present in the Simulation Results window as shown below Figure 1-9.
Router forwards packets intended to the subnet 192.169.0.0 to the interface with the IP
192.168.0.1 based on the first entry in its routing table.
In the below figure users can observe that ARP_REQUEST is broadcasted from Wired Node
2, the ARP Reply is sent from the Router 6, upon receiving the ARP_REPLY. Router 6
directly starts sending the data packet to the Wired Node 3 unlike the previous sample.