Chinaunix

标题: linux 双线遇到的奇怪问题! [打印本页]

作者: zhxyz    时间: 2011-01-17 16:16
标题: linux 双线遇到的奇怪问题!
本帖最后由 zhxyz 于 2011-01-17 16:17 编辑

Centos 5.5 dell R710 机器 4个网卡,只用了两个 eth1 (联通)eth2(网通)  eth0和eth3没启用
eth1的IP为60.xxx.xxx.94 (网关93) eth2的IP为222.xxx.240.4(网关222.xxx.240.1)

route -n
60.xxx.xxx.92   0.0.0.0         255.255.255.252 U     0      0        0 eth1    (联通)
222.xxx.240.0   0.0.0.0         255.255.255.248 U     0      0        0 eth2     (网通)
0.0.0.0         60.xxx.xxx.93   0.0.0.0         UG    0      0        0 eth1

我从本机上ping 网通网关
PING 60.xxx.xxx.93 (60.xxx.xxx.93) 56(84) bytes of data.
64 bytes from 60.xxx.xxx.93: icmp_seq=1 ttl=255 time=2.45 ms
64 bytes from 60.xxx.xxx.93: icmp_seq=2 ttl=255 time=1.46 ms
64 bytes from 60.xxx.xxx.93: icmp_seq=3 ttl=255 time=2.20 ms

ping电信网关
PING 222.xxx.240.1 (222.xxx.240.1) 56(84) bytes of data.
64 bytes from 222.xxx.240.1: icmp_seq=1 ttl=244 time=139 ms
64 bytes from 222.xxx.240.1: icmp_seq=2 ttl=244 time=137 ms
64 bytes from 222.xxx.240.1: icmp_seq=3 ttl=244 time=137 ms
64 bytes from 222.xxx.240.1: icmp_seq=4 ttl=244 time=137 ms

单设一个电信IP正常,把default gw 设为电信IP正常
后来我做了如下操作
ip route flush table tel
ip route add default via 222.xxx.240.1 dev eth2 src 222.xxx.240.4 table tel
ip rule add from 222.xxx.240.4 table tel
ip route flush table cnc
ip route add default via 60.xxx.xxx.93 dev eth1 src 60.xxx.xxx.94 table cnc
ip rule add from 60.xxx.xxx.94 table cnc

不起作用,还是那样,我又增加了部分路由
route add -net 222.xxx.240.0/24 gw 222.xxx.240.1
不管用,又换成
route add -net 222.xxx.240.0/24 dev eth2 也不管用

没办法了,请大家帮帮忙吧!
作者: 版主杀手    时间: 2011-01-17 16:34
你到底想实现什么目的?
作者: chenyx    时间: 2011-01-17 16:50
http://lartc.org,楼主下文档研究下吧
作者: zhxyz    时间: 2011-01-19 22:39
你到底想实现什么目的?
版主杀手 发表于 2011-01-17 16:34



    主要问题是现在ping电信网关延迟太大,
ping电信网关
PING 222.xxx.240.1 (222.xxx.240.1) 56(84) bytes of data.
64 bytes from 222.xxx.240.1: icmp_seq=1 ttl=244 time=139 ms
64 bytes from 222.xxx.240.1: icmp_seq=2 ttl=244 time=137 ms
64 bytes from 222.xxx.240.1: icmp_seq=3 ttl=244 time=137 ms
64 bytes from 222.xxx.240.1: icmp_seq=4 ttl=244 time=137 ms




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2