I'm new to IPv6 and I'm trying to figure out how to send request from a different IPv6 address. How do I do that?
I have bought a test VPS which says they give /112 IPv6 range
. First of all, what exactly /112
means? I understand it as they giving some IPv6 range and the owner of VPS (me) is able to select which IPv6 he wants to use. Therefore there should be many IPv6 possibilities and I want to test it. If I make this curl
request curl http://v4v6.ipv6-test.com/api/myip.php
the result is 2a00:1630:66:d7::ae4c
. Same with curl --interface 2a00:1630:66:d7::ae4c http://v4v6.ipv6-test.com/api/myip.php
.
Now if my VPS has an IP range of many IPv6 possibilities, how can I choose another IPv6 to send the request from, so that the destination server also sees another IPv6? Which symbols of 2a00:1630:66:d7::ae4c
can I edit that my VPS would be able to bind to? Not sure if my explanation makes sense, so here is what I tried:
curl --interface 2a00:1630:66:d7:1111:ae4c http://v4v6.ipv6-test.com/api/myip.php
curl: (45) Couldn't bind to '2a00:1630:66:d7:1111:ae4c'
The output of ifconfig
is as follows:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
inet6 addr: 2a00:1630:66:d7::ae4c/64 Scope:Global
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:11896 errors:0 dropped:0 overruns:0 frame:0
TX packets:1446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17548894 (16.7 MiB) TX bytes:113342 (110.6 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.1.237 P-t-P:192.168.1.237 Bcast:192.168.1.237 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
/112
ipv6 range, meaning I have 16bit of ipv6 combinations. I just don't know how to access them so that I could send requests from different ones in the same range