# Display network settings of the first ethernet adapter#显示第一个以太网适配器的网络设置ifconfig wlan0
# Display all interfaces, even if down#显示所有接口,即使向下ifconfig-a# Take down / up the wireless adapter#取下/升起无线适配器ifconfig wlan0 {up|down}# Set a static IP and netmask#设置静态IP和网络掩码ifconfig eth0 192.168.1.100 netmask 255.255.255.0
# You may also need to add a gateway IP#您可能还需要添加网关IP
route add-net192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
# 为网卡配置和删除IPv6地址# 为网卡设置IPv6地址ifconfig eth0 add 33ffe:3240:800:1005::2/ 64# 为网卡删除IPv6地址ifconfig eth0 del 33ffe:3240:800:1005::2/ 64# 用ifconfig修改MAC地址# 关闭网卡ifconfig eth0 down
#修改MAC地址ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE
#启动网卡ifconfig eth0 up
#关闭网卡并修改MAC地址 ifconfig eth1 hw ether 00:1D:1C:1D:1E
#启动网卡ifconfig eth1 up
# 启用和关闭ARP协议# 开启ifconfig eth0 arp
#关闭 ifconfig eth0 -arp