I dołączone dwie opcje net.ifnames=0
biosdevname=0
do grub2
, ponieważ chcę, aby zmienić domyślną nazwę sieci do starej nazwy eth0
na RHEL 7 .Kiedy dodać net.ifnames option = 0 = 0 w biosdevname polecenia jądra, trasa IP jest źle
Po tym, ja edytowany /etc/sysconfig/network
ustawić domyślną bramę dla maszyny:
GATEWAY=192.168.88.1
i skonfigurowany interfejs sieciowy. Kiedy mam tylko jeden interfejs sieciowy eth0
, wszystko działa dobrze.
Oto tabela trasa o jeden interfejs sieciowy eth0
:
[[email protected] ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.88.1 0.0.0.0 UG 100 0 0 eth0
192.168.88.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
[[email protected] ~]#
Ale mam problem ze stołem trasy, gdy więcej niż jeden interfejs sieciowy w Internecie.
[[email protected] ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.88.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 192.168.88.1 0.0.0.0 UG 101 0 0 eth1
172.168.0.0 0.0.0.0 255.255.0.0 U 100 0 0 eth1
192.168.88.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.88.1 0.0.0.0 255.255.255.255 UH 100 0 0 eth1
[[email protected] ~]#
Jak widać, adres bramy 192.168.88.1
dodano eth1
w ostatniej kolejce. A adres bramy jest stale uzupełniany o nowy interfejs sieciowy.
[[email protected] network-scripts]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.88.1 0.0.0.0 UG 100 0 0 eth0
default 192.168.88.1 0.0.0.0 UG 101 0 0 eth1
default 192.168.88.1 0.0.0.0 UG 102 0 0 eth2
172.168.0.0 0.0.0.0 255.255.0.0 U 100 0 0 eth1
172.168.0.0 0.0.0.0 255.255.0.0 U 101 0 0 eth2
192.168.88.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.88.1 0.0.0.0 255.255.255.255 UH 100 0 0 eth1
192.168.88.1 0.0.0.0 255.255.255.255 UH 101 0 0 eth2
Faktycznie, problem pojawia się tylko wtedy, gdy dołączone opcję net.ifnames=0
do grub2
. Ktoś mi pomoże.
znalazłem rozwiązanie na moje pytanie: http://serverfault.com/questions/750950/route-table-issue- when-i-appended-option-net-ifnames-0-to-grub2 –