How to configure a static IPv6 address

It depends on which specific community build you are referring to.

1 Like

it is the generic archer c7 eu v2
https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/generic/openwrt-18.06.0-ar71xx-generic-archer-c7-v2-squashfs-factory-eu.bin

That's not a community build, but an official build which should come with IPv6.

1 Like

In case you prefer learning by listening, try this IPv6 podcast (German, nearly 5 hours).

Since we've established that I'm on topic; and that you have a build from the downloads site (and not a community build).

Can you explain what you mean by:

Are you compiling this yourself?

This is nice, thanks. I prefer learning by doing. Listening 5 hours is technically not possible for my CPU.
But if I don't get this running on my network I will take an old router, paint IPv6 on it and burn it.

I am using own builds only.
But I am referring to the config from here: https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/generic/config.seed
(I see a lot of config missing, like CONFIG_IPV6=y, CONFIG_KERNEL_IPV6=y)

My assumption is that the --> official build is using this config. Is this wrong?

Please show the commands you ran to configure and build your image.

Are you aware of this guide?

The guide is the starting point. Yes.
I dont remember the details, but putting the pieces of information together answers the question: The built was done without IPv6 support, and this is what is used for the official builds: https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/generic/config.seed

I dont remember it in detail, but there was not more than smth like
git clone -b openwrt-18.06 --single-branch https://git.openwrt.org/openwrt/openwrt.git
cd to subdir
wget https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/generic/config.seed
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig (without changes to the config above)
make

I think the jumping point is the initial config.seed I took, which is (as I mentioned initially) most likely without the IPv6 stuff.
Interesting, I asked for the same just a few hours before, but in regard to ath79: Ath79 LEDs -- now GREEN (at least for Archer C7 v2)

I'm not sure if this is the correct way but I usually rename config.seed to .config before running make when I need to rebuild with official release settings

The config.seed is typically just that, a "seed" that, after running make <blah>config, gets filled out with defaults and dependencies as needed. It is typically just the differences between .config and the default values.

See ./scripts/diffconfig.sh

Bottom line is that unless you do something to specifically disable IPv6, it should be in the build.

BTW, asking about how to configure and build on a thread about run-time operation, either this one or the ath79, one is pretty much a non sequetor. No, I won't clutter that thread as well. Just select ath79, generic, Archer C7 v2 in make menuconfig

Ok, in general, thanks for the info. Things are not getting clearer, but I have found the .config (@mbo2o yes it is renamed to .config) in a backup. I have posted it here https://github.com/froodproton/things

I see all the IPv6 stuff there which was not in the seed from https://downloads.openwrt.org/releases/18.06.0/targets/ar71xx/generic/config.seed

As of now, I would just like to close the thread, thank you and forget about IPv6.
I have no idea whats going on (this is also what Towlie said in one of the famous series..., but I am not in the same situation).

For some reason the C7 is without WAN(6) and LAN IPv6 information and in the upstream area, there is no IPv6 info. My assumption, that this is because of the .config seed for it - was wrong.
Since I have also unclear settings / unstable IPv6 info when using hnymans build scripts, I guess it is because of something else.

Why don't you just flash the pre-built image???

Then you don't have to worry about wondering if IPv6 is compiled prior to setting up IPv6.

fresh baked image with the same config as attached and the world looks better. It could also be that just a restart of modem & router was required, I dont know.
Just for completeness, these were the requirements:

  1. Access local 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 --> update

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

Regarding 2) there is this set up, and this is the IP to access the router via ssh on the network. So also 2) is ok if this does not change to often (According to other posts it is changing when router is reset)

config globals 'globals'
option ula_prefix 'fdd3:xxxx:yyyy::/48'

Regarding IPv6: Both, C7 and R7800 show a 2a02:.... IPv6 on interface WAN6, fine! But for both, the upstream IPv6 box is without IPv6 address.
In this tutorial, I see v4img

You need to get two things from your upstream provider:

  • IA_NA -- "Non-temporary address" the address for your router itself, as seen by the outside world
  • IA_PD -- "Prefix delegation" -- a set of addresses that you can use for hosts "behind" your router. Those addresses will be routed via ether the IA_NA on your router, or its link-local address.

The IA_NA may not be "inside" of the IA_PD, and often isn't.

To have hosts other than your OpenWrt's "WAN" interface accessible by IPv6, you need to assign them IPv6 addresses from the IA_PD. ULA addresses (fc00::/7) aren't "globally routable".

1 Like

I will surely remember this when I continue the learning - wherever.
My Cable modem beautifully shows the DHCPv6 server is setup with

  • stateful config type (checkbox)
  • IPv6 start address aaaa:bbbb:cccc,dddd /64
    Admin info shows
  • IPv6 default gateway
  • IPv6 address /128
  • DS lite address (also IPv6)
    and more...

What I am actually missing is: Anything about prefix delegation.
I thought that I remember there was something about it.

Someone else posted a screenshot of the stuff here: https://www.unitymediaforum.de/viewtopic.php?t=36631
They are pointing to an interesting detail, I have softly recognized so far:
The router WAN6 is different to the Router LAN IPv6.
(If WAN6 is aaaa:bbbb:cccc,dddd, the LAN on Router is aaaa:bbbb:cccc,eeee)
This was reflectable on the IPv6-PD of WAN6 as well as the local client IPv6 addresses.

Interesting also that if I turn DHCPv6 to stateless on the Cable modem, there are two IPv6 addresses on router WAN6 one with /64 and one with /128 (both with aaaa:bbbb:cccc,dddd)

I have a backup with a third row beneath these two rows showing IPv6-PD with aaaa:bbbb:cccc,dddd but this is currently "disappeared". It feels like that if this comes back, things should be pretty fine and understandable.

I'm guessing that when your modem is in "stateful" mode that it is handling the assignment of IPv6 addresses itself, much like an IPv4 router runs DHCPv4 and assigns from some private address space to all directly connected clients.

It's possible that the /64 you're seeing is your prefix delegation when your modem is in "stateless" mode. The "tough question" is if your ISP is routing that prefix through the /128 address (that's a single IPv6 address), or simply "putting them on the wire" with the assumption that they're all link-local to the modem and that you've got something that is assigning addresses.

Running wireshark or the like might provide some insight if you catch the DHCPv6 negotiation between your OpenWrt box and the modem/ISP. udp and portrange 546-547 should be a good "magic incantation" to see the DHCPv6 negotiation.

Awesome. After

  • resetting the cable modem
  • restart WAN6 and LAN interface

I see in the IPv6 upstream box

  • IPv6 address aaaa:bbbb:cccc,dddd
  • Prefix delegated aaaa:bbbb:cccc,eeee /60

On the WAN6 interface there is

  • two IPv6 addresses - one with /46 and on /128
  • PD delegation aaaa:bbbb:cccc,eeee /60

On the LAN

  • IPv6 aaaa:bbbb:cccc,eeee /60

And the tutorial IPv6 check is passing successfully.

The (for me) funny thing is: It is most likely the same situation as 2-3 weeks earlier
But: Now I begin to understand what I am seeing and what was missing

Thanks a lot to all of you! I have asked lots of people around "do you understand" IPv6 and 100% answered with "no". This is cool getting started with it!

I will run tcpdump -n host 192.168.0.1 (cable modem) host and check the DHCPv6 negotiation, I think this is just another must lesson in the learning course :slight_smile:

2 Likes

Since DHCPv6 is done with IPv6 and is done through the modem, not with the modem, you'll get what you're looking for (along with the DHCPv4 negotiation) with

tcpdump -ni <your WAN interface> udp portrange 67-68 or udp portrange 546-547

Given that it looks like you've confirmed that you've got both an IA_NA and an IA_PD, you probably don't need to "snoop" it.

Now "all" you need to do is decide how you want to distribute those addresses and implement it. OpenWrt is pretty good about distributing them using router advertisements on the LAN interface in its typical configuration. It "just works" in a typical configuration. I was pleasantly surprised when I first got native IPv6 support and all of a sudden LAN-connected hosts were using IPv6 without any further changes on my part.

All Wifi clients are IPV6 ready and 2a02... addresses (link and global) "assigned" on Ubuntu, Debian and OSX (there is a hurricane electric app for iOS that is supposed to check IPv6 but I cannot see this on the fly).
The LAN servers have in addition the static ULA address set up as I did it n the very beginning.
So far I have no idea what I can distribute any further...

Regarding "Since DHCPv6 is done with IPv6 and is done through the modem, not with the modem"
Means that also the label "DHCPv6 server" in the modem settings is somehow wrong, right?

It is still interesting why a server now has five ipv6 addresses

        inet6 2a02:bbbb:cccc:eeee:ffff:gggg:hhhh:fd7c  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::ead9:171a:eba3:e4b2  prefixlen 64  scopeid 0x20<link>
        inet6 fdd3:738:23bf:0:8d4f:dcd8:f405:1d7f  prefixlen 64  scopeid 0x0<global>
        inet6 fdd3:738:23bf::1b5  prefixlen 128  scopeid 0x0<global>
        inet6 2a02:bbbb:ccccc:eeee::1b5  prefixlen 128  scopeid 0x0<global>

I can explain 3 of them, which is already an achievement :slight_smile:

Regarding the very topic of this posting "how to configure a static IPv6 address" there is an answer, that was not posted above.
Noone was pointing into that direction.
I tried to reach all devices on a IPv6 address, also the router. So it was the WAN6 that I wanted to configure in the same way as WAN with a static IPv4. Whereas my router is reachable on 192.168.0.11 (WAN) and 192.168.1.1 (LAN).
That is not possible for IPv6 in that way. Nor a similar way.

For now, the best answer to the question is to use this address:
fdd3:738:23bf::1 which is derived from here
ULAipv6
(I was wondering why it is the same on all of the routers & even survives factory.img flashes, eeeeh, simply because it is included in the image with file /etc/config/network - haha)

Now, the VPN chapter will be opened. Thanks to the community and lots of patience.