I've added "quick" word to the probabilistic rules and it works better, but 
still not sure how to deal with vether.

  Исходное сообщение  
От: lausg...@gmail.com
Отправлено: среда, 8 июля 2015 г., 21:05
Кому: misc@openbsd.org
Тема: nat on addresses with different default routes

My isp gives me a bunch of dynamic external ip addresses via dhcp one per nic. 
They don't share common default gateway route all together, so I'm forced to 
put each next in its own rdomain.

As so, http://www.openbsd.org/faq/pf/pools.html#nat or 
http://www.openbsd.org/faq/pf/pools.html#outgoing examples are not applicable.
I'm just interested in random redistribution. Here's an ugly solution I 
currently use:
match out on em0 inet from lan:network nat-to (em0:0)
match out on em1 inet from lan:network nat-to (em1:0)
match out on em2 inet from lan:network nat-to (em2:0)

pass in on lan inet from lan:network to !lan:0 # fallback
pass in on lan inet from lan:network to !lan:0 rtable 1 probability 34%
pass in on lan inet from lan:network to !lan:0 rtable 2 probability 34%

What would be the correct way of doing this? Is it possible to achieve this 
using vether(4) without big performance penalty (which occurs when real nic and 
virtual interface which relies on it are not in the same rdomain)? Thanks!

Reply via email to