Hello Tom, > Hi Aham, > > what I do is I add multiple loopback interfaces (it is useful in an ISP > context > so that when I add a loopback interface to ospf (to advertise the address > as an > intra area route ) (but I don't want to advertise the standard loopback > addresses > 127.0.0.1) > > eg > echo inet a.b.c.d/32 >/etc/hostname.lo2 > echo inet alias w.x.y.z/32 >>/etc/hostname.lo2 > > and just keep adding additional addresses using "inet alias" > > Hope this helps > > > > > > > > On Thu, 23 Jan 2020 at 11:04, Aham Brahmasmi <[email protected]> wrote: > > > Namaste misc, > > > > In IPv6, what address prefix/range is recommended for use when > > assigning multiple addresses to the loopback interface? > > > > The use case is running multiple servers (nsd and unbound) on the same > > port but different loopback addresses. It is similar to what popped up > > on the other thread about dig. > > > > If I am not wrong, 127.0.0.1/8 is the loopback range in IPv4. On the > > other hand, in IPv6, there is only one loopback address - ::1/128 [1]. > > > > And because there is only one loopback address, I do not know whether: > > 1) ::2/128, ::3/128 et al are RFC compliant IPv6 loopback addresses. > > 2) the very idea of running multiple servers on the same port but > > different loopback addresses is redundant in IPv6. > > > > Searching the internet throws up different mechanisms, but no definitive > > solution. In fact, someone went throught the entire trouble of writing > > up a draft RFC [3] to assign an address range. But for reasons that I do > > not know, the draft was allowed to expire. > > > > Dhanyavaad, > > ab > > [1] - https://www.iana.org/assignments/ipv6-address-space/ > > [2] - https://www.iana.org/assignments/ipv6-multicast-addresses/ > > [3] - > > https://tools.ietf.org/html/draft-smith-v6ops-larger-ipv6-loopback-prefix-04 > > ---------|---------|---------|---------|---------|---------|---------|-- > > > > > > -- > Kindest regards, > Tom Smyth. >
Thank you Tom for your response. >From what I understand from your response, you add an IPv4 address to a new loopback interface (lo2) and continue to add additional addresses via "inet alias" to lo2. In the context of IPv6, let us assume that I create an lo2 interface and assign it ::1/128 - because it is a loopback interface. $ cat /etc/hostname.lo2 inet6 ::1/128 My query is, which addresses/prefixes can I use to assign additional IPv6 addresses to the lo2 loopback interface, such that unbound/nsd/ other daemons can bind on them? Also, from what I understand, using the zone/interface identifier format of IPv6 addresses is not allowed for loopback address as per RFC 4007 [1]. In other words, ::1/128%lo2 is not a valid IPv6 address. In order to solve this, I searched some more, and encountered another Internet Draft, which also wanted to allocate an IPv6 address range for loopback purposes [2]. However, that Internet Draft has also expired. I continue to search. Dhanyavaad, ab [1] - https://tools.ietf.org/html/rfc4007#section-11.1 [2] - https://tools.ietf.org/html/draft-ipversion6-loopback-prefix-00 ---------|---------|---------|---------|---------|---------|---------|--

