Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
# modprobe ipip
# modprobe sit
# modprobe ip6_tunnel
Example¶
# echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
# ip a a 10.22.4.104/24 dev eth1
# ip a a 10.23.4.104/24 dev eth3
# ip link set up dev eth1
# ip link set up dev eth3
# ip tu ad ipiptun mode ipip local 10.23.4.104 remote 10.23.4.204 ttl 64 dev eth3
# ip ad ad dev ipiptun 192.168.1.1 peer 192.168.1.2/32
# ip li se dev ipiptun up
# ip ro ad 10.24.4.119/32 via 192.168.1.1
# fp-cli
<fp-0> iface
1:lo [VR-0] ifid=1 (virtual) <UP|RUNNING|FWD4|FWD6> (0x63)
type=loop mac=00:00:00:00:00:00 mtu=16436 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
6:eth2 [VR-0] ifid=6 (virtual) <UP|RUNNING|FWD4|FWD6> (0x63)
type=ether mac=00:1b:21:c5:7f:75 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=1 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
7:eth3 [VR-0] ifid=7 (port 1) <UP|RUNNING|FWD4|FWD6> (0x63)
type=ether mac=00:1b:21:c5:7f:76 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
8:eth1 [VR-0] ifid=8 (port 0) <UP|RUNNING|FWD4|FWD6> (0x63)
type=ether mac=00:1b:21:c5:7f:74 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
9:eth0 [VR-0] ifid=9 (virtual) <FWD4|FWD6> (0x60)
type=ether mac=00:21:85:c1:82:58 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
10:eth4 [VR-0] ifid=10 (port 2) <FWD4|FWD6> (0x60)
type=ether mac=00:1b:21:c5:7f:77 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none tx_dev=none ip_output=none
15:ipiptun [VR-0] ifid=15 (virtual) <UP|RUNNING|FWD4|FWD6> (0x63)
type=Xin4 (6to4) mac=00:00:00:00:00:00 mtu=1480 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
ttl=0 local=10.23.4.104 remote=10.23.4.204 link-vrfid=0
if_ops: rx_dev=none tx_dev=none ip_output=none
<fp-0> route4 type all
# - Preferred, * - Active, > - selected
0.0.0.0/32 [5001] LOCAL (1)
10.22.4.104/32 [02] ADDRESS via eth1-vr0 (6)
10.22.4.118/32 [06] NEIGH gw 10.22.4.118 (N) via eth1-vr0 (10)
10.23.4.104/32 [03] ADDRESS via eth3-vr0 (7)
10.23.4.204/32 [05] NEIGH gw 10.23.4.204 (N) via eth3-vr0 (9)
10.24.4.119/32 [09] ROUTE gw 192.168.1.1 via ipiptun-vr0 (12)
10.81.0.100/32 [08] NEIGH gw 10.81.0.100 (N) via eth2-vr0 (11)
10.81.0.141/32 [01] ADDRESS via eth2-vr0 (5)
127.0.0.0/8 [5002] BLACKHOLE (4)
192.168.1.1/32 [04] ADDRESS via ipiptun-vr0 (8)
224.0.0.0/4 [5001] LOCAL (3)
255.255.255.255/32 [5001] LOCAL (2)
Example IPv4 and IPv6 in IPv6¶
# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
# ip link set eth1 up
# ip addr add fd00:100::2/64 dev eth1
# ip link set eth2 up
# ip addr add fd00:125::1/64 dev eth2
# ip link set eth3 up
# ip addr add fd00:175::1/64 dev eth3
# ip link add tun1 type ip6tnl ttl 64 local fd00:125::1 remote fd00:125::2 dev eth2
# ip addr add fd00:cafe:cafe::1/128 peer fd00:cafe:cafe::2/128 dev tun1
# ip link set dev tun1 up
# ip route add fd00:200::/64 dev tun1
# ip addr add dev tun1 192.168.1.1 remote 192.168.1.2
# fp-cli
<fp-0> iface
1:lo [VR-0] ifid=1 (virtual) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=loop mac=00:00:00:00:00:00 mtu=0 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=0
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
2:mgmt0 [VR-0] ifid=2 (virtual) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=ether mac=de:ad:de:01:02:03 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=4 IPv6 routes=0
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
7:eth1 [VR-0] ifid=7 (port 0) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=ether mac=de:ed:01:34:ee:0e mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=1
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
8:eth2 [VR-0] ifid=8 (port 1) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=ether mac=de:ed:02:ed:fb:f6 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=1
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
9:eth3 [VR-0] ifid=9 (port 2) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=ether mac=de:ed:03:0b:2a:c6 mtu=1500 tcp4mss=0 tcp6mss=0
IPv4 routes=0 IPv6 routes=1
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
12:tun1 [VR-0] ifid=12 (virtual) <UP|RUNNING|FWD4|FWD6> (0x1b)
type=Xin6 mac=00:00:00:00:00:00 mtu=1452 tcp4mss=0 tcp6mss=0
IPv4 routes=1 IPv6 routes=1
if_ops: rx_dev=none rx_early=none tx_dev=none ip_output=none
hlim=64 local=fd00:125::1 remote=fd00:125::2 link-vrfid=0
<fp-0> route6 type all
# - Preferred, * - Active, > - selected
(255) ::/80 [5002] BLACKHOLE (3)
(255) fd00:100::2/128 [14] ADDRESS via eth1-vr0 (14)
(255) fd00:125::1/128 [16] ADDRESS via eth2-vr0 (16)
(255) fd00:175::1/128 [18] ADDRESS via eth3-vr0 (18)
(255) fd00:cafe:cafe::1/128 [19] ADDRESS via tun1-vr0 (19)
(255) fe80::/10 [5001] LOCAL (1)
(255) ff00::/8 [5001] LOCAL (2)
(254) fd00:100::/64 metric 256 [13] CONNECTED via eth1-vr0 (13)
(254) fd00:125::/64 metric 256 [15] CONNECTED via eth2-vr0 (15)
(254) fd00:175::/64 metric 256 [17] CONNECTED via eth3-vr0 (17)
(254) fd00:200::/64 metric 1024 [20] CONNECTED via tun1-vr0 (20)
<fp-0> route4 type all
# - Preferred, * - Active, > - selected
(255) 0.0.0.0/32 [5001] LOCAL (1)
(255) 10.0.2.15/32 [01] ADDRESS via mgmt0-vr0 (5)
(255) 127.0.0.0/8 [5002] BLACKHOLE (4)
(255) 192.168.1.1/32 [05] ADDRESS via tun1-vr0 (10)
(255) 224.0.0.0/4 [5001] LOCAL (3)
(255) 255.255.255.255/32 [5001] LOCAL (2)
(254) 0.0.0.0/0 [03] NEIGH gw 10.0.2.2 via mgmt0-vr0 (8)
(254) 10.0.2.0/24 [04] CONNECTED via mgmt0-vr0 (9)
(254) 192.168.1.2/32 [06] CONNECTED via tun1-vr0 (11)
(0) 10.0.2.2/32 [03] NEIGH gw 10.0.2.2 (N) via mgmt0-vr0 (7)
(0) 10.0.2.3/32 [02] NEIGH gw 10.0.2.3 (N) via mgmt0-vr0 (6)