09-03-2014 09:22 PM - edited 03-07-2019 08:37 PM
Hi,
I have a 2960-S switch with ports in vlan 102.
I have defined a interface vlan 102 (172.19.102.241/24) for switch management purpose such as SSH and a default gateway is 172.19.102.3/24
Since its a layer 2 device it should not look beyond layer 2 info.
Generally it should maintain ARP entry for interface vlan IP and gateway IP.
However the switch maintains the ARP entries for the hosts connected to it in vlan 102.
Why is so?
Regards,
Mitesh Manwatkar.
09-03-2014 09:40 PM
Only the mac address of the PC would only be learn when the packet goes out of the PC.
If someone might have ping to any address from the PC the mac address from the pc would be learn on the port connected to it.
HTH
Regards
Inayath
09-03-2014 09:52 PM
09-03-2014 10:02 PM
Hi,
Thats the expected. Please find example:
Attach is the packet tracer file.
I have switch configured with Vlan 10 with ip address 10.0.0.1/24
Conected 4 PC to the switch configured ip address in the same subnet.
I initiated ping from the PC to default gateway after which the mac and ip is been learned. Hence this is expected.
HTH
Regards
Inayath
09-03-2014 10:10 PM
Hi,
My question is exactly the same.
What is technical reason for the same as switch does learn IP address in packet.
Regards.
09-03-2014 10:43 PM
Hi Mitesh,
Though you mention that this switch is a layer 2. You are doing the routing for vlan 102.
You have configured an IP address and assigned it to a layer 3 vlan interface.
So it will by all ways do the arp resolution for all the ip addresses that fall in that subnet.
why do you feel that it should learn the ip address of its own vlan interface and the default gateway?
This is not a one to one mapping. The default gateway will ocme into picture only when it has to route traffic outside of the local subnet.(in your case vlan 102)
For the local subnet traffic it still has to do an arp resolution and find the respective mac address to route traffic.
Even the traffic that passes between any two devices on the same network will build the ARP table.
If you do not want this to happen. Remove the ip address from the switch and then it will be a pure layer 2 switch.
you can see that only mac address table will be built and no arp entries will be there.
HTH
Inayath
*Plz dont forget to rate all usefull posts.
09-04-2014 09:35 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
The switch might be saving ARPs it "hears/sees" (i.e but doesn't, itself, request) - "just in case" in needs them (especially if the management IP is on that subnet).
09-03-2014 10:43 PM
Hi Mitesh,
I got your tricky question. When a host connected in the layer 2 switch traverses or initiates traffic.... the packet or data will have the complete information of the initiator.... arp is a protocol which converts network address or ip address to mac address... i.e ip address..... rather in simple term we can say ARP is layer 2.5.... which resides in between layer 2 and layer 3.... it just uses the layer 2 encapsulation..... all you can consider here is... layer switch will not do any routing.... apart from sending the packets to the gateway defined....
Moreover ARP is not developed in a OSI framework.
Regards
Karthik
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