日期:2014-05-16 浏览次数:20680 次
[root@localhost etc]# ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:98:1C:2E inet addr:192.168.1.103 Bcast:255.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe98:1c2e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:59217 errors:0 dropped:0 overruns:0 frame:0 TX packets:45034 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:24197483 (23.0 MiB) TX bytes:7882365 (7.5 MiB) Interrupt:10 Base address:0xd020 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:62 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8325 (8.1 KiB) TX bytes:8325 (8.1 KiB)
[root@localhost etc]# ifconfig eth0:1 192.168.1.201 netmask 255.255.255.0 up [root@localhost etc]# route add -host 192.168.1.201 dev eth0:1 [root@localhost etc]# [root@localhost etc]# ifconfig eth0:2 192.168.1.202 netmask 255.255.255.0 up [root@localhost etc]# route add -host 192.168.1.202 dev eth0:2
[root@localhost etc]# ifconfig eth0:1 down [root@localhost etc]# ifconfig eth0:2 down
[root@localhost etc]# route del 192.168.1.201 dev eth0:1 [root@localhost etc]# route del 192.168.1.202 dev eth0:2