在进行Linux网络转发实验,发现实际显示路由表与配置文件不一致
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
1.重启了网络服务-问题犹在
为了节约时间决定手工配置路由
[[email protected] Desktop]# route add net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.1
net: Host name lookup failure出现报错
2.查看网卡信息
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
发现eth1居然没有ip地址!配置文件没有任何问题
重启网络报错
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
Error: Connection activation failed: The connection is not for this device.出现报错

解决方法
[[email protected] network-scripts]# chkconfig NetworkManager off
[[email protected] network-scripts]# chkconfig network on
[[email protected] network-scripts]# service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[[email protected] network-scripts]# service network start
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: Determining if ip address 192.168.1.2 is already in use for device eth1...
^[[A^[[ [ OK ]
SIOCADDRT: File exists
SIOCADDRT: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists

恢复以后
网口配置文件及路由表配置文件无法生效
网口配置文件及路由表配置文件无法生效
解决问题的关键是报错原因,至于为啥这样可以解决,有待深究,还望赐教
转载请注明出处,谢谢

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2021-09-15
  • 2022-12-23
  • 2021-06-10
相关资源
相似解决方案