IPv6: IPv6-in-IPv4 Tunnel: Contoh Tunnel Setup

From OnnoWiki
Revision as of 09:10, 9 February 2019 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

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/ip6tnl1/forwarding
ip addr add 192.68.0.100/64 dev enp0s3
ip -6 addr add 2222::1/64 dev enp0s8
ip -6 tunnel add ip6tnl1 mode ip6ip6 remote 192.168.0.101 local 192.168.0.100
ip link set dev ip6tnl1 up
ip -6 route add 2333::/64 dev ip6tnl1 metric 1

Cek menggunakan perintah berikut

# ip -6 tunnel show 
ip6tnl1: ipv6/ipv6 remote 2001::101 local 2001::100 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)

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/ip6tnl1/forwarding
ip -6 addr add 192.168.0.101/64 dev enp0s3
ip -6 addr add 2333::1/64 dev enp0s8
ip -6 tunnel add ip6tnl1 mode ip6ip6 remote 192.168.0.100 local 192.168.0.101
ip link set dev ip6tnl1 up
ip -6 route add 2222::/64 dev ip6tnl1 metric 1

Cek menggunakan perintah berikut

# ip -6 tunnel show 
ip6tnl1: ipv6/ipv6 remote 2001::100 local 2001::101 encaplimit 4 hoplimit 64 tclass 0x00 flowlabel 0x00000 (flowinfo 0x00000000)

Cek dari Gateway A

# ping6 2003::1


Pranala Menarik