2021-05-12 14:32:11
Linux教學:ifconfig 使用
2020-06-16 17:33:36
ifconfig
修改網絡卡的組態檔,預設選項和引數是檢視啟用狀態的網絡卡資訊
$ ifconfig
eth0 Link encap:Ethernet HWaddr b8:88:e3:e9:1f:2d
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:20102 errors:0 dropped:0 overruns:0 frame:0
TX packets:20102 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1897763 (1.8 MB) TX bytes:1897763 (1.8 MB)
wlan0 Link encap:Ethernet HWaddr e0:06:e6:cd:f8:cf
inet addr:192.168.1.111 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e206:e6ff:fecd:f8cf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11539 errors:0 dropped:3 overruns:0 frame:0
TX packets:7005 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3352856 (3.3 MB) TX bytes:891096 (891.0 KB)
說明:eth0
, wlan0
#網絡卡名lo
主機環迴地址Link encap
#連線型別HWaddr
#HardWareaddress,即MAC地址inet addr
#ip地址Bcast
#廣播地址Mask
#子網掩碼
$ifconfig [網絡卡名] [選項] [引數]add [地址]
#設定ip地址del [地址]
#刪除ip地址up
#啟動網路裝置down
#關閉網路裝置hw [裝置型別] [硬體地址]
# 設定網路裝置的型別與硬體地址irq[IRQ地址]
# 設定網路裝置的IRQnetmask [子網掩碼]
# 設定子網掩碼broadcast [廣播地址]
# 設定廣播地址
本文永久更新連結地址:http://www.linuxidc.com/Linux/2016-09/135151.htm
相關文章