1、打開和關閉
ifconfig eth0 up
ifconfig eth0 down
2、配置ip、子網路遮罩、網關
ifconfig eth0 172.18.31.98 netmask 255.255.255.0
route del default eth0
route add default gw 172.18.1.1 dev eth0
3、臨時修改mac
ifconfig eth0 down
ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
ifconfig eth0 up