IP Routing Explained

Hello Sameer

Directed ARP is used in a different situation than that described in your previous post. It is used in a scenario that is not often encountered nowadays. It requires a topology similar to the following:
image
Notice here that there are two subnets (10.10.10.0/24 and 10.10.20.0/24) on the same network segment. Notice also that the router interface, which functions as the default gateway for these two networks, has two IP addresses, one in each subnet. Even though Host 1 and Host 2 are on the same Layer 2 segment, they have IP addresses in different subnets so in order for them to communicate, they must do so via the router.

Note that the router interface is not configured with subinterfaces, but the physical interface itself is assigned multiple IP addresses.

Now such a scenario, strange as it may seem, will work just fine, assuming you can assign two IP addresses in two different subnets to the same router interface, something that Cisco routers do not support.

Now directed ARP becomes useful in this case because it would allow Host 1 and Host 2 to communicate directly, and not via the router, even through they are on different subnets. This is possible because they are on the same physical link. Directed ARP uses normal ARP packets with the same format. The “intelligence” for directed ARP is found in the router which has the two IP addresses on the same subnet.

When the router receives an ARP packet from Host 1 for the destination IP of Host 2, the router “knows” that these two hosts, are on the same physical segment, because both subnets are found on the same physical interface of the router. So the router will respond sending the MAC address of Host 2 as the destination MAC. So when Host 1 encapsulates its packets, they’ll look like this:

IP Header

  • Source IP address 10.10.10.5
  • Destination IP address 10.10.20.5

Ethernet frame header

  • Source MAC: Host1MAC
  • Destination MAC: Host2MAC

The result is a direct communication between the two hosts.

Now where would you actually use this? According to the RFC it says:

Multiple IP networks may be administered on the same link level network (e.g., on a large public data network).

Today, it is not considered good network design to interconnect many hosts with different subnets on the same network segment “in a large public data network”. This would create one large broadcast domain resulting in performance degradation, as well as potential security risks. However, back in 1993 when the RFC was written, it was a more acceptable practice, as the volume of traffic on networks as well as the number of potential hosts was much smaller, and such an implementation would indeed be much simpler, requiring only a single router for multiple subnets sharing the same network segment.

So you won’t encounter directed ARP often in today’s networks, but it’s quite interesting to find out more about it.

I hope this has been helpful!

Laz

3 Likes