IPv6: Dynamic Tunnel 6to4

From OnnoWiki
Revision as of 09:37, 29 December 2023 by Onnowpurbo (talk | contribs) (Created page with " R1, /interface ethernet set ether1 disabled=no /ip address add address=12.12.12.1/24 interface=ether1 /interface ethernet set ether2 disabled=no /ip address add address=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


R1,

/interface ethernet set ether1 disabled=no
/ip address add address=12.12.12.1/24 interface=ether1
/interface ethernet set ether2 disabled=no
/ip address add address=13.13.13.1/24 interface=ether2
/interface ethernet set ether3 disabled=no
/ip address add address=14.14.14.1/24 interface=ether3
/routing ospf instance set 0 disabled=no
/routing ospf network add area=backbone network=12.12.12.0/24
/routing ospf network add area=backbone network=13.13.13.0/24
/routing ospf network add area=backbone network=14.14.14.0/24

R2,

/interface ethernet set ether1 disabled=no
/ip address add address=12.12.12.2/24 interface=ether1
/interface ethernet set ether2 disabled=no
/ipv6 address add address=2001:1:2:3::1/64 interface=ether2
/routing ospf instance set 0 disabled=no
/routing ospf network add area=backbone network=12.12.12.0/24

R3,

/interface ethernet set ether1 disabled=no
/ip address add address=13.13.13.3/24 interface=ether1
/interface ethernet set ether2 disabled=no
/ipv6 address add address=2001:4:5:6::1/64 interface=ether2
/routing ospf instance set 0 disabled=no
/routing ospf network add area=backbone network=13.13.13.0/24

R4,

/interface ethernet set ether1 disabled=no
/ip address add address=14.14.14.4/24 interface=ether1
/interface ethernet set ether2 disabled=no
/ipv6 address add address=2001:7:8:9::1/64 interface=ether2
/routing ospf instance set 0 disabled=no
/routing ospf network add area=backbone network=14.14.14.0/24

Selanjutnya kita konfigurasikan 6to4 tunnel pada R2 dan R3

R2,

/interface 6to4 add name=tunnel0
/ipv6 address add address=2002:0c0c:0c02::2/64 interface=tunnel0
/interface 6to4 set tunnel0 tunnel=yes
/interface 6to4 set tunnel0 mtu=1280
/interface 6to4 set tunnel0 src-address=ether2

R3,

/interface 6to4 add name=tunnel0
/ipv6 address add address=2002:0d0d:0d03::3/64 interface=tunnel0
/interface 6to4 set tunnel0 tunnel=yes
/interface 6to4 set tunnel0 mtu=1280
/interface 6to4 set tunnel0 src-address=ether2

R4,

/interface 6to4 add name=tunnel0
/ipv6 address add address=2002:0e0e:0e04::4/64 interface=tunnel0
/interface 6to4 set tunnel0 tunnel=yes
/interface 6to4 set tunnel0 mtu=1280
/interface 6to4 set tunnel0 src-address=ether2

Set routing

R2,

/ipv6 settings set enabled=yes
/ipv6 route add dst-address=2002::/16 gateway=tunnel0
/ipv6 route add dst-address=2001:4:5:6::/64 gateway=2002:0d0d:0d03::3
/ipv6 route add dst-address=2001:7:8:9::/64 gateway=2002:0e0e:0e04::4

R3

/ipv6 settings set enabled=yes
/ipv6 route add dst-address=2002::/16 gateway=tunnel0
/ipv6 route add dst-address=2001:1:2:3::/64 gateway=2002:0c0c:0c02::2
/ipv6 route add dst-address=2001:7:8:9::/64 gateway=2002:0e0e:0e04::4

R4,

/ipv6 settings set enabled=yes
/ipv6 route add dst-address=2002::/16 gateway=tunnel0
/ipv6 route add dst-address=2001:1:2:3::/64 gateway=2002:0c0c:0c02::2
/ipv6 route add dst-address=2001:4:5:6::/64 gateway=2002:0d0d:0d03::3


Cek

R2

/interface 6to4 print detail where name=tunnel0
/ipv6 route print
/tool ping address=2001:4:5:6::1
/tool ping address=2001:7:8:9::1

R3

/interface 6to4 print detail where name=tunnel0
/ipv6 route print
/tool ping address=2001:1:2:3::1
/tool ping address=2001:7:8:9::1

R4,

/interface 6to4 print detail where name=tunnel0
/ipv6 route print
/tool ping address=2001:1:2:3::1
/tool ping address=2001:4:5:6::1
/tool ping address=2001:7:8:9::1


Setup Virtual PC

VPC1

ip 2001:1:2:3::100/64 2001:1:2:3::1

VPC2

ip 2001:4:5:6::100/64 2001:4:5:6::1

VPC3

ip 2001:7:8:9::100/64 2001:7:8:9::1

Cek

ping 2001:1:2:3::1
ping 2001:1:2:3::100
ping 2001:4:5:6::1
ping 2001:4:5:6::100
ping 2001:7:8:9::1
ping 2001:7:8:9::100