Problems with default gateway assignment
-
Hi all.
I've noticed a problem with DG assignment, and also have idea for developers.
1)
So, I've pfsense 2.0-RELEASE (i386) built on Tue Sep 13 17:28:43 EDT 2011 with 3 NIC's :
WAN1 (PPPoE)
WAN2 (PPPoE)
LANAt least one of my WAN gateways have to be marked as Default. I could change which one is marked, but I can't unmark them all.
In my example WAN1 is marked. Also, I allowed "default gateway switching".So, when system power-on, but no WAN links connected, there is no default route in routing table. That's ok.
If now I connect the link, marked as default in Gateways menu (WAN1) , system recognizes that and adding a default route to routing table. That's ok too.
BUT if system boot up with no WAN links connected, and then I connect WAN2 (which is not marked as default), I have next message in systemlog:
php: : The command '/sbin/route change -inet default dynamic' returned exit code '68', the output was 'route: bad address: dynamic'
The reason of this error is that in despite of allowed DG switching, system trying to use as DG the gateway of non existing at the moment WAN1 connection (dynamic). However WAN2 connection is already exists and we could use it's gateway as default.
I think, it is not correct. What do you think? How can I correct this?
2)
Also, I've another problem with DG assignment: in my Gateways menu, I've got not only two WAN connections, but also two VLAN connections and two OpenVPN connection to access other offices of company, which are working over WAN connections.
So if I allow "default gateway switching", and the default WAN connection become down, system going to use one of the rest gateways including VLAN's and OpenVPN's instead of using second WAN connection only. I understand, that it is difficult to automaticly recognize which connection to use.
So I've an idea. Why not to add another checkbox into gateway edit menu named "Allow using this gateway for a default gateway switching script". In this case, it would be possible to mark needed connection for using as DG only and script will switch between them.
Thanks.
-
You must always have a default gateway, even if you have switching enabled.
The other bits are likely bugs in the switching, which is why it's off by default and IIRC there is a ticket open in redmine for the behavior you are seeing.
We wanted to leave it in because it did work for some people in certain circumstances, but it's at best considered an experimental feature.
-
You must always have a default gateway, even if you have switching enabled.
I know. So I'm describing the bug, when system already has usable gateway, but not assigning it as default gateway.
The other bits are likely bugs in the switching, which is why it's off by default and IIRC there is a ticket open in redmine for the behavior you are seeing.
That is wery good. So maybe I can help anyway? I can get some logs or anything elseโฆ
Thanks for reply.
-
http://redmine.pfsense.org/issues/1837
I'm not sure anyone is actively working on that - it won't be fixed until 2.1+ and attention is focused elsewhere. If you discover anything (or a workaround), etc, then update the ticket.