IPv6 configuration /64

Good evening everyone. I have a hosted CHR that advertises an IPv6 /64 subnet to me.
I statically assigned an IP of the subnet on ether1 in /48 to be able to reach the gateway.
The router navigates correctly in IPv6.

Now how do I dynamically expose the other IPs to the bridge interface?

If upstream router advertises /64 towards you, then you can’t simply “invent” a /48 to be used in “your network”.

If that /48 is globally routed prefix and has actually been allocated to you, then you need to configure routing on upstream router (/ipv6/route/add destination=/48 gatway=<your router’s WAN address>) …

My address ip is

2001:abcd:abcd:ec00:abcd::0001

.

The gateway Is

2001:abcd:abcd:ec00

::

How should I configure the subnet Mask on my address to reach the gateway? If I set

2001:abcd:abcd:ec00:abcd::0001/64

I don’t go out to the internet. if instead I enter

2001:abcd:abcd:ec00:abcd::0001/48

I go out to the internet but I don’t know how to expose the other IPs to the LAN

@abbio90

You are confusing something with the addresses.

Network /48 is

2001:abcd:abcd::/48

The address range of this network is from

2001:abcd:abcd:0:0:0:0:0

to

2001:abcd:abcd:ffff:ffff:ffff:ffff:ffff

The /48 network contains 65536 /64 networks

When setting up a router, the WAN interface address is on a different network than the LAN interface network.

Thus, if you were given the network

2001:abcd:abcd:ec00::/64

, then the address of your WAN interface and gateway should not be issued from this network.

whoever provides me with the connection advertises

2a0d:b287:ec00:52b4::/64

the gateway is

2a0d:b287:ec00::

I configured the router in this way.

/ipv6 address 
add address=2a0d:b287:ec00:52b4::1/48
/ipv6 route add dst-address=::/0 gateway=2a0d:b287:ec00::

is this incorrect?

Where do you get this /48 prefix from? You were given a network with the /64 prefix. And to which interface are you trying to assign an address?

Here is an example of the settings, how it was done for me where the range of addresses was given to me manually.

WAN address and gateway

/ipv6 address add address=2a06:abcd:0:100::a/126 advertise=no interface=ether1
/ipv6 route add disabled=no dst-address=::/0 gateway=2a06:abcd:0:100::9

Pool

/ipv6 pool add name=pool1 prefix=2a06:abcd:0:109::/64 prefix-length=64

Address for LAN bridge

/ipv6 address add from-pool=pool1 interface=bridge1

And the rest

/ipv6 dhcp-server option add code=23 name=DNS value="'2606:4700:4700::1111''2606:4700:4700::1001'"
/ipv6 dhcp-server add address-pool=pool1 dhcp-option=DNS interface=bridge1 lease-time=1h name=server-dhcpv6-lan rapid-commit=no

/ipv6 nd set [ find default=yes ] advertise-dns=no disabled=yes
/ipv6 nd add dns=2001:4860:4860::8888,2001:4860:4860::8844 interface=bridge1 other-configuration=yes ra-interval=10s-20s
/ipv6 nd prefix default set preferred-lifetime=30s valid-lifetime=1m

This is one of the simplest configurations. As you can see, the IPv6 addresses of the WAN interface and gateway are on a different network. Which is different from the pool given to me.

just curious, does “/ipv6/neighbor/print” show anything reachable?

In the meantime, thank you for your valuable response. I’m not an IPv6 expert. In any case, I was given an indication of the /64 assigned and which gateway it is. At this point the doubt remains as to which subnet to indicate in the IP address and whether I should take the address from the pool or ask the ISP which one to use.

I'll try it in the afternoon and tell you

To whom is your question addressed? :laughing:

As far as I understand, you have been assigned a /64 subnet. It should be registered as a pool. And from this pool you will allocate addresses for devices on your local network.
All that remains - is to understand, what address your provider allocates to you for the WAN.
As I wrote earlier, this address (for your WAN interface) must be in the same “small” network with the address, that was issued to you as a gateway.

as already mentioned the address assigned by the provider is

2a0d:b287:ec00:52b4::1

The gateway Is

2a0d:b287:ec00::

The pool Is

2a0d:b287:ec00::52b4::/64

If all the data is known, substitute it into the commands, that I wrote earlier.
And check.

Screenshot_2024-01-09-21-52-13-435_com.alphainventor.filemanager.jpg
Error

  1. Your messages indicate either different addresses or incorrect ones.
  2. If you are given a pool
2a0d:b287:ec00:52b4::/64

, then the address for your interface that goes to the provider cannot be

2a0d:b287:ec00:52b4::1

Because this address already belongs to your pool.

You can assign address

2a0d:b287:ec00:52b4::1

to the interface, that will advertise addresses for your local network. Although this is not entirely true. And for the WAN interface you need a different address that will be in the same subnet with the default gateway to the provider.

Perhaps @OP should set /ipv6/settings/set accept-router-advertisements=yes and WAN interface would then accept RAs and thus perform SLAAC auto configuration? Because router’s WAN IPv6 address doesn’t matter much, default route has to be configured. And link-local addresses are just fine for that … and these are advertised as gateway address in RAs quite often.

To be honest, I have not seen configurations in which the WAN interface advertises addresses to the local network.

good morning, today they are assigning me another subnet in order to avoid the overlap encountered. Question, but can I divide the /64 that I have as a pool to advertise towards the LAN into two /96 pools, one towards the LAN bridge and one towards an ether other than the bridge?

Yes, but SLAAC won’t work and addresses will have to be assigned administratively.

Using a calculator will help. For example, this one.

As an example I will use pool

2a0d:b287:ec00:52b4::/64

I divide this pool into 4 parts.
Screenshot_calc.png
Thus, when specifying a pool, we will specify the following command

/ipv6 pool add name=pool1 prefix=2a06:abcd:0:109::/64 prefix-length=66

After which we can set addresses. For example

/ipv6 address add from-pool=pool1 interface=bridge1
/ipv6 address add from-pool=pool1 interface=bridge2
/ipv6 address add from-pool=pool1 interface=bridge3
/ipv6 address add from-pool=pool1 interface=bridge4

And the rest

/ipv6 dhcp-server option add code=23 name=DNS value="'2606:4700:4700::1111''2606:4700:4700::1001'"
/ipv6 dhcp-server add address-pool=pool1 dhcp-option=DNS interface=bridge1 lease-time=1h name=server-dhcpv6-lan1 rapid-commit=no
/ipv6 dhcp-server add address-pool=pool1 dhcp-option=DNS interface=bridge2 lease-time=1h name=server-dhcpv6-lan2 rapid-commit=no
/ipv6 dhcp-server add address-pool=pool1 dhcp-option=DNS interface=bridge3 lease-time=1h name=server-dhcpv6-lan3 rapid-commit=no
/ipv6 dhcp-server add address-pool=pool1 dhcp-option=DNS interface=bridge4 lease-time=1h name=server-dhcpv6-lan4 rapid-commit=no

/ipv6 nd set [ find default=yes ] advertise-dns=no disabled=yes
/ipv6 nd add dns=2001:4860:4860::8888,2001:4860:4860::8844 interface=bridge1 other-configuration=yes ra-interval=10s-20s
/ipv6 nd add dns=2001:4860:4860::8888,2001:4860:4860::8844 interface=bridge2 other-configuration=yes ra-interval=10s-20s
/ipv6 nd add dns=2001:4860:4860::8888,2001:4860:4860::8844 interface=bridge3 other-configuration=yes ra-interval=10s-20s
/ipv6 nd add dns=2001:4860:4860::8888,2001:4860:4860::8844 interface=bridge4 other-configuration=yes ra-interval=10s-20s
/ipv6 nd prefix default set preferred-lifetime=30s valid-lifetime=1m

P.S.
If you want to use your own DNS server for IPv6 (for example, the same router), the settings will be slightly different.