04-24-2015 02:13 AM - edited 03-07-2019 11:42 PM
Hi all,
My R2 fa0/1 (192.168.5.1) is connected to R10 fa0/0 (192.168.5.2)
When doing a show arp in R2 and R10, what really does the "Interface" meant ?
R2#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 192.168.3.1 74 c200.276c.0000 ARPA FastEthernet0/0 Internet 192.168.3.2 - c202.276c.0000 ARPA FastEthernet0/0 Internet 192.168.5.1 - c202.276c.0001 ARPA FastEthernet0/1 Internet 192.168.5.2 0 c20c.276c.0000 ARPA FastEthernet0/1 -- this is suppose to be on R10 Fa0/0 R10#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 192.168.5.1 1 c202.276c.0001 ARPA FastEthernet0/0 -- this is suppose to be on R2 Fa0/1 Internet 192.168.5.2 - c20c.276c.0000 ARPA FastEthernet0/0
Regards,
Noob
Solved! Go to Solution.
04-24-2015 03:10 AM
Its the local interface that the MAC address was learned on.
In your example above, the IP address of 192.168.5.2 belongs to R10 but its MAC address was leaned THROUGH Fa0/1 on R2.
The ARP cache lists the interface that the information was learned through.
The device simply uses the ARP cache to lookup the MAC address for a given IP address, it does not use it to forward packets. It uses the MAC Address table to locate where to forward packets.
04-24-2015 11:11 AM
No need to apologise, sometimes explaining how things work makes me revisit some of the things I take for granted so it helps me as well.
A good reason to participate in the forums :-)
The important thing to understand is that routers do base decisions on the routing table based on destination IP but they also then need to send that packet towards the destination IP and that involves a L2 address.
So the L3 lookup simply determines the next hop IP or outgoing interface in your example but that is not enough information to transmit the packet.
The routing table and the arp table are working at different layers of the IP stack and a fundamental concept of TCP/IP is that each layer is meant to operate independently of each other.
So I do understand what you are asking ie. why have the same information in both tables but it is because they are doing different things.
In terms of CEF that is a large question and I was expecting you to get around to it some time :-)
It is linked to process switching, fast switching etc. which are different ways of forwarding packets but in essence it is a way to speed up the forwarding process. It does this by building two tables -
1) a Forwarding Information Base (FIB) which is derived from the routing table (RIB)
and
2) an adjacency table which contains among other things the L2 address information that is needed to forward packets to towards the destination IP.
CEF allows a router to do quick L3 lookups using the FIB and can significantly reduce the load on the main CPU.
Jon
04-24-2015 02:56 AM
It is not enough for a router to know the mac address to IP mapping, it also needs to know out if which interface that mac address is reached.
So when you look at the arp table on a router you will see entries for the router's own interfaces but also any entries for mac addresses it has discovered and which interface on the router it was discovered on.
Jon
04-24-2015 04:21 AM
Hi all,
Thanks for the reply. But what good would it be to have the interfaces of where the mac address is learned in the arp table ? since its primary role is for ip -> mac mapping.
Hi Jon,
As per what you have mentioned that it is not enough for a router to know the mac address to IP mapping, it must know which interfaces the mac is reached. Why so ?
It make its routing decision via the route table / ip network to interfaces, why would it need the interfaces information in the arp table too ?
Regards,
Noob
04-24-2015 05:35 AM
As per your other post the information is actually used by CEF that keeps it own tables so it is a bit more complicated than it first appears.
But as a general answer to your question the arp table is used not just for the mapping but also so the router knows where to reach the mac address.
Where else could it store this information ?
Unlike switches routers do not have mac address tables and it needs to know out of which interface to send traffic.
Nowadays CEF is used to do both the route lookup and to resolve the next hop to a L2 address and CEF uses two tables -
1) the FIB which is an optimised version of the L3 routing table but again this would only point to a next hop
2) an adjacency table which among other things contains the L2 address of the next hop.
So the L3 routing decision is not enough to be able to deliver the packet to next hop.
Jon
04-24-2015 09:25 AM
Hi Jon,
Thanks for replying.
But as a general answer to your question the arp table is used not just for the mapping but also so the router knows where to reach the mac addresses Unlike switches routers do not have mac address tables and it needs to know out of which interface to send traffic
Sorry for this noob question, I know there must be a reason to store the interfaces information, but I thought routing decision is base on L3 (IP), in which with the routing table in place, the router will know which interfaces to exit or reach for a particular network, and if there is a need to check against the mac address, the arp table will have the mac address <-> ip mapping.
Hence the earlier question on why the need to store the interfaces information(furthermore all the interfaces records are its own) as well why the router need to know which interface to reach the mac addresses (when it should be concern on the ip)
--------
On a high level, what additional good do a CEF does and why does it needs the interfaces information ?
Regards,
Noob
04-24-2015 11:11 AM
No need to apologise, sometimes explaining how things work makes me revisit some of the things I take for granted so it helps me as well.
A good reason to participate in the forums :-)
The important thing to understand is that routers do base decisions on the routing table based on destination IP but they also then need to send that packet towards the destination IP and that involves a L2 address.
So the L3 lookup simply determines the next hop IP or outgoing interface in your example but that is not enough information to transmit the packet.
The routing table and the arp table are working at different layers of the IP stack and a fundamental concept of TCP/IP is that each layer is meant to operate independently of each other.
So I do understand what you are asking ie. why have the same information in both tables but it is because they are doing different things.
In terms of CEF that is a large question and I was expecting you to get around to it some time :-)
It is linked to process switching, fast switching etc. which are different ways of forwarding packets but in essence it is a way to speed up the forwarding process. It does this by building two tables -
1) a Forwarding Information Base (FIB) which is derived from the routing table (RIB)
and
2) an adjacency table which contains among other things the L2 address information that is needed to forward packets to towards the destination IP.
CEF allows a router to do quick L3 lookups using the FIB and can significantly reduce the load on the main CPU.
Jon
04-27-2015 01:03 AM
Hi Jon,
Duly noted. Thanks for the information. Hopefully i will get there around!
Regards,
Noob
04-24-2015 02:56 AM
Hi
the arp table is local to each router basically R2 is telling you that it has learned the mac address c20c.276c.0000 from FastEthernet0/1 interface and that's how it will get to 192.168.5.2 if required.
At layer 2 the mac addresses broadcast out and the mac table is formed with the information of how to get to each mac address , as these two devices are on the same link same subnet directly connected as soon as you ping between them an arp entry is then formed resolving the layer 2 mac address to the ip address associated and showing again where its learned from
04-24-2015 03:10 AM
Its the local interface that the MAC address was learned on.
In your example above, the IP address of 192.168.5.2 belongs to R10 but its MAC address was leaned THROUGH Fa0/1 on R2.
The ARP cache lists the interface that the information was learned through.
The device simply uses the ARP cache to lookup the MAC address for a given IP address, it does not use it to forward packets. It uses the MAC Address table to locate where to forward packets.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide