1.设置网卡
(1)Interfaces中>Add中命名1号网卡为(WAN1);Add中命名2号网卡为(WAN2);Add中命名3号网卡为(LAN1);
(2)IP Addresses>设置WAN1 IP:219.139.191.25 ;
(3)IP Addresses>设置WAN1 IP:172.16.10.2;
(4)Interfaces中>Add>;PPPoE Client添加ADSL拨号 命名为(宽带B)输入帐号密码,设置拨号网卡为WAN2;
(5)IP Addresses>设置LAN1 IP:192.168.1.1;
2.添加默认路由
(1)IP>Routes>Add Destination=0.0.0.0/0 Gateway=219.139.191.1 Check Gateway=Ping Distance0;
(2)IP>Routes>Add Destination=0.0.0.0/0 Gateway=172.16.10.1 Check Gateway=Ping Distance2;
(3)IP>Routes>Route List里的(宽带B)
3.添加基于用户IP地址的路由策略IP>Firewall>Mangle
(1)添加双号IP地址策略
General页面 Add"+" Chain=prerouting Src.Address:192.168.1.2/32
Action页面 Action=mark routing New Routing Mack=192.168.1.2 取消Passthrough前面的勾
General页面 Add"+" Chain=prerouting Src.Address:192.168.1.4/32
Action页面 Action=mark routing New Routing Mack=192.168.1.4 取消Passthrough前面的勾
(2)添加单号IP地址策略
General页面 Add"+" Chain=prerouting Src.Address:192.168.1.3/32
Action页面 Action=mark routing New Routing Mack=192.168.1.3 取消Passthrough前面的勾
General页面 Add"+" Chain=prerouting Src.Address:192.168.1.5/32
Action页面 Action=mark routing New Routing Mack=192.168.1.5 取消Passthrough前面的勾
依次类推吧,等我下次发一些脚本上来,目前只是理论阶段。
4.路由表中设置端口策略
(1).IP>Routes>Add Destination=0.0.0.0/0 Gateway=219.139.191.1 Check Gateway=Ping Distance1 Mark=192.168.1.3;
(2).IP>Routes>Add Destination=0.0.0.0/0 Gateway=219.139.191.1 Check Gateway=Ping Distance1 Mark=192.168.1.5;
(3).IP>Routes>Add Destination=0.0.0.0/0 Gateway=172.16.10.1 Check Gateway=Ping Distance2 Mark=192.168.1.3;
(4).IP>Routes>Add Destination=0.0.0.0/0 Gateway=172.16.10.1 Check Gateway=Ping Distance2
Mark=192.168.1.5;
只有添加一种系列IP的,比如你添加的是单号的,就3.5.7.9.11...等等,双号的就不要添加路由表了,这样光纤断了单号会自动走172.16.10.1这个小路由的ADSL网线,双号的就走宽带B了。光纤恢复全部自动走回光纤