Would you please take a look and tell me what is wrong here?
[admin@crosslink] ip firewall address-list> print
Flags: X - disabled, D - dynamic
# LIST ADDRESS
0 isp1 81.180.0.0/15
1 isp1 80.96.0.0/15
2 isp1 85.120.0.0/14
[admin@crosslink] ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting dst-address-list=isp1 action=mark-routing new-routing-mark=isp1 passthrough=yes
1 chain=prerouting dst-address-list=!isp1 action=mark-routing new-routing-mark=isp2 passthrough=no
[admin@crosslink] ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE ROUTING MARK
0 ADC xxx.xxx.0.1/32 xxx.xxx.17.200 interface isp1
1 ADC xxx.xxx.93.0/26 xxx.xxx.93.20 interface isp2
2 ADC 192.168.0.0/22 192.168.0.1 interface local
3 A S 0.0.0.0/0 r xxx.xxx.93.1 interface isp2
4 A S 0.0.0.0/0 r xxx.xxx.0.1 interface isp1 isp1
[admin@crosslink] ip dns> print
primary-dns: xxx.xxx.xxx.25 DNS isp1
secondary-dns: xxx.xxx.xxx.20 1DNS isp2
allow-remote-requests: yes
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 244KiB
I would like to route the entire traffic comming from/gowing to ISP1 trough ISP1 gateway and the rest of the traffic trough ISP2 gateway.
However I am making a mistake somewhere. Any help?
[admin@crosslink] ip dns> print
primary-dns: xxx.xxx.xxx.25 DNS isp1
secondary-dns: xxx.xxx.xxx.20 1DNS isp2
allow-remote-requests: yes
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 244KiB
[admin@crosslink] ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE
0 ADC xxx.xxx.0.1/32 xxx.xxx.xxx.xxx isp1 interface
1 ADC xxx.xxx.93.0/26 xxx.xxx.93.20 isp2 interface
2 ADC 192.168.0.0/22 192.168.0.1 Lan
3 A S 0.0.0.0/0 r gatewayISP2 isp2 (routing-mark=isp2_route)
4 A S 0.0.0.0/0 r gatewayISP1 isp1 (routing-mark=isp1_route)
[pentagrama@crosslink] ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat src-address=192.168.0.0/22 action=masquerade
Not sure I completely understand what you want to do, you stated that you want to "entire traffic comming from/gowing to ISP1 trough ISP1 gateway "… how would you know what IPs are under a certains ISPs control?
If you are saying that you want incoming traffic to your router’s external ISP1 interface to be returned the way it arrived (for example a published web server) you wold be better of marking traffic on what interface it arrives on instead of the IP.
Also you need to first do a connection-mark (to be able to track replies) and then mark packets that match the connection-mark, on packet mark rules you should set passthrough=no so that later rules doesn’t change your marks.
Search my posts for a thread discussing policy based routing, you should be able to figure out how to do it from that
Not sure I completely understand what you want to do, you stated that you want to "entire traffic comming from/gowing to ISP1 trough ISP1 gateway "… how would you know what IPs are under a certains ISPs control?
Yes, that is what I would like to do. I know all addresses alocated to ISP1 from http://www.ripe.net and I inserted them in an Address List.