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 192.168.1.3
#route add –host 192.168.1.3 dev eth0:1
(3) 激活设备。
#ifconfig eth0 up
(4) 禁用设备。
#ifconfig eth0 down
(5) 查看指定的网络接口的配置。
#ifconfig eth0
(6) 查看所有的网络接口配置。
#ifconfig
2、 route
可以使用route命令来配置并查看内核路由表的配置情况。
例如:
(1) 添加到主机...[ 查看全文 ]