V
V
Vyacheslav2014-10-15 07:28:28
Computer networks
Vyacheslav, 2014-10-15 07:28:28

How to find by IP in which switch (and port) the device is included?

Let's say we have a simple network (everything is more interesting in life, but it doesn't matter) and let's say there is a device, such as a printer, with its own IP address (static). It is required to find out at least which switch the device is connected to, ideally, you would also find out the port of the switch.

1d64ae88b2504bcfa656ad9ee5a75802.jpg

If it helps - L2 + switches Dell 5548, L3 switch Dell 8132f.
The thought moved towards tracert 192.168.0.150 , but the switches do not give hops.
What to do? Run around the floors, look at the MAC on the nameplate of the printer, then look in the tables on the switches? What utility is convenient to do this? And if the device is "behind" a stupid unmanaged switch?

PS: There are many such (different) devices, more than 20.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Petrikov, 2014-10-15
@RicoX

If the segment is L2, then by poppy, we look in the routing table which poppy corresponds to the desired address, then we look at which port of which switch it lights up. And so arping is to help if you check compliance not from the router. If from the router, then something like show arp

S
Sergey, 2014-10-15
@bk0011m

If we know the IP address.
1. On the device itself, or on the gateway, look at the MAC address of the device.
Example:

# arp -a | grep 192.168.106.21
? (192.168.106.21) at 4c:72:b9:54:5d:1b on vlan106 expires in 801 seconds [vlan]

2. On the switch, we look at the table of MAC addresses and look for the right one.
On Cisco like this (you really need to tweak the MAC a bit):
#sh mac address-table | i 4c72.b954.5d1b
 106    4c72.b954.5d1b    DYNAMIC     Fa0/46

Probably the same on your switch. Try
PS.
Here's even a manual dug up:
show mac address-table 
Use the show mac address-table EXEC command to view entries in the MAC 
address table.
Syntax
show mac address-table [dynamic | static| secure] [vlan vlan] [interface 
interface-id] [address mac-address]
Parameters
• dynamic—Displays only dynamic MAC address table entries.
• static—Displays only static MAC address table entries.
• secure—Displays only secure MAC address table entries.400 Address Table Commands
FILE LOCATION: C:\Users\gina\Desktop\Checkout_new\CLI Folders\Dell Contax 
CLI\files\Address_Table.fm
DELL CONFIDENTIAL – PRELIMINARY 5/15/12 - FOR PROOF ONLY
• vlan—Specifies VLAN, such as VLAN 1.
• interface-id—Specifies an interface ID. The interface ID can be one of the 
following types: Ethernet port or port-channel.
• mac-address—MAC address.
Default
Command Mode 
EXEC mode
User Guidelines
Internal usage VLANs (VLANs that are automatically allocated on routed 
ports) are presented in the VLAN column by a port number and not by a 
VLAN ID.
Example 
Console# show mac address-table
Aging time is 300 sec
 VLAN MAC Address Port Type
-------- --------------------- ---------- ----------
 1 00:00:26:08:13:23 0 self
 1 00:3f:bd:45:5a:b1 gi1/0/1 static
 1 00:a1:b0:69:63:f3 gi1/0/24 dynamic
 2 00:a1:b0:69:63:f3 gi1/0/24 dynamic
Console# show mac address-table 00:3f:bd:45:5a:b1
Aging time is 300 sec

cfdlab.unsw.wikispaces.net/file/view/dell-powercon...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question