Por que o route-eth0 pode ser ignorado, mas o route-eth1 não? Pode ser porque eth0 está usando DHCP e eth1 está configurado estaticamente?
Eu tenho algumas rotas estáticas configuradas em
[16:20:06][root@zserver2:/etc/sysconfig/network-scripts]$ ls -al ro*
-rw-r--r-- 1 root root 104 Dec 6 15:49 route-eth0
-rw-r--r-- 1 root root 106 Dec 6 15:49 route-eth1
Quando eu faço um service network restart
as rotas para eth1 são ativadas, mas NÃO aquelas para eth0.
Um ifup eth0
também os ignora, mas um ifup-routes eth0
está ótimo. Qual é a melhor maneira de ativá-lo?
[16:18:36][root@zserver2:/etc/sysconfig/network-scripts]$ service network restart
Shutting down interface eth0: Device state: 3 (disconnected)
[ OK ]
Shutting down interface eth1: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/28
state: activated
Connection activated
[ OK ]
Bringing up interface eth1: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/29
[ OK ]
informações de rota
[16:18:50][root@zserver2:/etc/sysconfig/network-scripts]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.10 192.168.15.11 255.255.255.255 UGH 1 0 0 eth1
192.168.15.11 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
192.168.15.11 192.168.15.91 255.255.255.255 UGH 1 0 0 eth1
192.168.15.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 eth0
ifup eth0 manualmente
[16:19:03][root@zserver2:/etc/sysconfig/network-scripts]$ ifup eth0
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/30
state: activated
Connection activated
informações de rota
[16:19:35][root@zserver2:/etc/sysconfig/network-scripts]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.10 192.168.15.11 255.255.255.255 UGH 1 0 0 eth1
192.168.15.11 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
192.168.15.11 192.168.15.91 255.255.255.255 UGH 1 0 0 eth1
192.168.15.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 eth0
ifup-routes eth0 manualmente
[16:19:56][root@zserver2:/etc/sysconfig/network-scripts]$ ./ifup-routes eth0
[16:20:00][root@zserver2:/etc/sysconfig/network-scripts]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.1 192.168.15.90 255.255.255.255 UGH 5 0 0 eth0
192.168.15.10 192.168.15.11 255.255.255.255 UGH 1 0 0 eth1
192.168.15.10 192.168.15.1 255.255.255.255 UGH 5 0 0 eth0
192.168.15.11 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
192.168.15.11 192.168.15.91 255.255.255.255 UGH 1 0 0 eth1
192.168.15.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 eth0
Os arquivos de configuração são:
ifcfg-eth0
[16:30:26][root@zserver2:/etc/sysconfig/network-scripts]$ cat ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=76ef8242-9e22-4a29-93f3-a142d1460c87
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=00:25:90:86:71:E0
PEERDNS=yes
PEERROUTES=yes
LAST_CONNECT=1386361279
ifcfg-eth1
[16:30:35][root@zserver2:/etc/sysconfig/network-scripts]$ cat ifcfg-eth1
DEVICE=eth1
TYPE=Ethernet
UUID=647f66bd-67b2-4e9a-b5a5-4280ad677b9a
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
IPADDR=192.168.15.91
PREFIX=32
HWADDR=00:25:90:86:71:E1
LAST_CONNECT=1386361279