Answer the question
In order to leave comments, you need to log in
How to set up routing for multiple ipv6 tunnels?
The task is to set up several concurrent ipv6 tunnels.
making tunnel 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
[email protected]:~# 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
[email protected]:~# 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
[email protected]:~# ip -6 route add default via 2001:470:39:1da::1 dev v6-1 table ipv6route-1
RTNETLINK answers: No route to host
Answer the question
In order to leave comments, you need to log in
Because there is no route for 2001:470:39:1da::1. What for to you to specify the address of the gateway? The 6in4(sit) protocol does not provide for any physical addresses. And via only makes sense for 6to4, 6rd. In this case, the interface is created with remote any, and in the route via the gateway address is specified in the ::192.88.99.1 style, or an analogue of the ipv4 address in the 6to4, 6rd formats.
The IPv6 tunnel gateway address is only needed for pings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question