2024年3月30日发(作者:)
linux下查看网络配置命令
使用以下命令配置以太网络
1、 ifconfig
可以使用ifconfig命令来配置并查看网络接口的配置情况。
例如:
(1) 配置eth0的IP地址, 同时激活该设备。
#ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
(2) 配置eth0别名设备eth0:1的IP地址,并添加路由。
#ifconfig eth0:1 192.168.1.3
#route add –host 192.168.1.3 dev eth0:1
(3) 激活设备。
#ifconfig eth0:1 up
(4) 禁用设备。
#ifconfig eth0:down
(5) 查看指定的网络接口的配置。
#ifconfig eth0
(6) 查看所有的网络接口配置。
#ifconfig
(7)Linux下的修改mac:
1.必须关闭网卡设备,否则会报告系统忙,无法更改。
命令是:“ifconfig eth0 down”。
2.修改Mac地址,这一步较Windows中的修改要简单。
命令是:“ifconfig eth0 hw ether 00AABBCCDDEE”
3.重新启用网卡
“ifconfig eth0 up”网卡的Mac地址更改就完成了。
现在还有很多软件提供了修改Mac地址的功能,如:Mac2001


发布评论