Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a development environment set up where I have a separate loopback address for multiple websites.

For example, I have the following: www.mysite.dev foo.mysite.dev bar.mysite.dev waffles.mysite.dev

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?

share|improve this question
I'd recommend ::ffff:7f00:1, ::ffff:7f00:2, and so on, but no doubt someone would throw rotten fruit at me. –  womble Jul 27 '11 at 10:21

3 Answers 3

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.

share|improve this answer

Technically ::2, ::3 etc. are part of ::, 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 http://www.sixxs.net/tools/grh/ula/ and generate yourself a prefix. Then you can pick whatever addresses you want out of that prefix, and assign them to the loopback interface.

share|improve this answer
jcomeau@aspire:~/rentacoder/jcomeau/kybyz$ sudo ip route add local ::/104 dev lo 
jcomeau@aspire:~/rentacoder/jcomeau/kybyz$ ping6 ::2
PING ::2(::2) 56 data bytes
64 bytes from ::2: icmp_seq=1 ttl=64 time=0.083 ms
64 bytes from ::2: icmp_seq=2 ttl=64 time=0.128 ms
--- ::2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.083/0.105/0.128/0.024 ms
jcomeau@aspire:~/rentacoder/jcomeau/kybyz$ ping6 ::3
PING ::3(::3) 56 data bytes
64 bytes from ::3: icmp_seq=1 ttl=64 time=0.148 ms
64 bytes from ::3: icmp_seq=2 ttl=64 time=0.141 ms
64 bytes from ::3: icmp_seq=3 ttl=64 time=0.142 ms

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.