环境介绍:
RB2011,ether1为内网口10.0.0.1,ether2/3是两个外网口。
内网网段:172.16.1.0/172.16.2.0/172.16.3.0/172.16.4.0/10.7.7.0/10.0.0.0,前五个网段通过S5700三层交换到核心网。
计划实现172.16.1.0/172.16.2.0两个网段走ether3的固定IP,172.16.3.0/172.16.4.0/10.7.7.0三个网段走ether2上的pppoe-out1出口。
本文中除有标注外所有IP的掩码均是24位。
1,建立不同网段的NAT Rule,其中必须指定出口。

2,设置Mangle Rule,标记不同走向的数据包,prerouting链表,Action=mark routing。


4,设置路由表,Routing Mark中选择要走特定线路的标记,Gateway中指定其出口,Dst. Address中填0.0.0.0/0按照默认路由处理。
