[Turn] Ubuntu16.04 character interface ifconfig command has no solutions of network interface ens33

@ubuntu:~$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 591 bytes 37975 (37.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 591 bytes 37975 (37.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lxcbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.0.3.1 netmask 255.255.255.0 broadcast 0.0.0.0
ether 00:16:3e:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

In fact, not an interface does not exist, but the interface is not UP

l@ubuntu:~$ ifconfig -a
ens33: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:0c:29:60:ac:56 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2253 bytes 141605 (141.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2253 bytes 141605 (141.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lxcbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.0.3.1 netmask 255.255.255.0 broadcast 0.0.0.0
ether 00:16:3e:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

Solution:

sudo dhclient

@ubuntu:~$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.242.131 netmask 255.255.255.0 broadcast 192.168.242.255
inet6 fe80::20c:29ff:fe60:ac56 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:60:ac:56 txqueuelen 1000 (Ethernet)
RX packets 6341 bytes 8528561 (8.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2153 bytes 164046 (164.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2729 bytes 172609 (172.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2729 bytes 172609 (172.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lxcbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 10.0.3.1 netmask 255.255.255.0 broadcast 0.0.0.0
ether 00:16:3e:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

Guess you like

Origin www.cnblogs.com/ybluo/p/10989929.html