harck 发表于 2005-1-6 13:37:52

Ros主机上三块网卡1接Lan,绑定192.168.0.1/192.168.1.1两个ip2接电信ADSL3接网通ADSL现在想要192.168.0.1全部走电信的ADSL192.168.1.1走网通的ADSL请问怎么样可以实现?

mrmx 发表于 2005-1-6 14:28:21

浪费浪费,建策略路由多好?目标地址是电信的就让他走电信,目标地址是网通的就让他走网通......你的需求如下方法实现: ip firewall src-nat> add src-address=192.168.0.0/24 \out-interface=电信网卡界面 action=masquerade ip firewall src-nat> add src-address=192.168.1.0/24 \out-interface=网通网卡界面 action=masquerade

harck 发表于 2005-1-6 19:59:09

楼上的方法已经试过,只能一条线通,也就是电信通,网通就不通,网通通,电信就不通策略路由怎么做?

harck 发表于 2005-1-6 20:03:10

网通的地址段是哪些?电信的呢?有没有完全点的统计呢?

mrmx 发表于 2005-1-6 22:19:31

QUOTE (harck @ Jan 6 2005, 08:03 PM)
网通的地址段是哪些?电信的呢?有没有完全点的统计呢?
翻翻看ftp里 bow 的文件夹,偶然发现的;-)需要改造一下啦,那篇文章是给 windows & ipfw 写的然后研究一下:http://www.mikrotik.com/docs/ros/2.8/ip/route.content

mrmx 发表于 2005-1-6 22:28:41

俺才读了几天的手册,还没有太多配置routeos的经验,你的网络情况按照 BGP 备置似乎也好,如果有心得别忘了分享一下

harck 发表于 2005-1-7 09:52:09

谢谢老兄,烟酒烟酒

mrmx 发表于 2005-1-7 11:32:07

在 FAQ 里看到的,和你的需求一致,就是说要用 NAT 而不要用 masquerade , 因为 masquerade 是自动取外部地址的。要指定 'to-src-address' 给 src-nat 规则How can I masquerade two different subnets using two different external IP addresses for them? It is not possible in V2.4. Starting with V2.5, use '/ip firewall src-nat' rule with 'action=nat', specify the 'to-src-address' argument value. It should be one of the router's external addresses. If you use 'action=masquerade', the 'to-src-address' is not taken into account, since it is substituted by the external address of the router automatically.

rainy 发表于 2005-1-7 14:56:05

楼上的方法没用过,不过用源地址策略路由可以实现,说明书里的??路由、等价多径路由、策略路由中有相关描述。策略路由配置比较麻烦,不知道有没有简单的方法。

harck 发表于 2005-1-7 16:01:01

QUOTE (mrmx @ Jan 7 2005, 11:32 AM)
在 FAQ 里看到的,和你的需求一致,就是说要用 NAT 而不要用 masquerade , 因为 masquerade 是自动取外部地址的。要指定 'to-src-address' 给 src-nat 规则How can I masquerade two different subnets using two different external IP addresses for them? It is not possible in V2.4. Starting with V2.5, use '/ip firewall src-nat' rule with 'action=nat', specify the 'to-src-address' argument value. It should be one of the router's external addresses. If you use 'action=masquerade', the 'to-src-address' is not taken into account, since it is substituted by the external address of the router automatically.
今天晚上试用一下这个方法,看看行不行

harck 发表于 2005-1-7 16:04:51

刚刚试了,改成NAT后,网都上不了

0779hjj 发表于 2005-1-7 16:13:02

你的ADSL是pppoe的还是固定IP的?如果是PPPOE不太好办,是固定IP就很容易

mrmx 发表于 2005-1-7 16:19:14

不会吧,我有5个IP,所以我使用的 NAT ,现在工作的好好的,一点问题都没有也,看看对你有用吗?src-address=192.168.0.0/24 out-interface=CNC action=natto-src-address=x.0.x.218-x.0.x.222

harck 发表于 2005-1-7 16:36:18

to-src-address=x.0.191.218-x.0.191.222 这个是什么意思?我这里要不要改什么的?

mrmx 发表于 2005-1-7 21:17:47

就是我对外的5个ip呀,我不能都写全了呀;-)按你的配置填上你的IP就好了
页: [1] 2
查看完整版本: 双ADSL(1电信,1网通)双LAN上网的问题