据我了解,网络接口是网络硬件的软件接口。在我的 Vagrant VM 上
ifconfig
cni0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80::701f:eeff:fe1d:d6e6 prefixlen 64 scopeid 0x20<link>
ether 72:1f:ee:3d:d6:e6 txqueuelen 1000 (Ethernet)
RX packets 25121 bytes 5779617 (5.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27525 bytes 5015563 (5.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:5f:22:da:4b txqueuelen 0 (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
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::31:13ff:fe65:d89d prefixlen 64 scopeid 0x20<link>
ether 02:31:13:65:d8:9d txqueuelen 1000 (Ethernet)
RX packets 493221 bytes 724779493 (724.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 67519 bytes 4607813 (4.6 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.33.10 netmask 255.255.255.0 broadcast 192.168.33.255
inet6 fe80::a00:27ff:fef5:15c2 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:f5:35:c2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25 bytes 1946 (1.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
flannel.1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.42.0.0 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::f811:e6ff:fe7a:ac62 prefixlen 64 scopeid 0x20<link>
ether fa:11:e6:7a:ac:74 txqueuelen 0 (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 5 overruns 0 carrier 0 collisions 0
enp0s3
VM 如何创建它们?和有什么区别enp0s8
?