IPv6 link-local: Assign ::1 to LAN

I'm working my way through enabling and configuring IPv6 on OpenWRT. I've been very pleased at how much has Just Worked so far.

I would like the host identifier of the link-local address on the LAN to be ::1, like the ULA and global unicast addresses are:

5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:24:a5:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.254/24 brd 192.168.10.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 2607:xxxx:xxxx:xx00::1/60 scope global dynamic
       valid_lft 475034sec preferred_lft 475034sec
    inet6 fde2:xxxx:xxxx::1/60 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::224:a5ff:fed8:5882/64 scope link
       valid_lft forever preferred_lft forever

I'd like the link local address to be fe80::1 instead of that long address it picked.

I've been reading the book "IPv6 Fundamentals" by Rick Graziani from Cisco, and it has lots of examples of routers being configured with ::1 and ::2 etc on the link-local, because that address ends up being used as the default gateway for downstream clients, and having it be a simple, easily recognized address is handy.

I can't find any information in the docs as to how to suggest a link-local address.

config globals 'globals'
        option ula_prefix 'fde2:xxxx:xxxx::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.10.254'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option macaddr '00:24:a5:xx:xx:xx'

I also have the option that is shown in LuCI as "IPv6 suffix" set to ::1. I'm not sure where in the config files that is so I can't show it.

I've really made very few changes to the default settings. Again, I'm very please with how well things have just worked, and how things have very sane defaults.

Thank you!

Unfortunately, OpenWrt IPv6 link-local implementation is somewhat undercooked.
It seems not only incomplete, but also buggy:
https://bugs.openwrt.org/index.php?do=details&task_id=2126


Currently you can configure it via hotplug:

# Configuration parameters
NET_IF="lan"
NET_ADDR="fe80::1/64"
NET_SCOPE="link"
. /lib/functions/network.sh
network_flush_cache
network_get_device NET_DEV "${NET_IF}"
# Remove current LLA optionally
ip -6 addr flush scope "${NET_SCOPE}" dev "${NET_DEV}"
# Configure LLA
ip -6 addr add "${NET_ADDR}" scope "${NET_SCOPE}" dev "${NET_DEV}"

https://openwrt.org/docs/guide-user/base-system/hotplug

2 Likes