发新话题
打印

10 Useful “IP” Commands to Configure Network Interfaces

10 Useful “IP” Commands to Configure Network Interfaces

[root@tecmint ~]# vi  etc sysconfig/network-scripts/ifcfg-eth0

or  etc network/interfaces

#  etc init.d/networking restart

# ip addr add 192.168.50.5 dev eth1

# ip addr show

# ip addr del 192.168.50.5/24 dev eth1

# ip link set eth1 down

# ip route show

# ip route add 10.10.20.0/24 via 192.168.50.100 dev eth0

# ip route del 10.10.20.0/24

# vi  etc sysconfig/network-scripts/route-eth0
10.10.20.0/24 via 192.168.50.100 dev eth0

or
$ sudo vi  etc network/interfaces

#  etc init.d/network restart

# ip route add default via 192.168.50.100


原文:http://www.tecmint.com/ip-command-examples/

TOP

发新话题