OLSR doesn't work with two or more gateways
Let me explain my scenario.
3 WRAP cards with pfSense 1.0.1 and with eth0, ath0 and ath1 all of them.
I use ath0 for mesh network and ath1 as an access point for compueters to connect. eth0 interface is my way out to internet, and I only have 2 of them connected as inernet gateways.
The scheme should be like this:
| | |
WAN1 (192.168.1.201) WAN2(192.168.1.203) WAN5(192.168.1.205)
|–- LAN1(mesh)(172.16.1.1) (172.16.1.3)(mesh)LAN3 (172.16.1.5)(mesh)LAN5
OPT1(AP)(192.168.2.1) OPT3(AP)(192.168.2.1) OPT5(AP)(192.168.2.1)
| | |
Mesh network is done through LAN interface, and my laptops should connect to internet using the WLAN created in every access point.
pfSense3 (the one in the middle without internet) is configure with the box "Enable dynamic gateway" checked.
If I configure OLSR in pfSense1 and pfSense5 (those which have internet access on WAN) in order to "Announce as Gateways", OLSR makes a mess and routes packages between both pfSenses forever.
If I only "Announce Self as Gateway" one of the pfSenses, the routing works great. The problem comes with two (or more) gateways.
Can anyone give me a detailed configuration for this kind of networks in order to work?
Is there any special firewall rule I have to add?
It could be pretty helpfull if and screenshot (or a detailed olsr.conf file) is added.
Thanks from Spain.
This annoyed me too. It may have something to do with FreeBSD not allowing multiple default gateways (but Linux does)? Thank goodness my mesh only needs one default gateway right now. I'm not sure why the olsr software doesn't simply reject foreign gateway route announcements when it's local gateway is functioning. If you display the routes in pfSense gui, you'll probably see both gateway units have each other listed as default route.
If you find a way to get multiple dynamic olsr gateways working on pfSense, please post the solution.
The olsr mailing lists may provide insights (look for comments involving *BSD and gateways / default routes)…
This possible work-around may seem crazy, but try adding the following two static routes to your gateway units (via the pfSense gui)...
0.0.0.0/1 route to local gateway ip
126.96.36.199/1 route to local gateway ip
I hope some of this helps,
Yes, this is most likely due to the fact that FreeBSD does not support a true multiple gateway scenario.
OpenBSD recently just picked up this support. I am hoping that someone will port it over in due time.
Thank you guys. I'll continue working with one gateway till this option of multiple gateways is available.
Have a good one.
This possible work-around may seem crazy, but try adding the following two static routes to your internet gateway units (via the pfSense gui)…
0.0.0.0/1 route to local internet gateway ip
188.8.131.52/1 route to local internet gateway ip
[Solution] We reached the point where we needed multiple dynamic gateways for olsr, and my speculative suggested solution (quoted above) worked! So, for olsr, this kludge gets around the problem of FreeBSD not supporting a true multiple gateway. Caveat: If the local internet connection goes down then this node will NOT pass traffic on to another internet gateway, thus this node will become a "black hole" blocking internet access for everyone nearby; however, this unwanted effect can be fixed by adding a batch task to periodically ping test the local internet connection and then add or remove the static routes when appropriate.
What is the shell command to add/remove static routes?
route add 0.0.0.0 mask "nettmask" "gw"
and to delete
route delete 0.0.0.0 mask "nettmask" "gw"