1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| root@ubuntu20041-server:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 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 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 100 0 link/ether 00:0c:29:06:52:fc brd ff:ff:ff:ff:ff:ff inet 192.168.3.189/24 brd 192.168.3.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe06:52fc/64 scope link valid_lft forever preferred_lft forever 3: ens38: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 00:0c:29:06:52:06 brd ff:ff:ff:ff:ff:ff #此时ens38状态是down
#添加ens38固定IP地址 vim /etc/netplan/00-installer-config.yaml # This is the network config written by 'subiquity' network: ethernets: ens33: addresses: [192.168.3.189/24] dhcp4: no optional: true gateway4: 192.168.3.1 nameservers: addresses: [192.168.3.1,114.114.114.114] ens38: addresses: [192.168.3.199/24] dhcp4: no optional: true gateway4: 192.168.3.1 nameservers: addresses: [192.168.3.1,114.114.114.114] version: 2 renderer: networkd
|