Port Number

Answered Question
Apr 2nd, 2009


I am sorry for my question as it is too simple

Q. what command can make me find the port no. of multilayer switch which has as specific IP add (eg. 172.12.x.x)connected to it

I have this problem too.
0 votes
Correct Answer by Collin Clark about 7 years 9 months ago

Correct, the device that is connected.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
lamav Thu, 04/02/2009 - 06:32

What do you mean "find the port number"?

Port number of what?

Collin Clark Thu, 04/02/2009 - 07:02

show arp | i 172.12.x.x

This will show the MAC associated with the IP address. Then to find what port the MAC was learned on-

show mac-address address [mac address]

<font size="2"></p><p>CORE#sh arp | inc</p><p>Internet 0 000c.5502.1e62 ARPA Vlan423</p><p></p><p>CORE#</p><p></p><p>CORE#sh mac-address-table address 000c.5502.1e62</p><p>Legend: * - primary entry</p><p>age - seconds since last seen</p><p>n/a - not available</p><p></p><p>vlan mac address type learn age ports</p><p>------+----------------+--------+-----+----------+--------------------------</p><p>Supervisor:</p><p>* 423 000c.5502.1e62 dynamic Yes 80 Gi13/13</p><p></font>

Here the IP is on port Gi13/13

Hope that helps.

gurkamal01 Thu, 04/02/2009 - 07:03


Appreciate your reply

does this show the interface's ip address or the connected device ip address

If answer is interface's ip address then how can find the connected device ip address

lamav Thu, 04/02/2009 - 07:10

Why dont you enumerate exactly which information you want?

1.) IP address of the interface.

2.) Neighbor IP address


gurkamal01 Thu, 04/02/2009 - 07:14


sorry for the inconvenience

I said connected device to the interface

which means

1. neighbor ip address

lamav Thu, 04/02/2009 - 07:18

To find the interface with a certain IP address:

sho ip int brief | in x.x.x.x

To view IP address to MAC address binding (ARP):

show ip arp x.x.x.x

To view connected neighbor:

"sho cdp nei"




This Discussion