网络维护中,如果要将某个用户所在接口重新划分VLAN,知道某个用户的IP地址,现在要查出用户所用接口,如下:
1、cisco-6506#show ip arp | include 172.16.16.27
Internet 172.16.16.27 0 e89a.8f6d.b8ed ARPA Vlan16 **这里就会是显示IP 地址对应的电脑的MAC地址e89a.8f6d.b8ae
2、cisco-6506#show mac-address-table dynamic address e89a.8f6d.b8ed
Legend: * - primary entry
age - seconds since last seen
n/a - not available
vlan mac address type learn age ports
------+----------------+--------+-----+----------+--------------------------
Supervisor:
* 16 e89a.8f6d.b8ed dynamic Yes 0 Gi3/3
*****这里就表示接口在GI3/3,或连接GI3/3这个接口的交换机上
3、cisco-6506#show cdp neighbors GI3/3 detail ***通过这个命令查找与GI3/3接口相连接的交换机详细信息,然后登录上去同样的方法就可以查到IP对应的交换机接口了。例如:
4、cisco-2#show mac-address-table dynamic address e89a.7c6d.b8ae
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
没有是显示出端口号,那么说明还在下层交换机
5、cisco-2#show cdp neighbors g0/1 detail
根据显示的详细信息再登录下一层交换机,依据上面的方法再查看,直到找到为止。
转载于:https://blog.51cto.com/huzi51/910766