Check port based on IP

Source: Internet
Author: User
Tags cos min

In the middle of a Cisco switched network, you know the IP address of a machine, how do you find out which port it is connected to? The most convenient and efficient way to make use of Ciscoworks LMS network management software user tracking function, graphical interface, at a glance.

If you do not have this software, you can also use the following manual analysis method to find the answer:

Example network: Core switch for 6509 (switching engine se with CatOS, MSFC running iOS software)

G height=178 src= "/fsmanage/roupimages/200451492819.jpg" width=245>

1. Find the corresponding MAC address for this IP:

By looking at the system's ARP cache table, you can find the corresponding MAC address of an IP. Since ARP cannot be done across VLANs, the routing module that connects each VLAN MSFC is the best choice--typically it has a port on every VLAN (interface VLAN n) that can be correctly interpreted by ARP.

6509msfc#ping 10.10.1.65

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.10.1.65, timeout is 2 seconds:

!!!!!

Success rate is percent (5/5), round-trip Min/avg/max = 1/1/4 ms

6509msfc#show ARP | In 10.10.1.65

Internet 10.10.1.65 2 0006.2973.121d ARPA Vlan2

Through the above command, we know 10.10.1.65 MAC address is 0006.2973.121d, this is the iOS device MAC address expression, in CatOS, should be written as 00-06-29-73-12-1d.

2. Locate the port on the switch that corresponds to the MAC address

6509se> (enable) show Cam 00-06-29-73-12-1d

* = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.

X = Port Security Entry $ = dot1x Security Entry

VLAN Dest mac/route Des [CoS] Destination Ports or VCs/[Protocol Type]

---- ------------------ ----- -------------------------------------------

2 00-06-29-73-12-1d 9/41 [all]

Total Matching CAM Entries displayed =1

Does this mean that the IP-10.10.1.65 machine is connected to port 9/41?

Not necessarily. If the following command shows only one active MAC address on the port, the answer is yes:

6509se> (enable) show cam dynamic 9/41

* = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.

X = Port Security Entry $ = dot1x Security Entry

VLAN Dest mac/route Des [CoS] Destination Ports or VCs/[Protocol Type]

---- ------------------ ----- -------------------------------------------

2 00-06-29-73-12-1d 9/41 [all]

Total Matching CAM Entries displayed =1

If the command shows that there are multiple active MAC addresses on the port, the port should be connected to another switch or hub device, as shown in the following example (look for the switch port for IP 10.10.1.250):

6509msfc#ping 10.10.1.250

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.10.1.250, timeout is 2 seconds:

!!!!!

Success rate is percent (5/5), round-trip Min/avg/max = 1/1/1 ms

6509msfc#show ARP | In 10.10.1.250

Internet 10.10.1.250 4 0009.6b8c.64ec ARPA Vlan2

6509se> (enable) show Cam 00-09-6b-8c-64-ec

* = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.

X = Port Security Entry $ = dot1x Security Entry

VLAN Dest mac/route Des [CoS] Destination Ports or VCs/[Protocol Type]

---- ------------------ ----- -------------------------------------------

2 00-09-6b-8c-64-ec 3/11 [all]

Total Matching CAM Entries displayed =1

6509se> (enable) show Cam dy 3/11

* = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.

X = Port Security Entry $ = dot1x Security Entry

VLAN Dest mac/route Des [CoS] Destination Ports or VCs/[Protocol Type]

---- ------------------ ----- -------------------------------------------

1 00-03-e3-4b-06-80 3/11 [all]

1 00-08-02-E6-B0-CD 3/11 [all]

1 00-02-a5-ee-f2-4f 3/11 [all]

1 00-09-6b-8c-66-d6 3/11 [all]

1 00-09-6b-63-17-d9 3/11 [all]

1 00-0b-cd-03-ec-f5 3/11 [all]

1 00-09-6b-63-17-d8 3/11 [all]

1 00-08-02-E6-B0-C1 3/11 [all]

1 00-08-02-e6-b0-85 3/11 [all]

1 00-08-02-e6-b0-81 3/11 [all]

1 00-02-a5-ef-16-af 3/11 [all]

1 00-02-a5-ee-f2-93 3/11 [all]

1 00-02-55-c6-05-61 3/11 [all]

2 00-09-6b-8c-64-ec 3/11 [all]

1 00-08-02-e6-b0-ed 3/11 [all]

1 00-08-02-e6-b0-a9 3/11 [all]

1 00-02-55-54-7a-e0 3/11 [all]

1 00-02-a5-ef-15-a6 3/11 [all]

1 00-08-02-e6-af-8f 3/11 [all]

1 00-08-02-E6-B0-BD 3/11 [all]

1 00-0b-cd-03-db-8b 3/11 [all]

1 00-09-6b-8c-25-50 3/11 [all]

Do your wish to continue y/n [n]? N

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.