ifconfig看到的ip不是我想要的ip,而且显示的第一块网卡也是eth1 ,这明显是有问题的,
vim /etc/sysconfig/network-script/ifcfg-eth0 看到的ip是我设置后的ip,但是mac不对,看到的和ifconfig里面的eth1是不一样的,
然后vim /etc/udev/rules.d/70-persistent-net.rules 看到的是一个eth0 和一个eth1 ,这明显是不对的,我只有一块网卡,eth1的mac和ifconfig看到的是一样的,

0,vim /etc/udev/rules.d/70-persistent-net.rules  把eth1的name改成eth0,然后把上面的那个eth0的删掉,eth1修改为eth0
1,vim /etc/hosts [修改主机映射]
2, vim /etc/sysconfig/network,把hostname也改一下
重启 reboot 就OK了,
ifconfig看到的就是你设置的ip了~~

相关文章:

  • 2021-08-24
  • 2021-10-01
  • 2021-12-06
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2021-06-04
  • 2021-09-26
  • 2021-12-06
  • 2021-09-14
相关资源
相似解决方案