[root@01 ~]# ifconfig -a // 查看所有网卡的信息(包括down状态的网卡
[root@01 ~]# ifconfig eth0 // 查看指定网卡的信息
[root@01 ~]# ifconfig eth0 up // 启用指定的网卡,等同于:ifup eth0
[root@01 ~]# ifconfig eth0 down // 关闭指定的网卡,等同于:ifdown eth0
[root@01 ~]# ifconfig eth0 arp // 开启网卡的ARP协议
[root@01 ~]# ifconfig eth0 -arp // 关闭网卡的ARP协议
[root@01 ~]# ifconfig eth0 192.168.0.100 // 设置/修改网卡的IP地址(临时生效)
[root@01 ~]# ifconfig eth0 192.168.0.100/24 // 设置/修改网卡的IP地址和子网掩码(临时生效)
[root@01 ~]# ifconfig eth0 192.168.0.100 netmask 255.255.255.0 // 设置/修改网卡的IP地址和子网掩码(临时生效)
[root@01 ~]# ifconfig eth0 192.168.0.100 hw ether 04:64:03:00:12:51 // 设置/修改网卡的IP地址和MAC地址(临时生效),ether(以太网)表示网卡的接口类型
[root@01 ~]# ifconfig eth0 mtu 1500 // 设置/修改网卡的最大传输单元(临时生效)
[root@01 ~]# ifconfig eth0:0 192.168.0.50/24 // 给网卡配置虚拟接口,相当于给网卡再配置一个IP地址(临时生效)
[root@01 ~]# ifconfig eth0:1 192.168.0.51/24 // 给网卡配置虚拟接口,相当于给网卡再配置一个IP地址(临时生效)
[root@01 ~]# ifconfig eth0:2 192.168.0.52/24 // 给网卡配置虚拟接口,相当于给网卡再配置一个IP地址(临时生效