在ubuntu16.04上,我使用了包含以下信息的接口文件:
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# Public Interface (Static IP)
auto enp2s0
iface enp2s0 inet static
address 192.168.88.13
gateway 192.168.88.1
netmask 255.255.255.0
broadcast 192.168.88.255
dns-nameservers 8.8.8.8 8.8.4.4
dns-search 8.8.8.8 8.8.4.4
dns-domain 8.8.8.8 8.8.4.4
# Local Network Interface (Static IP)
auto enp2s1
iface enp2s1 inet static
address 192.168.0.10
netmask 255.255.255.0
broadcast 192.168.0.255
network 192.168.0.0工作得很好。现在更新Ubuntu18.04并且不工作enp2s0 (第一个接口公共)
ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.88.13 netmask 255.255.255.0 broadcast 192.168.88.255
ether 94:18:82:0c:00:01 txqueuelen 1000 (Ethernet)
RX packets 570 bytes 53571 (53.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 79 bytes 11201 (11.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 仅在dhcp工作:
auto enp2s0
iface enp2s0 inet dhcp不接受以前的配置的新版本发生了什么变化?谢谢
发布于 2019-08-16 20:48:42
在Ubuntu 18服务器的新安装上,您可以使用与在/etc/ network /接口中Ubuntu 16服务器上使用的相同的网络配置,而且它可以工作,只有您必须:
sudo apt install ifupdowncd /etc/netplan/然后mv 50-cloud-init.yaml 50-cloud-init.yaml.old我猜它还可以从Ubuntu 16服务器升级到Ubuntu 18服务器。
https://unix.stackexchange.com/questions/446039
复制相似问题