Difference between revisions of "IPv6: Mikrotik: Static Routing Sedehana"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "center|400px|thumb R1: Ethernet1/1 - ke Internet Ethernet1/2 - R2: Ethernet 1/1 Ethernet1/3 - LAN R2: Ethernet1/1 - R1: Ethernet1/2 Ethernet1/2 - LAN...")
 
Line 3: Line 3:
  
 
R1:
 
R1:
  Ethernet1/1 - ke Internet
+
  ether1 - ke Internet
  Ethernet1/2 - R2: Ethernet 1/1
+
  ether2 - R2: ether1
  Ethernet1/3 - LAN
+
  ether3 - LAN
  
 
R2:
 
R2:
  Ethernet1/1 - R1: Ethernet1/2
+
  ether1 - R1: ether2
  Ethernet1/2 - LAN
+
  ether2 - LAN
  
  
 
R1:
 
R1:
  
  enable
+
  /ip address add address 192.168.122.100/24 interface=ether1 advertise=no
  configure terminal
+
  /ip address add address 192.168.122.101/24 interface=ether1 advertise=no
  ipv6 unicast-routing
+
/ip address add address 192.168.122.102/24 interface=ether1 advertise=no
  interface ethernet1/1
+
/ip address add address 172.16.1.1/30 interface=ether2 advertise=no
    ip address dhcp
+
/ipv6 address add address 2001:172:16:1::1/64 interface=ether2 advertise=no
    ip dhcp client request
+
/ip address add address 192.168.1.1/30 interface=ether3 advertise=no
    no shutdown
+
/ipv6 address add address 2001:192:168:1::1/64 interface=ether3 advertise=no
    exit
+
#
  interface ethernet1/2
+
/ip route add dst-address=192.168.2.0/24 gateway=172.16.1.2
    ip address 172.16.1.1 255.255.255.252
+
/ipv6 route add dst-address=2001:192:168:2::/64 gateway=2001:172:16:1::2
    ipv6 address 2001:172:16:1::1/64
 
    no shutdown
 
    exit
 
  interface ethernet1/3
 
    ip address 192.168.1.1 255.255.255.0
 
    ipv6 address 2001:192:168:1::1/64
 
    no shutdown
 
    exit
 
  ip route 192.168.2.0 255.255.255.0 172.16.1.2
 
  ipv6 route 2001:192:168:2::/64 2001:172:16:1::2
 
  exit
 
  
 
R2:
 
R2:
  
  enable
+
  /ip address add address 172.16.1.2/30 interface=ether1 advertise=no
config terminal
+
/ipv6 address add address 2001:172:16:1::2/64 interface=ether1 advertise=no
  ipv6 unicast-routing
+
/ip address add address 192.168.2.1/30 interface=ether2 advertise=no
  interface ethernet1/1
+
/ipv6 address add address 2001:192:168:2::1/64 /64 interface=ether2 advertise=no
    ip address 172.16.1.2 255.255.255.252
+
#
    ipv6 address 2001:172:16:1::2/64
+
/ip route add dst-address=192.168.1.0/24 gateway=172.16.1.1
    no shutdown
+
/ipv6 route add dst-address=2001:192:168:1::/64 gateway=2001:172:16:1::1
    exit
 
  interface ethernet1/2
 
    ip address 192.168.2.1 255.255.255.0
 
    ipv6 address 2001:192:168:2::1/64  
 
    no shutdown
 
    exit
 
  ip route 192.168.1.0 255.255.255.0 172.16.1.1
 
  ip route 0.0.0.0 0.0.0.0 172.16.1.1
 
  ipv6 route 2001:192:168:1::/64 2001:172:16:1::1
 
  exit
 
  
  

Revision as of 10:35, 6 January 2019

SR1.png


R1:

ether1 - ke Internet
ether2 - R2: ether1
ether3 - LAN

R2:

ether1 - R1: ether2
ether2 - LAN


R1:

/ip address add address 192.168.122.100/24 interface=ether1 advertise=no
/ip address add address 192.168.122.101/24 interface=ether1 advertise=no
/ip address add address 192.168.122.102/24 interface=ether1 advertise=no
/ip address add address 172.16.1.1/30 interface=ether2 advertise=no
/ipv6 address add address 2001:172:16:1::1/64 interface=ether2 advertise=no
/ip address add address 192.168.1.1/30 interface=ether3 advertise=no
/ipv6 address add address 2001:192:168:1::1/64 interface=ether3 advertise=no
#
/ip route add dst-address=192.168.2.0/24 gateway=172.16.1.2
/ipv6 route add dst-address=2001:192:168:2::/64 gateway=2001:172:16:1::2

R2:

/ip address add address 172.16.1.2/30 interface=ether1 advertise=no
/ipv6 address add address 2001:172:16:1::2/64 interface=ether1 advertise=no
/ip address add address 192.168.2.1/30 interface=ether2 advertise=no
/ipv6 address add address 2001:192:168:2::1/64 /64 interface=ether2 advertise=no
#
/ip route add dst-address=192.168.1.0/24 gateway=172.16.1.1
/ipv6 route add dst-address=2001:192:168:1::/64 gateway=2001:172:16:1::1


Test

R1:

ping 192.168.2.1
ping ipv6 2001:192:168:2::1
ping 2001:192:168:2::1

R2:

ping 192.168.1.1
ping ipv6 2001:192:168:1::1
ping 2001:192:168:1::1

Cek

show ipv6 route
show ipv6 route static

Setting Client

LAN 1 Client:

ip 192.168.1.2/24 192.168.1.1
ip 2001:192:168:1::200/64 2001:192:168:1::1
ping 2001:192:168:1::1
ping 2001:192:168:2::1
ping 2001:192:168:2::200

LAN 2 Client:

ip 192.168.2.2/24 192.168.2.1
ip 2001:192:168:2::200/64 2001:192:168:2::1
ping 2001:192:168:2::1
ping 2001:192:168:1::1
ping 2001:192:168:1::200

Pranala Menarik