cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
495
Views
0
Helpful
8
Replies

How to trace end user connected from which L2 switch

Bijay Singh
Level 1
Level 1

I have one end user IP in my lan network and have 40 switches in LAN how can I find that IP connected from which switch please explain briefly 

8 Replies 8

vishalbhandari
Spotlight
Spotlight

 

Finding which switch and port an end user IP is connected to in a large LAN with multiple switches involves a series of steps using network tools and commands. Here’s a step-by-step guide to trace the IP:

Step-by-Step Guide to Trace an IP Address

1. Identify the MAC Address of the IP

First, you need to find the MAC address associated with the IP address. You can do this from a device that has connectivity to the IP, such as your computer or a network management system.

On a Windows machine:

 

plaintext
arp -a <IP_ADDRESS>

On a Linux/Unix machine:

 

plaintext
arp <IP_ADDRESS>

This will return the MAC address associated with the IP.

2. Log into Your Core Switch or Router

Connect to the core switch or router where you have the central view of your network.

3. Find the MAC Address in the ARP Table

Use the ARP table on your core switch or router to see which interface the MAC address is associated with.

For Cisco devices:

 

plaintext
show ip arp | include <MAC_ADDRESS>

This will give you the VLAN and possibly the physical port where the MAC address is located.

4. Trace the MAC Address through the Network

You now need to trace this MAC address through the network switches. Start from the core switch and work your way through.

On a Cisco switch, use:

plaintext
show mac address-table address <MAC_ADDRESS>

This command will tell you which port the MAC address is associated with on the switch. If it points to an uplink port, move to the next switch in the path and repeat the command.

5. Repeat the MAC Address Lookup

Continue using the show mac address-table address <MAC_ADDRESS> command on each switch along the path indicated by the uplink ports until you find the edge switch where the MAC address is located on an access port.

6. Verify the Switch and Port

Once you find the switch and port where the MAC address is directly connected, you can verify by checking the ARP table on that switch.

 

plaintext
show ip arp | include <MAC_ADDRESS>

And check the interface details:

 

plaintext
show interface <INTERFACE_NAME>

This should give you the definitive information on which switch and port the IP address is connected to.

By following these steps, you should be able to pinpoint which switch and port an IP address is connected to within your LAN network.

Thanks so much Vishal this works 

Joseph W. Doherty
Hall of Fame
Hall of Fame

Are you familiar with Cisco's traceroute mac command?

No


@Joseph W. Doherty wrote:
Are you familiar with Cisco's traceroute mac command?

When Bijay said "briefly", he did not mean this brief. 

Hello
You must have a L3 device that routes for that single vlan, so jump onto that check the arp table for that host and then go looking for that host on the switches via its mac- address 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

"You must have a L3 device that routes for that single vlan . . ."

"Routes" - why?

Review Cisco Networking for a $25 gift card