Relationship between CISCO switch ports, IP addresses, and MAC

Source: Internet
Author: User
Tags cisco switch

 

As a network administrator, we often need to determine the relationship between the port, IP address, and MAC address on the switch in our daily work, whether the problem occurs when we learn about a host with a certain IP address through the network management software or the log server, or we need to reorganize the network topology, you need to know exactly the port on which the IP address or MAC address of a MAC host is located or the port on which the MAC address is connected, that is to say, You need to quickly determine the relationship between the port, IP address, and MAC address on the switch. Based on our experience, we can see that these operations are most effective only when the network administrator works with the system administrator.

1. network administrators and System Administrators

This involves two different working modes: The network manager holds an IP Address Allocation Table in his hand (although the content of this table may be outdated ), log on to the vswitch and check the relationship between the IP address and the host. This method does not perform any "hard" operations on network devices. The security factor is high, but the obtained information is not accurate. For example, if the IP address of a server has been changed, we can think that the server is not connected to the network because the original IP address cannot be found on the switch. The system administrator first checks the IP address information on the server, and then finds out which port of the switch the IP address is located on. The information obtained by this method is very prepared, but it is time consuming. In general, we will first use the first method to quickly sort out the correspondence between IP addresses, MAC addresses, and ports. For inaccurate information, we will use the second method to implement it one by one.

Ii. How to view the relationship between CISCO switches

I have a Cisco switch for networking. The following describes how to use this type of switch as an example.

For example, if you have an IP Address: 10.230.0.67, you need to know the MAC address corresponding to the IP address and the port on the switch. Execute the following commands in sequence:

(1) ping a vswitch

Switch # ping 10.230.0.67

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 MS

We can obtain the required information regardless of whether the Ping is successful or not.

(2) obtain the correspondence between IP addresses and MAC addresses through arp commands

Switch # show ip arp | I 10.230.0.67

Internet 10.230.0.67 0 0050.4b10.7830 ARPA Vlan1

The displayed result shows that the MAC address of 10.230.0.67 is 0050.4b10.7830 ARPA Vlan1.

(3) Find the corresponding port on the switch through the MAC address

Switch # show mac-add | I 0050.4b10.7830

1 0050.4b10.7830 DYNAMIC Fa0/21

This process is a little troublesome, because it takes three steps to get the desired results. In addition, I want to explain why we need to ping the IP address first, because the corresponding relationship between the IP address and the mac address will be established in the vswitch. Sometimes we can see that a port is connected to a line, but the mac address is not displayed under the port by running the show mac-add command, you have to ping the IP address of the host connected to the port (this requires the system administrator to log on to the host to view the IP address) before the MAC address under the port is displayed.

Iii. Summary

As a network administrator, it is a basic skill to quickly locate the ing between vswitch ports, IP addresses, and MAC. These commands should be noted to help us quickly eliminate network faults, it is also helpful for document sorting.

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.