Tuesday, 30 August 2016

Proxy ARP

we’ll use the following topology for this:
ARP Proxy ARP Example Topology
In the example above we have two subnets: 10.1.1.0 /24 and 10.2.2.0 /24. The router in the middle is connected to both subnets. On the bottom you see two hosts and on top we have a server.
When you take a close look at the hosts you can see that host A has a /24 subnet mask and host B has a /8 subnet mask. When host A tries to reach the server at 10.2.2.100 the following will happen:
  1. Host A compares its IP address and subnet mask to the IP address of the server (10.2.2.100) and decides that the server is in another subnet.
  2. Host A decides to send the packet for the server to its default gateway (10.1.1.254).
  3. Host A checks its ARP table to see if there is an entry for 10.1.1.254, if not it will send an ARP request.
  4. The router will respond to the ARP request, sending its MAC address of its FastEthernet 0/0 interface.
This is how ARP works normally, when host B tries to send an IP packet towards the server something else will happen:
  1. Host B compares its IP address and subnet mask to the IP address of the server (10.2.2.100) and decides that the server is in the same subnet.
  2. Host B checks its ARP table to see if there is an entry for 10.2.2.100, if not it will send an ARP request.
The server however is not on the 10.1.1.0 /24 subnet and routers do not forward broadcast traffic so the ARP request never makes it to the server. All hope is not lost however….this is where proxy ARP comes to the rescue!
When proxy ARP is enabled on the router, this is what happens:
  1. The router sees the ARP request from host B on the 10.1.1.0 /24 subnet and sees that this is an ARP request for something in the 10.2.2.0 /24 subnet.
  2. The router realizes that it knows how to reach the 10.2.2.0 /24 subnet and decides to respond to the ARP request in order to help host B.
  3. The router sends an ARP reply to host B with its MAC address on the FastEthernet 0/0 interface.
Are you following me so far? Let me show you what this looks like on a real router.

Configuration

I will use the following topology to demonstrate proxy ARP:
Proxy ARP Configuration Example
It’s the same as the picture as I just showed you but I am using the routers in my lab. By disabling “ip routing” I can turn the routers into ordinary host devices. Let’s start by disabling routing on R1, R2 and the server:
HostA, HostB & Server(config)#
no ip routing
Let’s configure the default gateway on those devices:
HostA & HostB(config)#
ip default-gateway 10.1.1.254
Server(config)#ip default-gateway 10.2.2.254
Let’s configure all the IP addresses that we require:
HostA(config)#interface fastEthernet 0/0
HostA(config-if)#ip address 10.1.1.1 255.255.255.0
HostB(config)#interface fastEthernet 0/0
HostB(config-if)#ip address 10.1.1.2 255.0.0.0
Server(config)#interface FastEthernet 0/0
Server(config-if)#ip address 10.2.2.100 255.255.255.0
Note that I used the /8 subnet mask on Host B here. Here’s the router:
R1(config)#interface FastEthernet 0/0
R1(config-if)#ip address 10.1.1.254 255.255.255.0
R1(config-if)#interface FastEthernet 0/1
R1(config-if)#ip address 10.2.2.254 255.255.255.0
That’s all we have to configure…let’s verify our work!

No comments:

Post a Comment