I have a cable modem and a dsl modem on a rb 532…
the dsl is the primary gateway for all 0.0.0.0/0 dest. traffic
i can setup a mangle rule to grab icmp’s with a dst ip of the cable modem (the non primary link). I then set it to packet mark routing and give it a name. i then setup a route that says dst (ip of machine doing pining) use gateway of cable modem when you see the packet mark of the mangle rule.
I can see the mangle rule, sees my pings from a external MT router (different part of internet). but they do not route back.
if i simply remove the packet mark part of the route it works and the pings properly go back out across the cable modem (due to the dst. rule of the route)
any ideas? am i doing something to cause the route not to see my packets being marked by the mangle rule?
in the mangle table make sure you added your rule in prerouting and also you want to use routing mark if you are going to change the route of something.
yep, both of those were already done and the route still does not pick up the route packet mark
edit: do you think there is a conflict of somekind since i have two destinations of 0.0.0.0/0 (all) each with different gateways? just one looks for a pakcket mark and one does not.
one that marks the CONNECTION of the prerouting chaing that have the in. interface of the cable modem.
then a 2nd mangle rule that looks for that marked connection on the output chain and then gives it a routing mark which the route with the cable modems Gateway looks for.
so far so good..this maybe a clue to getting session persistance for load balencing a line.
I haven’t understood…
you have DSL modem as primary connection (let’s suppose DSL is 192.168.1.1/24 then eth1 is 192.168.1.2/24).
then default gateway 0.0.0.0 is 192.168.1.1
Now you wand override default gateway rule: all traffic incoming from secondary modem (let’s suppose connected to ether2) is also outgoing from ether2 regardless default gateway rule?
So all incoming from ether2 is also outgoing from ether2?