Skip to main content

cisco port question

More
18 years 9 months ago #12987 by haselnut
cisco port question was created by haselnut
Is there an IOS command or utility that will show me the IP or MAC address of a computer that is plugged into a port on a cisco switch?
More
18 years 9 months ago #12988 by illness
Replied by illness on topic Re: cisco port question
i can tell you how to find a mac address on a switch.

on a 2924 switch,

telnet into your switch and use, show mac address xxxx.xxxx.xxxx, don't forget the periods.

below is the mac address of my station on port 2 of the switch.

[code:1]

swprcore06#show mac address 0009.6b32.1e01
Non-static Address Table:
Destination Address Address Type VLAN Destination Port

----
0009.6b32.1e01 Dynamic 1 FastEthernet0/2
swprcore06#

[/code:1]
More
18 years 9 months ago #12989 by havohej
Replied by havohej on topic Re: cisco port question
HI,

that method is great, but you cant view the ip address in the cisco switch.

If you have also a cisco router you can do the command "show arp"

it shows the ip addresss associated with the mac address and from wich port it was learned.

of course if the router is connetecd byt the switch, then you must telnet to the switch an do the command "show mac-address-table"

and it shows you the mac address wan learned from wich port.
More
18 years 9 months ago #13006 by illness
Replied by illness on topic Re: cisco port question
maybe this is the best way to do it if you don't have a router.


[code:1]
swprcore29#sh arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.0.40 0 0001.03c2.d751 ARPA VLAN1
Internet 192.168.0.29 - 0007.8501.cb80 ARPA VLAN1
swprcore29#sh mac-address-table
Dynamic Address Count: 3
Secure Address Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 49
Total MAC addresses: 52
Maximum MAC addresses: 2048
Non-static Address Table:
Destination Address Address Type VLAN Destination Port

----
0000.e83c.6617 Dynamic 1 FastEthernet0/8
0001.03c2.d751 Dynamic 1 FastEthernet0/3
0001.960f.2b00 Dynamic 1 FastEthernet0/13
swprcore29#
[/code:1]

use the sh arp to find the ip/mac and the sh mac-address-table to find the port.

the one thing that makes this a problem is the uplink to other switches. the switch will learn the host adress's of every host that comes over the uplink port in a multi switch LAN.

the best strategy is to keep in mind if not know the uplink ports on your switchs. if the mac/ip appears on the uplink port then the host is on another switch.

if you know the switch or once you find the correct switch the host is on, the above commands should tell you the correct port.
More
18 years 9 months ago #13007 by illness
Replied by illness on topic Re: cisco port question

HI,

that method is great, but you cant view the ip address in the cisco switch.

If you have also a cisco router you can do the command "show arp"

it shows the ip addresss associated with the mac address and from wich port it was learned.

of course if the router is connetecd byt the switch, then you must telnet to the switch an do the command "show mac-address-table"

and it shows you the mac address wan learned from wich port.



i can't get show mac-address-table to work on my 2600 switch?


[code:1]
epsoloncsr#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.3(15a), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Thu 21-Jul-05 19:54 by dchih
Image text-base: 0x80008098, data-base: 0x80CD8F04

ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
ROM: C2600 Software (C2600-I-M), Version 12.3(15a), RELEASE SOFTWARE (fc2)

epsoloncsr uptime is 3 days, 17 hours, 51 minutes
System returned to ROM by power-on
System image file is "flash:c2600-i-mz.123-15a.bin"

cisco 2611 (MPC860) processor (revision 0x203) with 28672K/4096K bytes of memory.
Processor board ID JAD041002LK (2702704211)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
2 Ethernet/IEEE 802.3 interface(s)
32K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read/Write)

Configuration register is 0x2102

epsoloncsr#sh arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.0.40 7 0001.03c2.d751 ARPA Ethernet0/0
Internet 192.168.0.8 0 0000.e83c.6617 ARPA Ethernet0/0
Internet 192.168.0.4 - 0001.960f.2b00 ARPA Ethernet0/0
Internet (removed by ill) ARPA Ethernet0/1
Internet (removed by ill) ARPA Ethernet0/1
epsoloncsr#show mac-address-table
^
% Invalid input detected at '^' marker.

epsoloncsr#

[/code:1]
More
18 years 9 months ago #13034 by havohej
Replied by havohej on topic Re: cisco port question
Hi ill.

Of course you cant do the "show mac-address-table" in the 2600 because the 2600 is only a router, not a switch, and the "show mac-address-table" command is only a switch command.

Now I look at the posts above and there you can do both commands ins the same device because it is a multilayer device. so both commands work.

Another idea is that you can install fluke network inspector, and do a disocvery of the network, there shows you wich device with is ip address and associated mac address is learned from which switch and from wich switchport of the selected switch.


HI,

that method is great, but you cant view the ip address in the cisco switch.

If you have also a cisco router you can do the command "show arp"

it shows the ip addresss associated with the mac address and from wich port it was learned.

of course if the router is connetecd byt the switch, then you must telnet to the switch an do the command "show mac-address-table"

and it shows you the mac address wan learned from wich port.



i can't get show mac-address-table to work on my 2600 switch?


[code:1]
epsoloncsr#sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.3(15a), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Thu 21-Jul-05 19:54 by dchih
Image text-base: 0x80008098, data-base: 0x80CD8F04

ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
ROM: C2600 Software (C2600-I-M), Version 12.3(15a), RELEASE SOFTWARE (fc2)

epsoloncsr uptime is 3 days, 17 hours, 51 minutes
System returned to ROM by power-on
System image file is "flash:c2600-i-mz.123-15a.bin"

cisco 2611 (MPC860) processor (revision 0x203) with 28672K/4096K bytes of memory.
Processor board ID JAD041002LK (2702704211)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
2 Ethernet/IEEE 802.3 interface(s)
32K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read/Write)

Configuration register is 0x2102

epsoloncsr#sh arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.0.40 7 0001.03c2.d751 ARPA Ethernet0/0
Internet 192.168.0.8 0 0000.e83c.6617 ARPA Ethernet0/0
Internet 192.168.0.4 - 0001.960f.2b00 ARPA Ethernet0/0
Internet (removed by ill) ARPA Ethernet0/1
Internet (removed by ill) ARPA Ethernet0/1
epsoloncsr#show mac-address-table
^
% Invalid input detected at '^' marker.

epsoloncsr#

[/code:1]

Time to create page: 0.143 seconds