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

Static IPv6 "gateway does not lie within one the chosen interface's subnets"

IPv6
3
27
1.2k
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.
  • L
    lmat @JKnott
    last edited by Jul 17, 2024, 8:29 PM

    @JKnott How did you configure this in pfsense?

    J J 2 Replies Last reply Jul 17, 2024, 8:45 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @lmat
      last edited by johnpoz Jul 17, 2024, 8:45 PM Jul 17, 2024, 8:45 PM

      @lmat you prob need to check this

      login-to-view

      Setup your gateway first. Then select it when you add the IPv6 address to the interface. It's under the advanced when you setup the gateway.

      https://docs.netgate.com/pfsense/en/latest/routing/gateway-configure.html

      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.7.2, 24.11

      L 1 Reply Last reply Jul 17, 2024, 10:11 PM Reply Quote 1
      • L
        lmat @johnpoz
        last edited by lmat Jul 17, 2024, 10:25 PM Jul 17, 2024, 10:11 PM

        @lmat you prob need to check this

        login-to-view

        Setup your gateway first. Then select it when you add the IPv6 address to the interface. It's under the advanced when you setup the gateway.

        That's exactly the option I was looking for, thank you!

        I just ran this test that I think shows the new configuration is not working:

        login-to-view

        (That's google.com, I think.) Did I conduct the test properly? What else should I be looking at to debug this?

        (Although it seems related, I realize that this question doesn't match the subject of this Topic. Let me know if I should open a new topic!)

        J 1 Reply Last reply Jul 17, 2024, 10:31 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @lmat
          last edited by Jul 17, 2024, 10:31 PM

          @lmat can you ping your gateway? Its possible that they don't allow traffic from the transit IP..

          First step would be to validate you can talk to your gateway to be honest. If that works, then create a lan side /64 out of the /56 they are routing to you.

          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.7.2, 24.11

          L J 3 Replies Last reply Jul 17, 2024, 10:49 PM Reply Quote 1
          • L
            lmat @johnpoz
            last edited by Jul 17, 2024, 10:49 PM

            @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

            @lmat can you ping your gateway? Its possible that they don't allow traffic from the transit IP..

            First step would be to validate you can talk to your gateway to be honest. If that works, then create a lan side /64 out of the /56 they are routing to you.

            Excellent idea, and thank you for the suggestion. It doesn't appear to work:

            login-to-view

            J 1 Reply Last reply Jul 17, 2024, 11:30 PM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator @lmat
              last edited by Jul 17, 2024, 11:30 PM

              @lmat well you could try creating your lan with a /64 out of that /56 they gave you and try that.. Its possible the gateway doesn't even answer ping.. Do you get an arp entry in the table after you try?

              I would prob do more than just 1 as well.. Sometimes it takes a bit to get an arp answer, etc. so your first ping might fail but 2 or 3 might work..

              If after creating your lan side interface with /64 and and a client and that doesn't work - time to contact the isp, possible they sent the wrong gateway, etc. ?

              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.7.2, 24.11

              J 1 Reply Last reply Jul 18, 2024, 12:35 AM Reply Quote 1
              • J
                JKnott @lmat
                last edited by Jul 18, 2024, 12:29 AM

                @lmat said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                @JKnott How did you configure this in pfsense?

                My ISP uses DHCPv6-PD to provide the configuration automagically. 😉

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 1
                • J
                  JKnott @johnpoz
                  last edited by Jul 18, 2024, 12:33 AM

                  @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                  First step would be to validate you can talk to your gateway to be honest. If that works, then create a lan side /64 out of the /56 they are routing to you.

                  Problem is the WAN IP address can't be uses, as with a /128, it can't directly reach anything else. This means the ping will have to be routed, but that won't work either because of the invalid gateway.

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  L 1 Reply Last reply Jul 18, 2024, 12:43 AM Reply Quote 1
                  • J
                    JKnott @johnpoz
                    last edited by JKnott Jul 18, 2024, 12:39 AM Jul 18, 2024, 12:35 AM

                    @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                    I would prob do more than just 1 as well.. Sometimes it takes a bit to get an arp answer, etc. so your first ping might fail but 2 or 3 might work.

                    No such thing as ARP on IPv6. It's ICMPv6 neighbor discovery instead. Also, there should be periodic router advertisements telling what the gateway is. I'd verify the gateway address and find out if it should actually be a link local address. Also, he might do some ICMPv6 packet captures on the WAN port, to see what's actually on the wire.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    J 1 Reply Last reply Jul 18, 2024, 12:43 AM Reply Quote 1
                    • L
                      lmat @JKnott
                      last edited by Jul 18, 2024, 12:43 AM

                      Thank you for your invaluable input. I will continue troubleshooting and reading based on what you two fine gentlemen have related here.

                      @JKnott said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                      This means the ping will have to be routed, but that won't work either because of the invalid gateway.

                      Why do you say the gateway is invalid?

                      J 1 Reply Last reply Jul 18, 2024, 12:50 AM Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator @JKnott
                        last edited by Jul 18, 2024, 12:43 AM

                        @JKnott true, no arp ;) I used the wrong term, shoot me ;)

                        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.7.2, 24.11

                        1 Reply Last reply Reply Quote 0
                        • J
                          JKnott @lmat
                          last edited by Jul 18, 2024, 12:50 AM

                          @lmat said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                          Why do you say the gateway is invalid?

                          What address on pfSense will be used to reach it? You can't use the WAN address as it's a /128, which means there is no other device possible, within it's subnet. As I mentioned, link local is generally used for gateways.

                          Try doing a packet capture on the WAN interface, filtering on ICMPv6, and post the capture file here. PfSense has a built in capture utility. If that fails, you can make a data tap from a cheap managed switch and put it ahead of the WAN interface. Leave the capture running for a few minutes so you can make sure you get a router advertisement.

                          PfSense running on Qotom mini PC
                          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                          UniFi AC-Lite access point

                          I haven't lost my mind. It's around here...somewhere...

                          L 1 Reply Last reply Jul 18, 2024, 2:13 PM Reply Quote 1
                          • L
                            lmat @johnpoz
                            last edited by Jul 18, 2024, 12:52 AM

                            @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                            If that works, then create a lan side /64 out of the /56 they are routing to you.
                            ...
                            ...you could try creating your lan with a /64 out of that /56 they gave you...

                            These two statements are interesting to me. It looks to me that they gave me one address (/128) in a network (subnet?) with a 56-bit network mask. (Although if that was the case, I'm not sure why they wouldn't say my assigned IPv6 was 2000:561:10:301::162/56.) But you're suggesting they have allocated all host IP addresses within that 56-bit network mask to me? Why do you think that?

                            For example, they also gave me a public IPv4 address of 65.39.159.66/24, but I don't assume that I get 255 public IPv4 addresses. Why would I assume I get the whole 56-bit prefix in IPv6?

                            J J 2 Replies Last reply Jul 18, 2024, 1:00 AM Reply Quote 0
                            • J
                              JKnott @lmat
                              last edited by JKnott Jul 18, 2024, 1:11 AM Jul 18, 2024, 1:00 AM

                              @lmat Working with IPv6 is in many ways different from IPv4. The only reason you get a single address on IPv4 is the shortage of addresses. There are nowhere enough to go around, to the point many ISPs now use CGNAT, which is even worse than 1 address & NAT. With IPv6, you get a block of addresses, to use as you chose. With a /56, which I also have, you can create 256 separate networks, each of which contains 18.4 billion, billion addresses. That said, your WAN address has absolutely nothing to do with your LAN addresses. They are completely independent. So, what you need is a link local address for the gateway, as you cannot use the assigned WAN address to talk to any gateway. If they'd given use a smaller prefix, even a /127, then you could use the WAN to reach the gateway. BTW, the link local address would likely have a /64 prefix, so a gateway can support 18.4 billion, billion devices (yeah, right), as that many are supported by the prefix.

                              PfSense running on Qotom mini PC
                              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                              UniFi AC-Lite access point

                              I haven't lost my mind. It's around here...somewhere...

                              L 2 Replies Last reply Jul 18, 2024, 12:41 PM Reply Quote 0
                              • J
                                johnpoz LAYER 8 Global Moderator @lmat
                                last edited by johnpoz Jul 18, 2024, 1:41 AM Jul 18, 2024, 1:40 AM

                                @lmat said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                I don't assume that I get 255 public IPv4 addresses.

                                Because that is not a network address that /24 is a host address.. The ipv6 they gave you is prefix/network add not a host address. Also you would never assign a /56 to a single network.. That would be a routed network via the transit they assigned with the odd /128 setup, etc.

                                You can look at any address and tell if its a host or a network.. If it lands on a network boundary then its a network, if it doesn't land a network boundary then its a host address. They clearly gave you a /56 network there.

                                2000:561:10:301::/56

                                which would run from.. 2000:561:10:300:: - 2000:561:10:3ff::

                                Now that you mention it, that 301 isn't proper boundary..

                                I would get with your isp - they are clearly doing their ipv6 deployment without having a clue.. Or they just typo'd what they sent you for info.. So yeah 2000:561:10:301:0:0:0:0/56 would be a host address - but that would be insane to assign a /56 to some interface... prefixes in ipv6 should be a /64 in almost all cases, other then delegation of a prefix, or a route statement or firewall rule, etc.

                                Maybe they are not letting you use the 1st /64 in that /56?

                                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.7.2, 24.11

                                J L 2 Replies Last reply Jul 18, 2024, 1:53 AM Reply Quote 0
                                • J
                                  JKnott @johnpoz
                                  last edited by Jul 18, 2024, 1:53 AM

                                  @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                  prefixes in ipv6 should be a /64 in almost all cases, other then delegation of a prefix, or a route statement or firewall rule, etc.

                                  Or a point to point link, which can be a /127/

                                  PfSense running on Qotom mini PC
                                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                  UniFi AC-Lite access point

                                  I haven't lost my mind. It's around here...somewhere...

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    lmat @JKnott
                                    last edited by Jul 18, 2024, 12:41 PM

                                    Thank you again for your most helpful replies.

                                    @JKnott said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                    That said, your WAN address has absolutely nothing to do with your LAN addresses. They are completely independent.

                                    I think I follow this: My WAN address is a way for the ISP to address the edge of my network. When you say "LAN addresses", though, those addresses aren't isolated to my LAN, but they're publicly addressible Internet addresses, right?

                                    So, what you need is a link local address for the gateway, as you cannot use the assigned WAN address to talk to any gateway.

                                    Okay, I drafted the following message to my ISP representative, does it look correct?

                                    I'm not sure how I'm supposed to contact the gateway because the IP address you gave is /128. That means I can't communicate with anything from that address because it is isolated in its own prefix.

                                    I'll also ask if they can provide a link-local IP address to their gateway instead.

                                    J 1 Reply Last reply Jul 18, 2024, 12:58 PM Reply Quote 0
                                    • L
                                      lmat @johnpoz
                                      last edited by Jul 18, 2024, 12:48 PM

                                      As always, thank you very much for your help!

                                      @johnpoz said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                      You can look at any address and tell if its a host or a network.. If it lands on a network boundary then its a network, if it doesn't land a network boundary then its a host address.

                                      By "boundary", I assume you mean the lower boundary. (2000:561:10:300::/56 has a lower boundary of 2000:561:10:300:: and an upper boundary of 2000:561:10:30ff:ffff:ffff:ffff:ffff, right?)

                                      They clearly gave you a /56 network there.

                                      You say "They clearly gave" rather than "You're clearly on". I'll sleep on this some more until I get it through my mind that this is the way things work!

                                      Now that you mention it, that 301 isn't proper boundary..

                                      Yeah, looks like a typo. I'll clarify with them.

                                      J 1 Reply Last reply Jul 18, 2024, 1:06 PM Reply Quote 0
                                      • J
                                        JKnott @lmat
                                        last edited by Jul 18, 2024, 12:58 PM

                                        @lmat said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                        I think I follow this: My WAN address is a way for the ISP to address the edge of my network. When you say "LAN addresses", though, those addresses aren't isolated to my LAN, but they're publicly addressible Internet addresses, right?

                                        Yep. All the addresses are reachable from outside if you allow it. However, by default, the firewall blocks them.

                                        And yes, you probably need a link local address for the gateway. While you have a WAN address, you don't need it. It's generally used for things like a VPN, but you could also use any LAN side interface address for that.

                                        PfSense running on Qotom mini PC
                                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                        UniFi AC-Lite access point

                                        I haven't lost my mind. It's around here...somewhere...

                                        J 1 Reply Last reply Jul 18, 2024, 1:19 PM Reply Quote 1
                                        • J
                                          JKnott @lmat
                                          last edited by Jul 18, 2024, 1:06 PM

                                          @lmat said in Static IPv6 "gateway does not lie within one the chosen interface's subnets":

                                          By "boundary", I assume you mean the lower boundary. (2000:561:10:300::/56 has a lower boundary of 2000:561:10:300:: and an upper boundary of 2000:561:10:30ff:ffff:ffff:ffff:ffff, right?)

                                          In this respect, IPv6 works the same as IPv4, except with much larger numbers. The prefix, can be almost anything, but an ISP will typically assign a /64, /60, /56 or /48. A network address will always end in ::, which indicates a continuous string of 0.

                                          BTW, that :: can be used anywhere within an address, but can only be used once. If it isn't used at the end, then you'd see the 0 specifically included. Here's an example, the IPv6 loopback address: ::1. This indicates 127 0 bits followed by a single 1. This method is better than writing out all those 0s.

                                          PfSense running on Qotom mini PC
                                          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                          UniFi AC-Lite access point

                                          I haven't lost my mind. It's around here...somewhere...

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