How to configure a static IPv6 address

I asked you for a picture earlier and you said:

...do you see this when you create a static Interface???:

Screenshot%20from%202018-08-17%2015-31-36

yes, I mentioned that "WAN6 we have the same fields - labeled with IPv4 and if I scroll down, also for IPv6 which is definitely confusing."

At the top it is IPv4 and ... later I scrolled down, ... also IPv6
but these fields are the same on WAN (for IPv4) and WAN6 (for IPv6)

1 Like

As of course it would, this is like telling all your friends that your phone number is different from the one your phone company gave you. You have no choice about your public prefix, but you can put what you like for the last 64 bits, the host part of the address.

Update: I received a new KabelBW (Unitymedia) cable modem (because I needed to upgrade the connection (because I upgraded the router - haha) awesome) and here it is getting interesting:

This is the setting of DHCP on the cable modem. Now, there is a section for the DHCPv6 server:
DHCPv6%20server

very most likely, there was something like that before with the old modem, but it was not visible (even if I scroll down :slight_smile: )

On OpenWrt, I see the WAN6 IPv6 address with /128 at the end, but now I can define the prefix on the IPv6 DHCP server of the OpenWrt router --> which is the modem.

My understanding is
Stateless: Is a feature of the IPv6 protocol where the client can use a stateless address configuration without "IP support" by the DHCP server. It could (but not must) be the SLAAC-AutoConfiguration based on MAC.
At the end of the day, this is exactly what I was looking for.
Stateful: Similar to IPv4, server assigns and tracks the assigned IPv6 addresses.

My initial question: was about the fields on Interface WAN6, which fields do I need to maintain? I think this is clearer now, the IPv4 fields should be ignored and I need to enter something in the IPv6 fields.
For
IPv6 address I choose somthing from 2a02:8071:b9b:xxxx::/64 (I masked xxxx!)
IPv6 gateway I enter ????
ipv6fields

I think this is really the initial and very open question for this thread. What is my gateway? Is it
2a02:8071:b9b:xxxx::1 ?


For LAN:

Then I continue and am stuck in the SLAAC ... IPv6 determination procedure on client side, which is another chapter in the IPv6 books. Not sure if I like it.

But here there is another question. For connecting to all devices via IPv6 I want the same for the OpenWrt router at 192.168.1.1 In the overview, I can see the IPv6 address for LAN. --> I can successfully ssh to that. But is it static?
For the settings of LAN interface, there are no fields to maintain for IPv6. There is also no LAN6 interface. Is this smth that is missing?
LANipv6

What I am wondering about: Isn't this something that was developed for OpenWrt in the past 4,5,6,7 years? Isn't there someone who knows parts of the code that was used to do that stateless IPv6 configuration on OpenWrt?

I'm quite lost as to why you continue to insist that you can make your WAN IPv6 a static configuration.

  • Can you explain, based on the responses you've received, why you still believe you can set a static IPv6 address on WAN, without a static Bloc from your Internet Service Provider?

None, you must use DHCPv6. There's nothing to maintain.

You cannot assign static IPv6 addresses without a static Bloc. You admitted this already:

If it still shows /128, you need a static Bloc.

Your own picture demonstrates that the LAN IPv6 address is a /60 from the upstream subnet.

Why? It seems you're under the impression that something is broken. Your issue is resolved if your ISP issues you a static IPv6 Bloc.

EDIT: Also, did you check on the Link-Local address? It seems you want a permanent IPv6 address to use with you router, this would be the one to use for the purpose.

I don't understand the bloc thing
Isn't it that on the cable modem we have the same situation as on the router?
ISP ??? <-- Modem 2a02:8071:b9b:xxxx::/64 --> fdd3:0738:23bf::/48 Router
Modem 2a02:8071:b9b:xxxx::/64 <-- Router fdd3:0738:23bf::/48 --> LAN
On the router I can have a stateless IPv6 assignment on modem side and another on LAN side.

I thought it might be similar for the router to get a static Ip as I do on a device in my LAN?

Whereas I must admit, that I can change the fdd3:0738:23bf::/48 for LAN, but I get an error when I try to change the start address 2a02:8071:b9b:xxxx::/6 on the modem.

Ummmm...

  • you want Public IPv6 addresses that you can assign to WAN and LAN
  • your ISP only issues a /128 to your WAN interface
  • Therefore, you don't have enough IPv6 addresses from your ISP

You have to request a bloc of IP addresses from your ISP, this isn't something that can be set by the customer. If you are able, it seems you'll need to inquire with your ISP on how to do so, anyways.

:confused: Totally lost at what you mean, we just established that there are no static IPs, but you mention LAN again. If you are referring to ULA and Link-Local addresses, please don't refer to these IPs as "Static," it is quite confusing.

This means the ISP is still only issuing one IPv6 address.

This has been explained to you already:

I think my thinking-direction was smth like the openwrt router could use also smth like the "client on lan" is using the ULA addresses.
Please also look at my very first sentence at the top of the page :wink:

Is this somehow comparable to IPv4 addresses?
My ISP is assigning one IPv4 address to my modem, but on the openwrt router I can have WAN and LAN static IPs as I like...

Thank you for your patience and tries to explain things!

I dont get this part. The public prefix is for ISP <-> Modem
How is this related to the setting for IPv6 between Modem <-> Router ? Does the public prefix need to be the same?
Isn't the Modem a DHCPv6 client and server in the same way as the Router is a DHCP client and server?
On the Router the Prefix can be different on server side (modem) in client sind (LAN)

I would suggest the following:

https://ipv6.he.net/certification/

I'm completely confused again. Perhaps you think the RFC1918 IPs on your LAN (e.g. 192.168.1.0/24) are "Static." If this is what you mean, that is improper terminology for that bloc of IPs.

:+1:

IT MAY BE A VIOLATION OF YOUR ISP'S TERMS OF SERVICE TO USE MORE IPs THAN ASSIGNED, PLEASE CHECK THIS!!! WHILE ON SOME ISPs, ADDING MORE IPs FROM THE SAME CIDR IPv4 PREFIX INTO THE CONFIGURATION WILL WORK, IN SOME COUNTRIES THIS IS A CRIMINAL THEFT OF SERVICE!!!

Please note the scenario: it is mentioned so many times
ISP - Modem - Router - LAN

If I have settings for WAN on the router then the next instance is the modem. Not the ISP!!

:confused:
Let's try this...

  • Please explain why you are reiterating your configuration?
  • Is it because of the IP addresses?

If your picture of 192.168.0.11/24 is of your WAN, that is a block in the RFC1918 IP address space. Again, that is not considered static in a relative matter to your references to Static Public IPv6 addresses.

See:

Edit: Visit here on your network to see your real IPv4 and/or IPv6 addresses. They are is the REAL ones issued by your ISP: Note that it will also show your LAN IPs on the screen.

I also forgot to mention...I'm glad you got an error instead of your device crashing. This is an extremely large number.:thinking:

What may not be clear is that there is basically no such thing as "picking your own" global IPv6 addresses for your hosts as there is when using IPv4 NAT.

When running IPv6, your provider will give you one or more gateway addresses and may offer to "delegate" you a prefix (set of IPv6 addresses, a "block"). This "give" is one of two ways. They use DHCPv6 and your DHCP client asks for an IA_NA (non-temporary address) and an IA_PD (prefix delegation) for one or more interfaces, or they "send you a piece of paper" with them listed ("static" assignment).

The IA_NA becomes the address of that interface. Packets destined for that interface are sent to that address, as are packets destined for addresses in the IA_PD.

Within the IA_PD, you can assign hosts as you choose. Unless your PD is static (you got it "in writing" from your ISP), you would need to have any IPv6 address assignments automatically updated any time the PD changes.

From what I follow, you either aren't getting a PD all, or are getting it through DHCP, either directly from your ISP or through the modem that they effectively control.

Given that your PD, if any, is dynamic, trying to set static IPv6 addresses is only going to lead you to frustration, lack of network connectivity, a maintenance nightmare, or more.

Without understanding why you want or think you need static IPv6 addresses, it is difficult to suggest a path forward. There are many approaches, even more than with IPv4 as it is "normal" in IPv6 for a given interface to have more than one address.


Edit:

Note that the IA_NA need not be in the IA_PD, and usually isn't.

Also note that your upstream router may have a link-local (fe80::/10) address, and the packets that flow to and from it may be for your OpenWRT link-local address.

Also, in contrast to IPv4, you can have the same link-local address on two different interfaces on the same physical machine.

1 Like

Start over from scratch here. What are you trying to accomplish? That you can connect to the ipv6 internet? Or something else more specific, like you want to use some specific addresses so that you can put them in a DNS entry and people can connect to you FROM the internet? Or something else

1 Like

As @jeff noted, there are major differences in IPv6 addressing and routing versus IPv4.

If you are trying to reach your modem via an IPv6 address, that may not be possible unless you use an SSH tunnel to access it from the WAN of the OpenWrt router via it's Link-Local IPv6 address. If you are tying to configure your LAN for IPv6 Internet access, then we can help...if your ISP helps you with your Public IPv6 IP allocation.

As @dlakelan said:

Okay, let's start from scratch.
My current config is as:

Server One (DHCP static IPv4 address is 192.168.1.100)
accesses
OpenWrt Router (Static IPv4 config on Interfaces -> LAN Addr 192.168.1.1, DHCP turned on,
WAN Addr 192.168.0.11, GW 192.168.0.1 (no DHCP))
accesses
KabelBW Modem (Static IPv4 address -> 192.168.0.1, DHCP turned off)

(actually, there is another router connected to the cable modem with static IPv4 address 192.168.3.1, but doesnt matter here)

What I want to accomplish is

  1. Access Server 1 also via static IPv6
    Works fine with dhcpcd.conf and e.g. fdd3:0738:23bf:5ce
  2. Access OpenWrt router on LAN via static IPv6 (as I do via 192.168.1.1)
    Works if I know the IPv6 address (I can see it on Interfaces -> LAN)
    But here I have no clue where the static IPv6 address can be configured
  3. Access KabelBW Cable Modem via IPv6 address (as I do via 192.168.0.1)
    Does not need to be focused on now
  4. Configure a static IPv6 address on OpenWrt Router WAN --> for the Cable Modem - Router connection
    this is done for IPv4 on Router OpenWrt WAN Addr 192.168.0.11, GW 192.168.0.1 (no DHCP))

What I dont want to do

  1. access the cable modem from the internet (I would never open ports in my life, VPN is also no option)
  2. ...

Actually, when looking at the whole discussion, the #4 is more cosmetic & the fact that I dont want the Cable Modem to do anything instead of serving a connection. It should not know and see anything from my internal network.

#3 is pretty much important, since I have unknown issues with IPv4 internally and from time to time, servers / devices are accessible via IPv6 only. Therefore I just wanted to set everything to work with IPv6. E.g. the database server is accessed from Grafana via e.g. http://[1080:0:0:0:8:800:200C:417A]:8888/index.html

You all know the WAN, WAN6 and LAN config screens, I also posted some of them above. If necessary, I will put everything into a picture.

Cheers, Frood

(Not sure if you know Kabel BW DS lite. On the internet, you share one IPv4 with lots of others and only your IPv6 is unique)

With IPv6, you also need to specify from where you want to access the device.

If all you want is on-link hosts, then use link-local addresses

For #4, all you need is a link-local address. You do not need a ULA or globally routable IPv6 address to have two devices on the same link to communicate over IPv6.

If what you want is access from within your own "world" ("behind" your modem), then randomly pick a ULA prefix and randomly assign interfaces to them (as all your interfaces aren't link-local to each other). You'll probably need to manually set up routing for IPv6 between your various links.

Edit: It is common practice to assign a /64 prefix to a given link and then "randomly assign" within that prefix. There also is no technical reason not to assign, for example, fe80::1 as the link-local address for all your various router interfaces.

As soon as you want access to any of these "inside" interfaces from the "outside" world, you will need a Prefix Delegation from your ISP and will need to assign from that pool to the specific interfaces that you wish to access from the outside, as well as set up routing.

For this scenario we are living in 192.168.1.1-255 only. Internal access, internal systems only.
In fact I was using fe80::1 as the link-local address for all your various router interfaces. before, but they were not static. Since I have them configured in some places I need to have them static.
For the servers, no problem, but what about the OpenWrt router. On LAN, I have no settings for IPv6 and on LAN, I still dont know what to do in detail.