IPv6: IPv6-in-IPv4 Tunnel: Contoh Tunnel Setup
Skenario / Topologi sambungan:
2222::/64 --- Gate-A 192.168.0.100 --- 192.168.0.101 Gate-B --- 2333::/64
Gateway A IPv4 192.168.0.100 Tunnel 2222::/64 Gateway B IPv4 192.168.0.101 Tunnel 2333::/64
Pada Gateway A
Masukan perintah berikut,
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo 1 > /proc/sys/net/ipv6/conf/default/forwarding echo 1 > /proc/sys/net/ipv6/conf/enp0s3/forwarding echo 1 > /proc/sys/net/ipv6/conf/enp0s8/forwarding echo 1 > /proc/sys/net/ipv6/conf/sit1/forwarding
ip addr add 192.168.0.100/24 dev enp0s3 ip -6 addr add 2222::1/64 dev enp0s8 ip tunnel add sit1 mode sit ttl 255 remote 192.168.0.101 local 192.168.0.100 ip link set dev sit1 up ip -6 route add 2333::/64 dev sit1 metric 1
Cek menggunakan perintah berikut
# ip tunnel show
sit1: ipv6/ip remote 192.168.0.101 local 192.168.0.100 ttl 255 6rd-prefix 2002::/16 sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16
Pada Gateway B
Masukan perintah berikut,
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo 1 > /proc/sys/net/ipv6/conf/default/forwarding echo 1 > /proc/sys/net/ipv6/conf/enp0s3/forwarding echo 1 > /proc/sys/net/ipv6/conf/enp0s8/forwarding echo 1 > /proc/sys/net/ipv6/conf/sit1/forwarding
ip addr add 192.168.0.101/64 dev enp0s3 ip -6 addr add 2333::1/64 dev enp0s8 ip tunnel add sit1 mode sit ttl 255 remote 192.168.0.100 local 192.168.0.101 ip link set dev sit1 up ip -6 route add 2222::/64 dev ip6tnl1 metric 1
Cek menggunakan perintah berikut
# ip tunnel show
sit1: ipv6/ip remote 192.168.0.101 local 192.168.0.100 ttl 255 6rd-prefix 2002::/16 sit0: ipv6/ip remote any local any ttl 64 nopmtudisc 6rd-prefix 2002::/16
Cek dari Gateway A
# ping6 2003::1