3

I know that when a PC send a packets to any remoter router then first of all it checks out the Router MAC address which is connected with it, but it gets this MAC Address of Router from ARP Cache, but i don't know is ther the same process of the ARP Cache in the Switch? please elaborate me

9

Answering the original router question: Arp caches are there to map an IP addess to a mac address. There's nothing unique about a router. .. it needs an ARP cache just like any other IP device.

Managed switches likewise need an Arp cache so they can communicate with the stations managing them.

As we discussed in chat, you need to add an IP address to your switch so you can communicate via ARP.

vlan 2
 name management_vlan
!
interface Vlan2
 ip address 192.0.2.20 255.255.255.0
 no shutdown
 no ip route-cache
!
ip default-gateway 192.0.2.254

This isn't what you asked about, but if you need to see what mac addresses have been learned on a Cisco switch, use show mac address-table.

Keep in mind that mac learning and ARP are completely different processes on a layer 2 switch. Mac learning is used for communication through the switch. ARP is required for communication to the switch itself.

12
  • i appreciate your answer, but actually i was asking about the arp cache of the SWITCH no of the ROUTER, chech my question i have eidited it. please put some answer if you know about that – Fahim Shah Nov 17 '13 at 19:52
  • I have designed a network when i run the "show arp" command in the switch it doesnot show any thing, do you have an answer for this – Fahim Shah Nov 17 '13 at 20:07
  • @FahimShah, we know nothing about your network. Perhaps you'd like to give us the model of switches you're using and show us the configuration. Very simplistically, if there is nothing in show arp, it is because nothing needs to be in show arp. – This Nov 17 '13 at 20:32
  • I have a screen shot of my Network but i am new here and don't know how to upload the screen shot, can you guide me to upload the pic of my network – Fahim Shah Nov 17 '13 at 20:36
  • 1
    @FahimShah, It looks like your statement is correct. If a switch wants to send a packet to a PC that is not on the same subnet as the switch's management IP address, the switch looks up the default-gateway in its local routing table and uses the mac-address of the switch's default gateway as the destination mac-address for the packet going to the PC. In this respect, the operation is very similar to how a router encapsulates a ethernet packet to a remote network. – This Nov 18 '13 at 19:46
7

You are confusing "arp cache" (layer-3) with the switch mac-address table (layer-2). ARP is for knowing what ethernet device handles traffic for a specific IP. The mac-addr table is a list of MACs known to be on a specific switch port.

An ARP cache will only contain the addresses of other hosts with which the host is actively communicating. Routers may keep entries for hours, but hosts tend to keep them for minutes.

7

ARP is a protocol that adapts layer 2 (Ethernet) to layer 3 (IP) by mapping IP addresses to Ethernet hardware (MAC) addresses. A pure switch is a pure layer 2 device, operating at the Ethernet layer. So it has no need for an ARP cache. A managed switch may have an ARP cache to keep track of the hardware addresses of devices that are managing it.

A switch, of course, does have a CAM table, mapping MAC addresses to ports. But that has nothing to do with ARP (except that ARP traffic, like most Ethernet traffic, can populate the CAM table).

2
  • please can u make me sure that if there is no importance of ARP in switch then why we see and use the arp command in swithc – Fahim Shah Nov 18 '13 at 19:55
  • 1
    Managed switches are also layer 3 devices, that's how you manage them. So they need ARP for the same reasons all layer 3 end stations do. – David Schwartz Nov 18 '13 at 20:57
0

The switch keeps an arp cache like any host. One reason for having an arp cache and using it is when you have non routed subnets (like oracle RAC clusters) so you may not want to put an SVI on the L3 switch (I will run a direct connection between the two switches involved in the NIC team only allow the non routed vlans over it) and put SVIs in the switch for the address space so I can ping the heartbeat interfaces. Then look at the arp table then can find with switch port, easier then getting an ifconfig from the server. It is true that in general the SVI in a switch is just used for management so the only arp entry is for the default gateway, but in certain configurations using multiple SVIs and exploiting ARP can be a great help.

-1

ARP cache on switch is needed for local/remote management, send SNMP trap, and work other protocols.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.