Finding Host Connected To 2960 Switch

Unanswered Question
Aug 12th, 2008

Are there a set of commands that be used to determine the host that is sttached to a particular port in the switch? for example I wish to know the host that is attached to port 18.


Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
massimiliano.se... Tue, 08/12/2008 - 05:45

Hi,

If you want know the mac-address of the host attached to port 18 you may use the command:

show mac address-table interface gigabitethernet0/18


I hope this helps.

Best regards.

Massimiliano.

Collin Clark Tue, 08/12/2008 - 05:51

You will need to find the MAC that was learned on the port.


show mac-address interface fa0/18


On the device that provides the layer 3 for that VLAN, ping the broadcast address, then do a show arp | inc [the learned MAC]. That will provide the IP address.


Hope that helps.


Example-

<font size="2"></p><p>ABC-SAL-16-1#sh mac-add interface gi0/1</p><p>          Mac Address Table</p><p>-------------------------------------------</p><p></p><p>Vlan    Mac Address       Type        Ports</p><p>----    -----------       --------    -----</p><p> 616    00a0.b816.09f9    DYNAMIC     Gi0/1</p><p> </p><p>ABC-SDL-34-1#ping 10.10.16.255</p><p></p><p>Type escape sequence to abort.</p><p>Sending 5, 100-byte ICMP Echos to 10.10.16.255, timeout is 2 seconds:</p><p></p><p>Reply to request 0 from 10.10.16.252, 24 ms</p><p>Reply to request 0 from 10.10.16.243, 24 ms</p><p>Reply to request 0 from 10.10.16.242, 24 ms</p><p>Reply to request 0 from 10.10.16.241, 24 ms</p><p>Reply to request 0 from 10.10.16.240, 24 ms</p><p>Reply to request 1 from 10.10.16.243, 1 ms</p><p>Reply to request 1 from 10.10.16.252, 1 ms</p><p>Reply to request 1 from 10.10.16.241, 1 ms</p><p>Reply to request 1 from 10.10.16.240, 1 ms</p><p></p><p>RKB-SDL-34-1#sh arp | inc 00a0.b816.09f9</p><p>Internet  10.10.16.240            0   00a0.b816.09f9  ARPA   Vlan616</p><p> </font>


I'm assuming once you know the IP, you can figure out the hostname/netbios name/etc.


Hope that helps

Actions

This Discussion