IPv6 Loopback Addresses (equivalent to 127.x.x.x)
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.
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.
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 fd
followed by 5 random bytes. You are allowed to put anything you see fit after the first 48 bits, so if you wanted a /64 you can take fd
followed by 7 random bytes as in this example for Linux systems:
ip -6 route add to local fd66:29e9:f422:8dfe::/64 dev lo
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 1::/32
gets allocated for additional loopback addresses like you are asking for. However since that draft expired years ago and no such allocation was ever made you cannot use 1::/32
for this.