把被篡改的静态 IP“释放 / 解绑” → 把这个 IP 重新绑定到新的 MAC(新设备 / 新网卡)。下面分:排查→解绑旧绑定→清理网络→绑定新 MAC→防再次篡改(华为 / H3C 通用)。
一、先查清:到底绑在哪里、被谁篡改
1)在交换机上查静态绑定(关键)
bash
运行
# 华为
display user-bind static
display arp static
display dhcp static user-bind all
# H3C
display user-bind
display arp static
重点看:旧 IP、旧 MAC、端口、VLAN。
2)找 “私改 IP” 的设备
bash
运行
# 查该IP现在对应的MAC
display arp | include 192.168.x.x
# 查这个MAC在哪个端口
display mac-address | include xxxx-xxxx-xxxx
把这个非法设备断网(拔线 / 禁端口),避免继续捣乱。
二、交换机:释放旧 IP、解除旧 MAC 绑定
1)删除静态 ARP 绑定(IP–MAC)
bash
运行
# 华为
system-view
undo arp static 192.168.1.100 00e0-fcxx-xxxx # 旧IP 旧MAC
# H3C
system-view
undo arp static 192.168.1.100 00e0-fcxx-xxxx
2)删除 user-bind 绑定(IP–MAC–端口)
bash
运行
# 华为
undo user-bind static ip-address 192.168.1.100 mac-address 00e0-fcxx-xxxx
# H3C
undo user-bind static ip 192.168.1.100 mac 00e0-fcxx-xxxx
3)DHCP 服务器上如果有静态绑定,也要删
bash
运行
# 华为DHCP地址池
ip pool xxx
undo static-bind ip-address 192.168.1.100
至此:旧 IP 完全释放,旧 MAC 不再占用该 IP。
三、终端侧:清理 IP,避免残留
Windows
cmd
ipconfig /release
ipconfig /flushdns
arp -d *
然后把终端设为静态 IP(你要的新 IP),或改成 DHCP 再重新获取。
Linux
bash
运行
ip addr flush dev eth0
arp -d 192.168.1.100
systemctl restart network
四、把 “释放出来的旧 IP” 绑定到新 MAC
1)交换机上做新绑定(推荐 IP+MAC+VLAN + 端口)
bash
运行
# 华为:IP+MAC
user-bind static ip-address 192.168.1.100 mac-address 00e0-fcNEW-NEW
# 华为:IP+MAC+端口+VLAN(最严)
user-bind static ip-address 192.168.1.100 mac-address 00e0-fcNEW-NEW interface GigabitEthernet 0/0/1 vlan 10
# H3C 类似
user-bind static ip 192.168.1.100 mac 00e0-fcNEW-NEW
2)再配静态 ARP(防止 ARP 欺骗)
bash
运行
arp static 192.168.1.100 00e0-fcNEW-NEW
3)开启 IPSG/DAI,防止以后再私改 IP
bash
运行
# 华为VLAN下启用IPSG
vlan 10
ip source check user-bind enable
# H3C
vlan 10
ip verify source port-security
五、验证
bash
运行
display user-bind static | include 192.168.1.100
display arp | include 192.168.1.100
Type 为 static,Age 为 “-” → 永久绑定,改不了。
六、一句话总结
交换机:undo 旧 user-bind、undo 旧 arp → 释放 IP;
终端:release/flush 清残留;
交换机:user-bind + arp static 把该 IP 绑到新 MAC;
开启 IPSG/DAI,杜绝私自改 IP。
暂无评论
1system-view1# 例如解除 192.168.1.100 的绑定
2undo arp static 192.168.1.1001# 格式:arp static [IP地址] [MAC地址]
2arp static 192.168.1.100 0011-2233-44551return
2savestatic-bind ip-address),以防止非法接入。1ipconfig /release1ipconfig /renew暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论