Помогите разобраться с маршрутизацией нескольких туннелей ipv6
Форум — Admin
Задача настроить несколько одновременно работающих туннеля ipv6.
делаю туннель 1
ip tunnel add v6-1 mode sit remote 209.51.161.14 local 45.139.184.150 ttl 255
ip link set v6-1 up
ip -6 addr add 2001:470:8a87:1111:1111:1111:1111:1111 dev v6-1
ip -6 route add ::/0 dev v6-1 metric 1
ip tunnel add v6-2 mode sit remote 184.105.250.46 local 185.230.140.161 ttl 255
ip link set v6-2 up
ip -6 addr add 2001:470:411c:2222:2222:2222:2222:2222 dev v6-2
ip -6 route add ::/0 dev v6-2 metric 2
работает: curl -k --interface v6-1 "https://whatismyv6.com/"
работает: curl -k --interface v6-2 "https://whatismyv6.com/"
Потом проверяю так:
работает: curl -k --interface 2001:470:8a87:1111:1111:1111:1111:1111 "https://whatismyv6.com/"
Не работает: curl -k --interface 2001:470:411c:2222:2222:2222:2222:2222 "https://whatismyv6.com/"
Как сделать так, чтобы можно было делать запросы свободно указывая адрес для интерфейса v6-2, ровно как и для v6-1?
root@sirius:~# route -nA inet6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 1 0 lo
2001:470:411c:2222:2222:2222:2222:2222/128 :: Un 256 1 0 v6-2
2001:470:8a87:1111:1111:1111:1111:1111/128 :: Un 256 1 0 v6-1
fe80::/64 :: U 256 1 0 eth0
fe80::/64 :: Un 256 1 0 v6-1
fe80::/64 :: Un 256 1 0 v6-2
::/0 :: U 1 2 52 v6-1
::/0 :: U 2 2 1 v6-2
::1/128 :: Un 0 3 16 lo
2001:470:411c:2222:2222:2222:2222:2222/128 :: Un 0 3 17 v6-2
2001:470:8a87:1111:1111:1111:1111:1111/128 :: Un 0 3 15 v6-1
fe80::2d8b:b896/128 :: Un 0 2 0 v6-1
fe80::b9e6:8ca1/128 :: Un 0 2 0 v6-2
fe80::5054:ff:fe51:e932/128 :: Un 0 2 0 eth0
ff00::/8 :: U 256 2 10 eth0
ff00::/8 :: U 256 1 0 v6-1
ff00::/8 :: U 256 1 0 v6-2
::/0 :: !n -1 1 1 lo
root@sirius:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 45.139.184.150 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::5054:ff:fe51:e932 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:51:e9:32 txqueuelen 1000 (Ethernet)
RX packets 2446 bytes 220457 (220.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 555 bytes 89861 (89.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0:2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 185.230.140.161 netmask 255.255.255.255 broadcast 185.230.140.161
ether 52:54:00:51:e9:32 txqueuelen 1000 (Ethernet)
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 554 bytes 59163 (59.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 554 bytes 59163 (59.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
v6-1: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
inet6 fe80::2d8b:b896 prefixlen 64 scopeid 0x20<link>
inet6 2001:470:8a87:1111:1111:1111:1111:1111 prefixlen 128 scopeid 0x0<global>
sit txqueuelen 1000 (IPv6-in-IPv4)
RX packets 38 bytes 24661 (24.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 83 bytes 8274 (8.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
v6-2: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
inet6 2001:470:411c:2222:2222:2222:2222:2222 prefixlen 128 scopeid 0x0<global>
inet6 fe80::b9e6:8ca1 prefixlen 64 scopeid 0x20<link>
sit txqueuelen 1000 (IPv6-in-IPv4)
RX packets 25 bytes 8175 (8.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 1449 (1.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0