Recursive Nexthop with Scope and Target Scope Mikrotik

Recursive Nexthop with Scope and Target Scope Mikrotik
User Rating: 4.8 (2 votes)

screenshot

R1
—-
/system identity
set name=R1
/ip address
add address=10.10.10.1/30 interface=ether1 network=10.10.10.0
add address=192.168.1.1/24 interface=ether2 network=192.168.1.0
/ip dns
set servers=172.16.10.1
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=1 gateway=172.16.10.1 target-scope=30
add distance=1 dst-address=172.16.10.1/32 gateway=10.10.10.2

R2
—-
/system identity
set name=R2
/ip address
add address=172.16.10.2/30 interface=ether2 network=172.16.10.0
add address=10.10.10.2/30 interface=ether1 network=10.10.10.0
/ip route
add distance=1 gateway=172.16.10.1

R3
—-
/system identity
set name=R3
/interface wireless
set [ find default-name=wlan2 ] l2mtu=2290
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods=”” group-ciphers=\
tkip,aes-ccm management-protection=allowed mode=dynamic-keys name=\
profile1 supplicant-identity=”” unicast-ciphers=tkip,aes-ccm \
wpa-pre-shared-key=teddy123 wpa2-pre-shared-key=teddy123
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g disabled=no frequency=2447 \
l2mtu=2290 security-profile=profile1 ssid=Andromax-M3Z-CCD6

/ip address
add address=172.16.10.1/30 interface=ether1 network=172.16.10.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid disabled=no \
interface=wlan1
/ip dns
set allow-remote-requests=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=wlan1 src-address=10.10.10.1
/ip route
add distance=1 dst-address=10.10.10.0/30 gateway=172.16.10.2

 

Penjelasan
—————

yang terkoneksi ke internet adalah R3 via wireless sebagai station ke modem andromax dan sebagai DHCP client. R1 koneksi ke internet dengan default gateway adalah R3. NAT di R3 hanya untuk 10.10.10.1. kunci : target scope default gateway di R1 harus sama nilainya atau lebih besar dari Scope static route ke R3

untitled1

untitled3

 

kalau di biarkan default maka akan unreachable

untitled

Berikut Tabel routing di R1, R2 dan R3

r1-ok

Tabel Routing di R1

r2

Tabel routing di R2

r3

Tabel Routing di R3

(maaf bahasanya masih berserakan..nanti segera di perbaiki berikut penjelasan scope dan target scope dan screenshotnya..)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>