How do I set the loopback address in IPv6?
Loopback interfaces are for private use only by software running on the C Series Controller, to communicate with other software also running on the same C Series Controller. Show To configure a loopback interface for IPv6:
Related Documentation
I have a development environment set up where I have a separate loopback address for multiple websites. For example, I have the following:
I'd like an equivalent solution for IPv6. I already know that you can use ::1 as a loopback address, but ::2, ::3, etc don't seem to work. Are there any other loopback addresses in IPv6? Is there a way to have multiple unique loopback addresses?
kasperd 29.9k16 gold badges72 silver badges122 bronze badges asked Oct 21, 2010 at 12:54
2 Technically ::2, ::3 etc. are part of ::0.0.0.0/96, the "ipv4 compatible ipv6 address" range. It's deprecated, but you probably don't want to use that range. For a lab environment, use unique local addressing. Go to https://www.ultratools.com/tools/rangeGenerator and generate yourself a prefix. Then you can pick whatever addresses you want out of that prefix, and assign them to the loopback interface.
answered Nov 7, 2010 at 21:32
Ben JencksBen Jencks 1,3518 silver badges13 bronze badges 2 I recommend using RFC 4193 addresses for this. RFC 4193 allows you to construct your own /48 for local use by taking the byte value
Using RFC 4193 has the advantage compared to earlier answers that you are not violating any RFCs in doing so and the addresses can be used without an interface identifier. Each of the ranges mentioned in earlier answers are either using ranges reserved for different purposes or link-local addresses which require an interface identifier whenever used. There
exists an expired draft suggesting that the range
answered Oct 12, 2018 at 15:14
kasperdkasperd 29.9k16 gold badges72 silver badges122 bronze badges 1 Your loopback adress is ::1/128. Note the width of the subnet which restricts it to just one host. change the subnetmask to something wider and check your routing table. Or use link-local adresses. answered Oct 21, 2010 at 13:11
FladiFladi 8504 silver badges7 bronze badges 2 There is a
RFC proposal called A Larger Loopback Prefix for IPv6, which proposes using
answered Jan 12, 2019 at 15:04
F.RaabF.Raab 1412 bronze badges 3
from Can I bind a (large) block of addresses to an interface? it's the only thing that worked for me. linux-specific, of course. nota bene: because this may conflict with 0.0.0.0/8 addresses at some time in the
future, answered Aug 14, 2015 at 8:52
5 Using link-local addressing seems to be the only valid option. What most suggestions here ignore is the fact that the IPv6 prefix declares scope, and I would not want my presumably private addressing to be in global scope. So for Linux:
And specify interface when referring to such addresses. Testing with netcat:
Verifying correct scope:
Still it seems not very elegant having to add every single IP to be able to bind to it. With 127.0.0.0/8, you can bind to any address without prior assigning them. answered Feb 5, 2016 at 15:03
korkmankorkman 1,6472 gold badges13 silver badges26 bronze badges 4 How is a loopback address specified in IPv6?The loopback address in IPv4 is 127.0. 01. In IPv6, the loopback address is 0:0:0:0:0:0:0:1 or ::1.
How do you set a loopback address?To configure an IP address for the loopback interface, enter the ip address
How do you ping a loopback address in IPv6?At the command line, type these commands: For IPv4: PING '127.0. 0.1' or PING LOOPBACK. For IPv6: PING '::1' or PING 'IPV6-LOOPBACK'
What is the equivalent of 127.0 0.1 in IPv6?The name localhost normally resolves to the IPv4 loopback address 127.0. 0.1, and to the IPv6 loopback address ::1.
|