叮叮当当 发表于 2015-9-20 11:30:15

请教大神:

ROS双Wan口(一条联通线路,一条电信线路),做pptp的VPN,我想默认使用电信的线路
两条线路同时存在的时候就不行,把联通线路停掉只留电信线路就是正常的,
判断pptp配置是正常的,应该是ROS自己本身的出口标记或路由不对,请大神指点。
电信IP61.*.*.*    联通IP218.*.*.*
客户端拨号使用联通IP拨号正常,但是上不了网
把联通线路停掉使用电信IP拨号正常,可以上网

叮叮当当 发表于 2015-9-21 16:03:37

自问自答吧,找了几天,应该是这样做

ip firewall mangle add chain=input action=mark-connection new-connection-mark=liantong_connpassthrough=yes connection-state=new in-interface=WAN1      //对从WAN1口进来的数据包标记连接,连接名liantong_conn
ip firewall mangle add chain=output action=mark-routing new-routing-mark=wangtong_routingpassthrough=yes connection-mark=liantong_conn                      //把liantong_conn的连接标记为liantong_routing路由

ip firewall mangle add chain=input action=mark-connection new-connection-mark=dianxin_connpassthrough=yes connection-state=new in-interface=WAN2      //对从WAN2口进来的数据包标记连接,连接名dianxin_conn
ip firewall mangle chain=output action=mark-routing new-routing-mark=dianxin_routingpassthrough=yes connection-mark=dianxin_conn                                    //把dianxin_conn的连接标记为dianxin_routing路由

ip--route里面添加两条路由
0.0.0.0/0.0.0.0gateway 218.*.*.*Routing_Markliantong_conn
0.0.0.0/0.0.0.0gateway 61.*.*.*Routing_Markdianxin_conn

jldfwwt 发表于 2015-10-1 20:33:47

:):D:):(:D:):)

edgesky 发表于 2015-10-2 09:05:16

何必用man呢?
ip-route就解决了啊。rule策略路由

叮叮当当 发表于 2015-10-8 09:34:21

edgesky 发表于 2015-10-2 09:05
何必用man呢?
ip-route就解决了啊。rule策略路由

具体怎么写策略路由?

edgesky 发表于 2015-10-9 08:22:35

叮叮当当 发表于 2015-10-8 09:34
具体怎么写策略路由?

你研究下ip,router下的rule选项卡就知道了
页: [1]
查看完整版本: 请教大神: