- 论坛徽章:
- 1
|
原帖由 ibmlenovo 于 2008-7-17 10:53 发表 ![]()
执行netstat -rn
会显示 :
10.10.2.1 255.*****
10.10.2.2 2555 *****
这样就是10.10.2.1先出去,如果要10.10.2.2先出去,
就执行 ifconfig bge1 down;然后再 ifconfig bge1 up 就可以。
在检查路由表: ...
谢谢你的方法!
刚才我只是举个例,下面是真正的配置,麻烦你看下。现在源地址都是10.91.204.51 ,我想用10.91.204.53作为源地址,
ifconfig e1000g1 down;然后再 ifconfig e1000g1 up 就可以了么?
配置:
BPRQSN21{root}: ifconfig -a
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.91.204.51 netmask ffffff00 broadcast 10.91.204.255
ether 0:14:4f:d3:9e:92
e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.91.204.53 netmask ffffff00 broadcast 10.91.204.255
ether 0:14:4f:d3:9e:92
e1000g1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.91.204.54 netmask ffffff00 broadcast 10.91.204.255
e1000g1:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 10.91.204.55 netmask ffffff00 broadcast 10.91.204.255
BPRQSN21{root}: netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 10.91.204.241 UG 1 8399
10.91.204.0 10.91.204.51 U 1 7586 e1000g0
10.91.204.0 10.91.204.53 U 1 0 e1000g1
10.91.204.0 10.91.204.54 U 1 0 e1000g1:1
10.91.204.0 10.91.204.55 U 1 0 e1000g1:2
224.0.0.0 10.91.204.53 U 1 0 e1000g1
127.0.0.1 127.0.0.1 UH 4 74225 lo0 |
|