Linux之ifconfig命令

来源:互联网 发布:信融财富网络贷款 编辑:程序博客网 时间:2024/05/21 22:40

编号

命令

1

/etc/rc.d/rc.local
ifconfig eth0 down
ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
ifconfig eth0 up

配置网卡为一个固定的Mac地址(reboot后不再改变Mac)

2

ifconfig eth0 192.168.0.1 netmask 255.255.255.0

为eth0配置IP地址

3

ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0

为eth0再配置一个IP地址

4

ifconfig eth0 down/up

将网卡启用/禁用

4

ifconfig -a

显示所有接口信息

 

0 0
原创粉丝点击