在具有3个networking接口(1个DHCP和2个静态IP)的云服务器上执行Debian Stretch的新安装之后,我决定不需要可预测的networking接口。 我禁用他们添加net.ifnames=0 Grub内核启动线。
这样做后,networking接口eth1和eth2(2个静态的)将不起作用:
$ifup eth1 RTNETLINK answers: File exists ifup: failed to bring up eth1
/ etc / network / interfaces的内容:
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 allow-hotplug eth0 iface eth0 inet dhcp # web1.domain.com auto eth1 iface eth1 inet static address 100.100.100.227 netmask 255.255.255.0 network 100.100.100.0 gateway 100.100.100.1 broadcast 100.100.100.255 # web2.domain.com auto eth2 iface eth2 inet static address 100.100.100.177 netmask 255.255.255.0 network 100.100.100.0 gateway 100.100.100.1 broadcast 100.100.100.255
任何想法可能导致这一点? 在以前的Debian版本中,我已经成功地使用了这个configuration。
ip a输出:
ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 22:62:77:cd:96:6c brd ff:ff:ff:ff:ff:ff inet 100.100.10à.197/24 brd 100.100.100.255 scope global eth0 valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 22:f9:e4:49:d4:d7 brd ff:ff:ff:ff:ff:ff inet 100.100.100.227/24 brd 100.100.100.255 scope global eth1 valid_lft forever preferred_lft forever 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 22:a8:72:e7:ab:fe brd ff:ff:ff:ff:ff:ff inet 100.100.100.177/24 brd 100.100.100.255 scope global eth2 valid_lft forever preferred_lft forever