cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2394
Views
5
Helpful
1
Replies

ARP Table and MAC Address Table Lookups for Packet Forwarding Over a Routed Link

Pavithran Nair
Level 1
Level 1

Hi guys - I have a network setup that I'm a bit confused about - it has to do with packet forwarding over a routed link.

Here's the scenario:


Topology
R1 (Gi2/17 IP:192.168.74.129/30) <------------> R2 (Gi2/1/1 IP:192.168.74.130/30)
# Routed link between R1 and R2, both are Layer 3 switches.
# R2 can ping R1 and vice versa successfully

Questions
# How is R2 able to ping R1 without having the R1's MAC in it's MAC Address Table?
# If R2's ARP table already has an entry for R1's IP along with the exit interface,
  does R2 still need to do a MAC Address Table lookup?

 

R2 Pinging R1's interface IP
R2# ping 192.168.74.129  source 192.168.74.130
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.74.129, timeout is 2 seconds:
Packet sent with a source address of 192.168.74.130
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms

 

R2's ARP Table with R1's IP entry
R2 #show ip arp 192.168.74.129
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.74.129        103   c84c.7581.7d40  ARPA   GigabitEthernet2/1/1


R2's MAC Address Table for R1's MAC address
R2# show mac add add c84c.7581.7d40
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
<No entries>


R2's MAC Address Table with MACs learnt on Gi2/1/1
R2# show mac add int gi 2/1/1
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
<No entries>

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

A router does not have a mac address table because it doesn't need one ie. all the information it needs to forward the packet is in the IP routing table and the arp cache (technically it's usually CEF tables but we'll keep things simple).

With a L3 switch on the other hand it depends.

When it uses L3 routed ports it acts exactly like a router in that all the information it needs is in the same tables.

However if you modified your setup so that instead of using L3 ports you put both ports into the same vlan and then created L3 vlan interfaces (SVIs) on both switches for that vlan and used the IPs you currently have on the L3 ports then you would see entries in the mac address table.

This is because when you use SVIs a L3 switch has to make an additional step that a router does not.

So comparing the two -

1) L3 ports. The switch will arp for the mac address of the other switch. It gets the response and it can directly associate that mac address with it's L3 port in it's arp cache so it knows which port to send the packet out of.

2) SVIs. The switch will again arp for the mac address of the other switch. It gets the response ie. the mac address of the other switches SVI and this will be entered into it's arp cache but this is not enough information because it still needs to know the physical port that the SVI mac address is reachable on.

So it records the SVI mac address of the other switch in it's mac address table against the port that connects it to the other switch.

That is why with your setup using L3 ports you do not see any mac address entries for the other switch because your L3 switches don't need them.

And yes, if one switch has sent an arp and successfully received an answer the other switch will now have a corresponding entry in it's arp cache.

Jon

View solution in original post

1 Reply 1

Jon Marshall
Hall of Fame
Hall of Fame

A router does not have a mac address table because it doesn't need one ie. all the information it needs to forward the packet is in the IP routing table and the arp cache (technically it's usually CEF tables but we'll keep things simple).

With a L3 switch on the other hand it depends.

When it uses L3 routed ports it acts exactly like a router in that all the information it needs is in the same tables.

However if you modified your setup so that instead of using L3 ports you put both ports into the same vlan and then created L3 vlan interfaces (SVIs) on both switches for that vlan and used the IPs you currently have on the L3 ports then you would see entries in the mac address table.

This is because when you use SVIs a L3 switch has to make an additional step that a router does not.

So comparing the two -

1) L3 ports. The switch will arp for the mac address of the other switch. It gets the response and it can directly associate that mac address with it's L3 port in it's arp cache so it knows which port to send the packet out of.

2) SVIs. The switch will again arp for the mac address of the other switch. It gets the response ie. the mac address of the other switches SVI and this will be entered into it's arp cache but this is not enough information because it still needs to know the physical port that the SVI mac address is reachable on.

So it records the SVI mac address of the other switch in it's mac address table against the port that connects it to the other switch.

That is why with your setup using L3 ports you do not see any mac address entries for the other switch because your L3 switches don't need them.

And yes, if one switch has sent an arp and successfully received an answer the other switch will now have a corresponding entry in it's arp cache.

Jon

Review Cisco Networking products for a $25 gift card