- 初步介紹
ifconfig 是一個用來查看、配置、啟用或禁用網絡接口的工具。
- 輸出詳解
學習ifconfig我們首先會看,然后才是會用,因此這里我們先整理ifconfig的輸出詳解,看懂ifconfig的輸出結果。
:~$ 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 (本地環回) RX packets 12109 bytes 962531 (962.5 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12109 bytes 962531 (962.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet *.*.*.* netmask 255.255.252.0 broadcast ***** inet6 ****** prefixlen 64 scopeid 0x20<link> ether ****** txqueuelen 1000 (以太網) RX packets 284241 bytes 223812079 (223.8 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 88886 bytes 26926696 (26.9 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
flags | 網口狀態。 UP:表示“接口已啟用”。 |
mtu | 最大傳輸單元,以字節為單位。 |
inet | 網卡的ip地址,ipv4。 |
netmask | 網絡掩碼 |
broadcast | 廣播地址 |
inet6 | ipv6地址 |
ether | 鏈接方式為以太網,后面為硬件mac地址 |
txqueuelen |
網卡的傳送隊列長度 |
RX packets |
接收正確的數據包數。 |
RX bytes |
接收的數據量。 |
RX errors |
接收時,產生錯誤的數據包數。 |
RX dropped |
接收時,丟棄的數據包數。 |
RX overruns |
接收時,由於速度過快而丟失的數據包數。 |
RX frame |
接收時,發生frame錯誤而丟失的數據包數。 |
TX同理 |
|
TX carrier |
發送時,發生carrier錯誤而丟失的數據包數。 |
collisions |
沖突信息包的數目。 |
參考文獻
- https://www.cnblogs.com/shuai7boy/p/11387990.html