H3C switch operation and maintenance - query access switch interface through known terminal MAC address

Note: This step is only applicable to the situation where the terminal and the access switch communicate with each other, but which port is not known (please ensure that the terminal and the access switch are connected normally)

Need to meet the conditions
1. Know the management vlan (here simulated as vlan900)
2. Know the last 4 digits of the MAC address of the new network terminal (here simulated as 1C3G)
3. Have the management account authority to log in to the switch device

The first step is to log in to the core switch and query the management address of the neighbor device through the known terminal mac address

1. First log in to the core (access) switch to ensure that the lldp service is enabled

[H3C]lldp enable    #不确定是否开启请手动开启这个服务

2. Use dis mac-address | include mac address to query interface information

<H3C>dis mac-address | include  1C3G   #比如终端的MAC地址后四位为1c3g

Here you can see that this MAC is learned from port 46

3. Next, use lldp to view the neighbor list and locate the access switch

<H3C>display lldp neighbor-information list   #

Here you can see that the host name of port 46 is H3CSW
insert image description here

4. The host name of port 46 is H3CSW as seen above

<H3C>interface Ten-GigabitEthernet 1/1/0/46   #进入46口
[H3C]dis arp vlan 900    #使用arp查看此接口的vlan900的ip地址

Here you can see that the neighbor device management IP is 10.1.1.88
insert image description here

The second step is to query the terminal access interface through the known terminal mac address

5. Login to 10.1.1.88

<H3C>ssh2 10.1.1.88   #通过ssh或telnet都可
<H3CSW>display mac-address | include 1C3G   #登入后再次查找mac

insert image description here
6. You can see that this MAC is on port 34

<H3CSW>sys                                #进入配置模式

[H3CSW]interface GigabitEthernet 1/0/34   #进入34口

[H3CSW-GigabitEthernet1/0/34]dis th    #查看这个接口配置

After entering the interface, you can modify the interface configuration as needed to make the terminal go online

Xiaobai is on the road, all gods, please correct me.

Guess you like

Origin blog.csdn.net/m0_50970375/article/details/129506635