deepin系统使用ifconfig -a 输出参数详细介绍
xys@xys-PC:~$ ifconfig -a
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.192.192.84 netmask 255.255.255.0 broadcast 192.192.192.255
inet6 fe80::3784:298a:b3dc:8e3e prefixlen 64 scopeid 0x20<link>
ether fc:45:96:66:b3:99 txqueuelen 1000 (Ethernet)
RX packets 571291 bytes 707646940 (674.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223616 bytes 20763824 (19.8 MiB)
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 30486 bytes 5492649 (5.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30486 bytes 5492649 (5.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vboxnet0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:00:27: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
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 194.194.194.39 netmask 255.255.255.0 broadcast 194.194.194.255
inet6 fe80::d265:5eee:f393:d670 prefixlen 64 scopeid 0x20<link>
ether 70:1c:e7:26:85:0e txqueuelen 1000 (Ethernet)
RX packets 29697 bytes 5136323 (4.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1332 bytes 189908 (185.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp4s0表示第一块网卡
en
表示ethernet
以太网
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.192.192.84 netmask 255.255.255.0 broadcast 192.192.192.255
inet6 fe80::3784:298a:b3dc:8e3e prefixlen 64 scopeid 0x20<link>
ether fc:45:96:66:b3:99 txqueuelen 1000 (Ethernet)
RX packets 571291 bytes 707646940 (674.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 223616 bytes 20763824 (19.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- UP 代表这个网卡是开启状态
- RUNNING 代表这个网卡是处于网络连接状态
- MULTICAST 代表这个网卡是支持组播的
- mtu 1500 代表这个网卡最大的单元传输为1500字节
inet表示网卡的ip地址
netmask表示的是网卡的子网掩码
broadcast表示的是网卡的广播地址
ether表示的事网卡的mac地址
Ethernet链接类型为以太网
TX packets 网卡发送数据包的信息
TX errors 网卡发送数据是错误的信息
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 30486 bytes 5492649 (5.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30486 bytes 5492649 (5.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo 是表示主机的回坏地址,这个一般是用来测试一个网络程序,但又不想让局域网或外网的用户能够查看,只能在此台主机上运行和查看所用的网络接口。比如把 HTTPD服务器的指定到回坏地址,在浏览器输入 127.0.0.1 就能看到你所架WEB网站了。但只是您能看得到,局域网的其它主机或用户无从知道。
vboxnet0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:00:27: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
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 194.194.194.39 netmask 255.255.255.0 broadcast 194.194.194.255
inet6 fe80::d265:5eee:f393:d670 prefixlen 64 scopeid 0x20<link>
ether 70:1c:e7:26:85:0e txqueuelen 1000 (Ethernet)
RX packets 29697 bytes 5136323 (4.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1332 bytes 189908 (185.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wl
表示wlan
(Wireless Local Area Network)无线局域网
wlp3s0
表示,WLAN PCI接口位置:bus=3, slot=0。enp2s0
表示,Etnernet PCI接口位置:bus=2, slot=0。
这两个无线网卡
ifconfig 用于配置网络接口 InterFace config
iwconfig 用于配置无线网络接口 Interface Wlan config