华为交换机根据已知一个IP查他对应的MAC地址和交换机端口命令

本文介绍如何在华为交换机上通过IP地址查询对应的MAC地址,并展示了如何找到该MAC地址所连接的具体端口。此外,还介绍了如何查看静态绑定的IP-MAC信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

设备
华为S5735S-S24T4S-A
VRP ® software, Version 5.170 (S5735 V200R019C10SPC500)

华为S5720-28p-LI-AC
VRP ® software, Version 5.170 (S5720 V200R011C10SPC600

配置说明

华为交换机根据已知一个IP查他对应的MAC地址,已知终端ip:192.168.1.11
1.首先在核心交换机上dis arp | include 192.168.1.11
显示

IP ADDRESS MAC ADDRESS E XPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN
192.168.1.11 6xxx-9xxx-fxxx 12 D-0 GE0/0/11
Total:113 Dynamic:196 Static:0 Interface:4

找到ip:192.168.1.11对应mac地址为6xxx-9xxx-fxxx

查哪些IP已绑定的对应该的MAC地址
display current-configuration | include 192.168.1
显示

dhcp server static-bind ip-address 192.168.1.9 mac-address xxxx-xxxx-xxxx
dhcp server static-bind ip-address 192.168.1.108 mac-address xxxx-xxxx-xxxx
dhcp server static-bind ip-address 192.168.1.149 mac-address xxxx-xxxx-xxxx

2.然后找到对应接入层交换机dis mac-address 6xxx-9xxx-fxxx

[ACCESS]dis mac-address 6xxx-9xxx-fxxx
MAC Address VLAN/VSI/BD Learned-From Type
6xxx-9xxx-fxxx 16/-/- GE0/0/18 dynamic
找到mac地址:6xxx-9xxx-fxxx对应端口号GE0/0/18

查看接口对应有哪些mac地址

dis mac-address g0/0/23


MAC Address VLAN/VSI/BD Learned-From Type


3d9c-232d-091a 16/-/- GE0/0/23 dynamic

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

玩人工智能的辣条哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值