Community discussions

MikroTik App
 
jamiewatson69
newbie
Topic Author
Posts: 27
Joined: Sun Mar 28, 2010 1:44 pm

Per-Packet Routing

Sat Oct 02, 2010 12:04 am

Evening All,

Does anyone know if you can do per-packet routing with the Mikrotik? The nearest I have found is ECMP but the docs state that "A new gateway is chosen for each new source/destination IP pair" so therefore its technically not per packet.

Thanks
Jamie
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Per-Packet Routing

Sat Oct 02, 2010 12:39 am

Nth and routing marks should be able to do so. There are wiki entries for both. Nth can mark every nth packet with a routing mark. Seems kind of expensive though. Why do you need this? Are you sure that bonding with a balanced mode would not work better?
 
jamiewatson69
newbie
Topic Author
Posts: 27
Joined: Sun Mar 28, 2010 1:44 pm

Re: Per-Packet Routing

Sun Oct 03, 2010 1:40 pm

Hi,

Thanks for the reply, I did manage to work it out shortly after I have posted it! It seems to do exactly what I want! My reasons are that we use an ISP that allows us to send packets up any number of ADSL routers from the same routed IP block, that way we don't have to worry about returning traffic coming down the sam line etc.. as it doesn't matter! Does that sort of make sense?

I am interested in your 'expensive' comment. Its my understanding that nth should be relatively low processing power?

Also any ideas on the best way to shape the traffic using nth? I have two lines that sync as 1800 and one that syncs at 800, so I would like to send less traffic down one line...

Thanks
Jamie
http://www.fusionmanageit.co.uk
Fusion IT Management Limited
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Per-Packet Routing

Sun Oct 03, 2010 3:47 pm

Expensive in resources is always a relative term. If it works for you, it works for you.

To balance roughly between 1,800 and 800 have 3 rules with Nth decisions, and have two send to one circuit and one to the other. That way you get a 2:1 split. If you wanted to you could do 26 rule for 18:8 (=1800:800) split but that would probably be overkill.
 
jamiewatson69
newbie
Topic Author
Posts: 27
Joined: Sun Mar 28, 2010 1:44 pm

Re: Per-Packet Routing

Mon Oct 04, 2010 3:40 pm

Yep that makes perfect sense, thanks!! Hit yet another brick wall!! How can you use Nth for packets that are NAT'ed or orginate from the firewall ie IPSEC traffic and hosts that are hidden behind an IP address that is on the Microtik?

Thanks
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Per-Packet Routing

Mon Oct 04, 2010 4:19 pm

That completely changes the scenario. You would be best off using PCC, which is a completely different load balancing technique and allows you to be stable on a connection basis (connections recognized as the same by the classifier always take the same circuit). Search the wiki for PCC and you'll find a manual wi a detailed example.
 
jamiewatson69
newbie
Topic Author
Posts: 27
Joined: Sun Mar 28, 2010 1:44 pm

Re: Per-Packet Routing

Mon Oct 04, 2010 5:18 pm

Humm, interesting! I was hoping that Nth might do the trick as I actually don't care about a connection taking the same circuit as our ISP doesn't care either! Nth was working perfectly for all traffic that wasn't IPSEC related and originating from the router! It seems to me it would be harder to shape traffic using PCC?

Thanks
Jamie
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Per-Packet Routing

Mon Oct 04, 2010 5:23 pm

It is a little bit harder, but when a connection requires that something come from the same circuit/router/NAT IP then sticking the connection to a router via PCC is the best solution. You can limit the PCC to the connections that require stickiness and do Nth for everything else.
 
jamiewatson69
newbie
Topic Author
Posts: 27
Joined: Sun Mar 28, 2010 1:44 pm

Re: Per-Packet Routing

Fri Oct 08, 2010 1:56 pm

Can nth actually be used to match traffic that is sent from the router? I seem to be struggling!!

Thanks
Jamie
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Re: Per-Packet Routing

Fri Oct 08, 2010 8:44 pm

be aware that you will have packets arriving out of order if you just throw them out alternate ports. this will kill tcp performance and really hinder UDP stuff like voip. you should stick to connection based routing rather than per packet IMO.
 
JorgeAmaral
Trainer
Trainer
Posts: 199
Joined: Wed Mar 04, 2009 11:53 pm
Location: /ip route add type=blackhole

Re: Per-Packet Routing

Fri Oct 22, 2010 5:59 am

If you have several ADSL lines, the best aproach should be MLPPP.

Best regards,
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Per-Packet Routing

Fri Oct 22, 2010 12:48 pm

problem with mlppp is that requires your vendor to support that on their end. But that could solve a lot of issues. Also, as noted by posters before me - if you require connection "stickiness" and want to keep configuration relatively simple, stick with PPC if you have a lot of connections they will balance out beautifully.