Default Gateway in Interface Settings



  • Silly question - but what is that option for?

    Initially, I had a default gateway set on my WAN interface settings (as well as in System -> Routing). Then I wanted to add an additional manual route, which pointed to another router reachable through the WAN interface (but different from the default gateway). This manual route didn't work until I removed the default gateway setting in the WAN interface settings.

    But now, without that interface setting, everything else (going through the default gateway) works just as fine as with the setting…

    So, out of curiosity and for educational purposes - what's the option for in the first place, if things also work without it? I couldn't find any motivation for that setting in the docs...



  • The default gate is necessary to let pfSense know, where packets have to sent to if the destination IP doesn't fit to any subnet that are assigned to its interfaces.

    If your traffic works anyway without the default gateway set you either haven't restart pfSense or the packets go through the additional gateway.

    If you want to add a static route to another gateway, you have to add the gateway at first in System > Routing > Gateways. Ensure that the gateway IP is part of the WAN subnet, otherwise the packets are still sent to the default gateway.


  • Netgate

    @viragomann:

    If you want to add a static route to another gateway, you have to add the gateway at first in System > Routing > Gateways. Ensure that the gateway IP is part of the WAN subnet, otherwise the packets are still sent to the default gateway.

    Then you have to create a static route for the desired networks with a gateway set to the new gateway on interface WAN.



  • Thanks for your input, gentlemen!

    I'm still unclear though which "default gateway" setting you refer two. There's to places:

    A) System -> Routing -> Gateways -> Select one of them as default gateway
    B) Interfaces -> WAN -> Upstream gateway field

    What I'm wondering about is the relevance of B) if I have already set A).


  • Netgate

    One and the same I think.  On my node when I create the WAN interface it asks for an Upstream gateway or I can create one.  After everything is all set, the edit interface page does not ask for an upstream gateway any more.

    I think that field is just a convenience to create the gateway entry when you create the interface.