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

    Question about WAN IP not matching Gateway IP

    Scheduled Pinned Locked Moved General pfSense Questions
    14 Posts 4 Posters 441 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.
    • V
      viragomann @The Party of Hell No
      last edited by

      @The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:

      the WAN has a IPv4 Address xx.xxx.107.26 but a Gateway IPv4 xx.xxx.106.1. Are these not two different subnets?

      A subnet is defined by an IP and the network mask. Without knowing the mask nobody can tell you.

      T 1 Reply Last reply Reply Quote 0
      • T
        The Party of Hell No @viragomann
        last edited by The Party of Hell No

        @viragomann the first five digits match - actually define "network mask"

        bmeeksB T 2 Replies Last reply Reply Quote 0
        • bmeeksB
          bmeeks @The Party of Hell No
          last edited by bmeeks

          @The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:

          @viragomann the first five digits match

          If you don't post enough information here (including the provided subnet mask), no one can answer your question.

          However, you can use a subnet calculator tool such as this one: https://www.calculator.net/ip-subnet-calculator.html to test things and answer your question.

          Or this one: https://www.subnet-calculator.com/

          1 Reply Last reply Reply Quote 0
          • T
            The Party of Hell No @The Party of Hell No
            last edited by

            @The-Party-of-Hell-No
            Subnet mask IPv4 255.255.254.0

            bmeeksB E V 3 Replies Last reply Reply Quote 0
            • bmeeksB
              bmeeks @The Party of Hell No
              last edited by bmeeks

              @The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:

              @The-Party-of-Hell-No
              Subnet mask IPv4 255.255.254.0

              That will be the same as a /23 CIDR mask. It's likely the gateway is in the same subnet as the IP you provided. Would be quite incorrect if the ISP provided a gateway that is not in the same subnet.

              1 Reply Last reply Reply Quote 0
              • E
                enthu19 @The Party of Hell No
                last edited by enthu19

                @The-Party-of-Hell-No
                Usable Host IP Range: xx.xxx.106.1 - xx,xxx.107.254

                106.1 fall within the same subnet /23

                1 Reply Last reply Reply Quote 0
                • V
                  viragomann @The Party of Hell No
                  last edited by

                  @The-Party-of-Hell-No
                  So they are within the same subnet. It goes from x.x.106.0 to x.x.107.255.

                  1 Reply Last reply Reply Quote 1
                  • bmeeksB
                    bmeeks
                    last edited by

                    @viragomann is correct. x.x.106.0 is the network, x.x.107.255 is the broadcast address, and assignable address space ranges from x.x.106.1 to x.x.107.254 (for a /23 subnet mask, or 255.255.254.0)

                    1 Reply Last reply Reply Quote 1
                    • T
                      The Party of Hell No
                      last edited by

                      Thank you for the info and the link to the calculator. So for my Dynamic DNS Status - NO-IP which is set to 107.26, do I need to correct it to the gateway 106.1?

                      bmeeksB 1 Reply Last reply Reply Quote 0
                      • bmeeksB
                        bmeeks @The Party of Hell No
                        last edited by bmeeks

                        @The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:

                        Thank you for the info and the link to the calculator. So for my Dynamic DNS Status - NO-IP which is set to 107.26, do I need to correct it to the gateway 106.1?

                        No, your Dynamic DNS should register your actual assigned WAN public IP address. The gateway is out of the picture for that. The gateway is simply the IP address where your firewall sends any traffic that does not match an IP range assigned to local firewall interfaces.

                        If you are new to networking, this may help clear some things up: https://www.cbtnuggets.com/blog/technology/networking/what-is-default-gateway.

                        T 1 Reply Last reply Reply Quote 0
                        • T
                          The Party of Hell No @bmeeks
                          last edited by

                          @bmeeks
                          So in my simple minded explanation the WAN public IP address is the outward (Public) IP for the modem/router - incoming. The gateway is the internal (Private) IP the firewall uses sending any traffic that does not match an IP range assigned to local firewall interfaces - outgoing?

                          They do not need to match, but must belong in the same subnet.

                          bmeeksB 1 Reply Last reply Reply Quote 0
                          • bmeeksB
                            bmeeks @The Party of Hell No
                            last edited by bmeeks

                            @The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:

                            @bmeeks
                            So in my simple minded explanation the WAN public IP address is the outward (Public) IP for the modem/router - incoming. The gateway is the internal (Private) IP the firewall uses sending any traffic that does not match an IP range assigned to local firewall interfaces - outgoing?

                            They do not need to match, but must belong in the same subnet.

                            The gateway is not necessarily "private", but it is the IP address where your firewall will send any traffic that is not local to a network defined on the firewall (local means IP ranges specified for your firewall interfaces).

                            Think of the default gateway on the WAN as the Post Office. That's where you send all of your outbound mail. The Post Office takes it from there and physically gets the mail to the destination. You simply provide a destination address and a return address. The Post Office decides which truck route to put the mail on so that it eventually reaches the intended recipient. Same analogy for network traffic. A packet leaving your firewall WAN interface directed at the default gateway IP contains a destination IP address and a "return address" which is the firewall's WAN IP. The default gateway handles getting the packet to the correct destination and also routing any returned packets back to you.

                            Every network will have a gateway. That's where packets are sent when the destination IP is not local within the network's subnet. There are gateways and a default gateway. In a large network it is possible for a router to have a table of many gateway IPs representing "known routes" to particular subnets. But there will always be a default gateway which will get any packets whose destination IP range is unknown to the router (meaning the destination IP is not local nor does the router have any defined gateway matching that subnet).

                            T 1 Reply Last reply Reply Quote 2
                            • T
                              The Party of Hell No @bmeeks
                              last edited by

                              @bmeeks
                              Thank you sir! You have educated me, and I am a better person for it. Your analogy of the Post Office is excellent.

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