Community discussions

 
jo2jo
Forum Veteran
Forum Veteran
Topic Author
Posts: 958
Joined: Fri May 26, 2006 1:25 am

Packet mark routing

Wed Oct 04, 2006 8:29 pm

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?


thanks,
 
Stryker777
Frequent Visitor
Frequent Visitor
Posts: 71
Joined: Fri Jul 07, 2006 11:40 pm
Contact:

Wed Oct 04, 2006 8:41 pm

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.
 
jo2jo
Forum Veteran
Forum Veteran
Topic Author
Posts: 958
Joined: Fri May 26, 2006 1:25 am

Wed Oct 04, 2006 11:02 pm

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.
 
jo2jo
Forum Veteran
Forum Veteran
Topic Author
Posts: 958
Joined: Fri May 26, 2006 1:25 am

Wed Oct 04, 2006 11:29 pm

ok i got it:

what i did was make two mangle rules:

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.
 
el berto
Member Candidate
Member Candidate
Posts: 197
Joined: Wed Sep 26, 2007 10:53 am

Re: Packet mark routing

Mon Jul 21, 2014 12:03 pm

May you post configuration?

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?
 
User avatar
kameelperdza
Member
Member
Posts: 469
Joined: Thu Nov 27, 2008 11:45 am
Location: Oudtshoorn, South Africa

Re: Packet mark routing

Mon Jul 21, 2014 3:22 pm

Hi check this.
Example

/ip route add dst-address=0.0.0.0/0 gateway=(cable modem) routing-mark=cable

/ip firewall mangle add src-address=(your pc) routing-mark=cable protocol=icmp
Give me some karma
 
User avatar
kameelperdza
Member
Member
Posts: 469
Joined: Thu Nov 27, 2008 11:45 am
Location: Oudtshoorn, South Africa

Re: Packet mark routing

Mon Jul 21, 2014 3:27 pm

If you remote router see your pings.

On remote router.

add this.

/ip route add dst-address=(your pc address or range) gateway=(the address of the rb532)

for example = /ip route add dst-address=192.168.0.2 gateway=10.0.0.1

This rule will tell the remote router where to send the reply back.
Give me some karma

Who is online

Users browsing this forum: No registered users and 44 guests