Centos 系统修改mac地址后,丢失网关,需要手动设置网关:
ifconfig eth0 down ifconfig eth0 hw ether 00:00:00:00:00:00 ifconfig eth0 up route add default gw 192.168.0.1
原因:
网关上arp缓存未过期,需手动清下网关arp或者等待超时自动刷新
Centos 系统修改mac地址后,丢失网关,需要手动设置网关:
ifconfig eth0 down ifconfig eth0 hw ether 00:00:00:00:00:00 ifconfig eth0 up route add default gw 192.168.0.1
原因:
网关上arp缓存未过期,需手动清下网关arp或者等待超时自动刷新
You must be logged in to post a comment.
修改MAC前先ifconfig 查看要修改的网卡号 eth0
将命令写进rc.local,开机自启动