DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 10th November 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,168
Default

Quote:
Originally Posted by SlyM View Post
Should I just do away with multipath routes and just use pf route-to rules for this?
That would allow you to route outgoing packets by filter rule (such as by application). You could experiment, but I really recommend getting another opinion, from the broader community.
Reply With Quote
Old 10th November 2010
SlyM SlyM is offline
Port Guard
 
Join Date: Nov 2010
Posts: 21
Default

Thanks again, I appreciate the info and help, especially the bit about the alias addresses not meant for routing, I did not know that.

You are correct though, its basically a 2 node carp cluster with identical setups. I'm just having difficulties load balancing the 2 Internet connections from the firewall node itself. I can do it successfully with traffic from the LAN via a route-to rule in pf...but again...that's not exactly making use of ECMP, and I would be fine with that...but I just can't seem to figure out how to write a similar set of rules to do the same kind of load balancing for traffic originating from the firewall itself (ie, to download ports or packages or even general diagnostic traffic to the Internet).

But thanks again for the help...I really appreciate it.
Reply With Quote
Old 1st July 2016
OpenBSDDragon OpenBSDDragon is offline
New User
 
Join Date: Jun 2016
Location: Austria, Vienna
Posts: 7
Default

Quote:
Originally Posted by SlyM View Post
Hello everyone,

I'd like to ask all of those who have serious in-depth knowledge of how the OpenBSD kernel works and how pf works to answer a possibly simple, possibly complicated question.

Basically what I want to know is how the multipath routing in the OpenBSD kernel works. Is it meant to work for multiple routers available on the same subnet or can they be on separate subnets? I am trying to use only 1 NIC for egress traffic to the Internet. Both routes are actually 2 separate ISP connections (say cable and dsl) over a single NIC with both lines connected to it via a switch and ISP1's IP assigned to the NIC as the primary IP and the IP of ISP2 aliased onto the same NIC and then using multipath default routes to define the default gateways of each ISP connection.

What I'm basically trying to do it load balance 2 Internet connections with my OBSD firewall. But with simple multipath routes it sort of works, but I suffer a whole heck of a lot of packet loss.

What I ultimately found using line snooping Ethernet sniffers is that the firewall would sometimes attempt to send traffic from one ISP's IP address to the default gateway of the other ISP's connection. I assumed this would not happen since each ISP connection has a small 5 IP subnet and I did specify the netmask and the default gateway for each ISP is within its subnet. I made the seemingly logical assumption that it would intelligently route traffic from ISP1's IP to ISP1's default gateway and ISP2's IP to ISP2's default gateway. But it doesn't seem to be doing that, picking a default gateway seemingly at random without taking into consideration the source IP its employing at the moment.

Why is this? Am I misunderstanding what multipath routes are meant for? Or is this a bug in the kernel/my configuration of multipath?

I found a seemingly slightly better working solution with just using Route-to rules in pf. I now no longer suffer from packets going down the wrong default gateway, but I only have the default gateway for ISP1's connection defined for this to work right.

Is multipath routing only meant to work for routers on the same subnet?
Hi, here it is very well explained

http://www.openbsd.org/faq/faq6.html#Multipath
Reply With Quote
Old 1st July 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,218
Default

OpenBSDDragon, you are responding to a thread which is six years old.
Reply With Quote
Old 1st July 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,168
Default

And six years ago, the #Multipath section of FAQ 6 was 6.14, which I'd pointed to in my first reply.
Reply With Quote
Old 1st July 2016
OpenBSDDragon OpenBSDDragon is offline
New User
 
Join Date: Jun 2016
Location: Austria, Vienna
Posts: 7
Default

Upss... sorry "I should look next time on the date"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add static route using virtual NIC bsdplus Solaris 1 22nd August 2010 02:10 AM
add to path carpman FreeBSD General 4 19th August 2010 06:13 AM
ping: sendto: No route to host joostvgh OpenBSD General 2 29th April 2010 12:34 PM


All times are GMT. The time now is 01:18 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick