Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Invalid static routes

    Scheduled Pinned Locked Moved Routing and Multi WAN
    7 Posts 4 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      slayer762
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • GrimsonG
        Grimson Banned
        last edited by

        https://docs.netgate.com/pfsense/en/latest/book/routing/static-routes.html also why is your LAN set to DHCP.

        1 Reply Last reply Reply Quote 0
        • S
          slayer762
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            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..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • S
              slayer762
              last edited by slayer762

              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.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

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

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • S
                  slayer762
                  last edited by

                  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
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.