Invalid static routes



  • Hi gus

    I have tried add route via UI:
    0_1551275613000_85551997-15ed-49b6-a32b-4f652b75a32d-image.png

    and route is added as:

    Internet:
    Destination        Gateway            Flags     Netif Expire
    10.48.0.0/14       42:01:0a:a2:00:0a  US       vtnet1
    

    and network is not reachable

    because it should be:

    Internet:                                                                      
    Destination        Gateway            Flags     Netif Expire
    10.48.0.0/14       10.162.0.1         UGS      vtnet1
    

    like I added it from console - it works well

    Where is the problem?
    How I can fix?

    Thank you


  • Banned



  • My pfSense in LAN is not DHCP server. It receives IP addr from another router.


  • LAYER 8 Global Moderator

    Why? A router should really be static IP..

    Also you would be natting, if pfsense gets a gateway from the dhcp server its going to treat your lan interface just like another wan interface.

    Your connection to this downstream router should be via a transit network.. I take it since there is a dhcp server running on this 10.162 network that there are hosts on this network.. That is going to be asymmetrical routing for any clients on this 10.162 network wanting to get to the 10.48/14 destination unless you do host routing on each client..



  • Because I run pfSense at Google Cloud. And VPC already has DHCP server.
    I run it as VPN bastion host and actually do not need NAT - GCP do it for me.

    I have moved to static LAN IP address configuration and I was able add Gateway to LAN and add static route 10.48/14

    It is not universal since Clouds, VPC, DevOps, Infrasturcture as a Code technologies has dynamic basics, but ok. IMO old-school manual configuring like in 199x not the problem for freebsd based distro.

    But IMHO LAN external DHCP server configuration has right to life.

    Thank you.


  • LAYER 8 Netgate

    So without messing with anything, what is the interface address, subnet mask, and gateway assigned to the pfSense interface by the VPC?



  • Hi

    Actually VPC's DHCP server issued non-canonical interface address 10.162.0.10/32
    with gateway 10.162.0.1 for network 10.162.0.0/20

    I think the reason is that VM attached not to real (not to emulated) ethernet. and all communication should performed via GW

    Routing table looks (look at vtnet1 routes):

    Internet:                                            
    Destination        Gateway            Flags     Netif Expire
    default            10.200.0.1         UGS      vtnet0
    10.162.0.0/20      10.162.0.1         UGS      vtnet1
    10.162.0.1/32      42:01:0a:a2:00:0a  US       vtnet1
    10.162.0.10        link#2             UHS         lo0
    10.162.0.10/32     link#2             U        vtnet1
    10.200.0.0/24      10.200.0.1         UGS      vtnet0
    10.200.0.1/32      42:01:0a:c8:00:0a  US       vtnet0
    10.200.0.10        link#1             UHS         lo0
    

    On linux (another instance)

    qq@vm-1:~$ ip r
    default via 10.162.0.1 dev ens4 proto dhcp metric 100 
    10.162.0.1 dev ens4 proto dhcp scope link metric 100 
    qq@vm-1:~$ ip n
    10.162.0.1 dev ens4 lladdr 42:01:0a:a2:00:01 REACHABLE
    
    @vm-1:~$ ifconfig 
    ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1460
            inet 10.162.15.221  netmask 255.255.255.255  broadcast 0.0.0.0
            inet6 fe80::4001:aff:fea2:fdd  prefixlen 64  scopeid 0x20<link>
            ether 42:01:0a:a2:0f:dd  txqueuelen 1000  (Ethernet)
            RX packets 383  bytes 502096 (502.0 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 365  bytes 49133 (49.1 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    

Log in to reply