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

    No default route after reboot using Gateway Groups.

    Scheduled Pinned Locked Moved Routing and Multi WAN
    32 Posts 7 Posters 4.9k 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.
    • K
      Konstanti @amorphous
      last edited by

      @amorphous
      if you make wan_dhcp2-tier1 and wan_dhcp-tier2
      the log will already look like this

      Jan 19 02:13:49 check_reload_status Linkup starting em1
      Jan 19 02:13:49 kernel em1: link state changed to UP
      Jan 19 02:13:49 check_reload_status rc.newwanip starting em1
      Jan 19 02:13:49 php-cgi rc.bootup: Resyncing OpenVPN instances.
      Jan 19 02:13:49 kernel done.
      Jan 19 02:13:49 kernel pflog0: promiscuous mode enabled
      Jan 19 02:13:49 php-cgi rc.bootup: Point1 ip is:
      Jan 19 02:13:49 php-cgi rc.bootup: Control point 2 ip is: 192.168.1.1
      Jan 19 02:13:49 php-cgi rc.bootup: Gateway, switch to: WAN_DHCP
      Jan 19 02:13:49 php-cgi rc.bootup: Default gateway setting Interface WAN_DHCP Gateway as default.

      Jan 19 02:13:49 php-cgi rc.bootup: Point1 ip is: 192.168.1.1
      Jan 19 02:13:49 php-cgi rc.bootup: Point1 ip is: 192.168.1.1

      Jan 19 02:13:50 kernel ..
      Jan 19 02:13:50 kernel .done.
      Jan 19 02:13:50 kernel done.
      Jan 19 02:13:50 php-cgi rc.bootup: Point1 ip is: 192.168.1.1
      Jan 19 02:13:50 php-cgi rc.bootup: Control point 2 ip is: 10.0.3.2
      Jan 19 02:13:50 php-cgi rc.bootup: Gateway, switch to: WAN2_DHCP
      Jan 19 02:13:50 php-cgi rc.bootup: Default gateway setting Interface WAN2_DHCP Gateway as default.

      Jan 19 02:13:50 kernel done.
      Jan 19 02:13:50 php-fpm 341 /rc.newwanip: rc.newwanip: Info: starting on em1.
      Jan 19 02:13:50 php-fpm 341 /rc.newwanip: rc.newwanip: on (IP address: 10.0.3.15) (interface: WAN2[lan]) (real interface: em1).

      A 1 Reply Last reply Reply Quote 0
      • A
        amorphous @Konstanti
        last edited by amorphous

        @konstanti No luck unfortunately. Still doesn't work. I need to Disable -> Enable the WAN.

        Jan 18 19:07:47 pfsense kernel:
        Jan 18 19:07:47 pfsense kernel: em0: link state changed to UP
        Jan 18 19:07:47 pfsense check_reload_status: Linkup starting em0
        Jan 18 19:07:51 pfsense check_reload_status: rc.newwanip starting em0
        Jan 18 19:07:51 pfsense php-cgi: rc.bootup: Resyncing OpenVPN instances.
        Jan 18 19:07:51 pfsense kernel: done.
        Jan 18 19:07:51 pfsense kernel: done.
        Jan 18 19:07:51 pfsense kernel: pflog0: promiscuous mode enabled
        Jan 18 19:07:51 pfsense php-cgi: rc.bootup: [squid] Installed but disabled. Not installing 'nat' rules.
        Jan 18 19:07:51 pfsense php-cgi: rc.bootup: [squid] Installed but disabled. Not installing 'pfearly' rules.
        Jan 18 19:07:51 pfsense kernel: .
        Jan 18 19:07:51 pfsense php-cgi: rc.bootup: [squid] Installed but disabled. Not installing 'filter' rules.
        Jan 18 19:07:51 pfsense kernel: ..
        Jan 18 19:07:52 pfsense php-fpm[365]: /rc.newwanip: rc.newwanip: Info: starting on em0.
        Jan 18 19:07:52 pfsense php-fpm[365]: /rc.newwanip: rc.newwanip: on (IP address: 70.111.222.333) (interface: WAN[wan]) (real interface: em0).
        Jan 18 19:07:52 pfsense php-cgi: rc.bootup: Default gateway setting as default.
        Jan 18 19:07:52 pfsense kernel: .done.
        Jan 18 19:07:52 pfsense php-cgi: rc.bootup: Gateway, none 'available' for inet6, use the first one configured. ''
        Jan 18 19:07:52 pfsense kernel: route: writing to routing socket: Network is unreachable
        Jan 18 19:07:55 pfsense check_reload_status: Linkup starting em1
        Jan 18 19:07:55 pfsense kernel:
        Jan 18 19:07:55 pfsense kernel: em1: link state changed to UP
        Jan 18 19:08:03 pfsense php-cgi: rc.bootup: sync unbound done.
        Jan 18 19:08:10 pfsense kernel: done.


        The Modified file before and after reboot: https://pastebin.com/VEiSDz5R

        A 1 Reply Last reply Reply Quote 0
        • A
          amorphous @amorphous
          last edited by amorphous

          This is my configuration:

          2_1547858500219_Screen Shot 2019-01-18 at 7.36.37 PM.png 1_1547858500219_Screen Shot 2019-01-18 at 7.36.16 PM.png 0_1547858500219_Screen Shot 2019-01-18 at 7.36.02 PM.png

          K 1 Reply Last reply Reply Quote 0
          • K
            Konstanti @amorphous
            last edited by Konstanti

            @amorphous
            Hey
            Having carefully studied this log, the only explanation of what is happening is that the boot process is happening with a slow read/write device (usb key) . Thus, the script to get the ip address does not have time to create the em0_router file in the /tmp directory. Because of this, there are problems with the initialization of the routing table .

            At the moment, I propose such a solution

            Prevent deleting temporary files on reboot .

            Another option is to make additional changes to gwlb.inc (but this need to test and inspect )

            1 Reply Last reply Reply Quote 0
            • RicoR
              Rico LAYER 8 Rebel Alliance
              last edited by

              Are we still talking about the topic here which is No default route after reboot using Gateway Groups? ☺

              -Rico

              K 1 Reply Last reply Reply Quote 0
              • K
                Konstanti @Rico
                last edited by Konstanti

                @rico

                I'm sorry this is being discussed here.
                Just in the case of amorphous necessary
                1 make changes to the gwlb file.inc ( solved)
                2 solve the problem of slow usb key

                A 1 Reply Last reply Reply Quote 0
                • A
                  amorphous @Konstanti
                  last edited by

                  @konstanti Yeah, we should switch to :
                  https://forum.netgate.com/topic/139570/no-internet-after-reboot-wrong-gateway
                  Thanks for all your help so far.

                  1 Reply Last reply Reply Quote 0
                  • 0daymaster0
                    0daymaster
                    last edited by

                    @Rico Is this fix for IPv4 only? Or should this also work for a default IPv6 gateway group. Thanks.

                    1 Reply Last reply Reply Quote 0
                    • RicoR
                      Rico LAYER 8 Rebel Alliance
                      last edited by

                      I have not checked with IPv6, you need to try.

                      -Rico

                      0daymaster0 1 Reply Last reply Reply Quote 0
                      • 0daymaster0
                        0daymaster @Rico
                        last edited by

                        @rico This fix works for both IPv4 and IPv6. Thanks.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.