Sabtu, 01 Februari 2014

Belajar Routing di Mikrotik

Temen-teman ini saya sudah buat routing OSPF dan RIP pada topologi ini silahkan dicoba fungsi routingnya, saya berharap ada temen-teman yang lain menambahkan routing BGP juga, kalau bisa buat topologinya yang dibuat sama temen-teman disambungkan ke topologi yang sudah saya buat ini. Dengan harapan pada pembahasan ini kita sudah merangkum fungsi routing yang ada di miktorik. Terima Kasih temen-teman semua

Click here to enlarge

R1
[tundra@R1] > /ip address add address=192.168.1.37/24 interface=ether1
[tundra@R1] > /ip address add address=10.10.10.1/30 interface=ether2
[tundra@R1] > /ip address add address=10.10.11.1/30 interface=ether3

[tundra@R1] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.1.37/24 192.168.1.0 192.168.1.255 ether1
1 10.10.10.1/30 10.10.10.0 10.10.10.3 ether2
2 10.10.11.1/30 10.10.11.0 10.10.11.3 ether3

[tundra@R1] > /ip firewall nat add action=masquerade out-interface=ether1 chain=srcnat
[tundra@R1] > /ip route add gateway=192.168.1.21

[tundra@R1] > /routing ospf interface add interface=ether2 cost=1
[tundra@R1] > /routing ospf interface add interface=ether3 cost=50

[tundra@R1] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether2 10 1 broadcast none
1 ether3 50 1 broadcast none

[tundra@R1] > /routing ospf set distribute-default=always-as-type-1 redistribute-connected=as-type-1 redistribute-static=as-type-1

[tundra@R1] > /routing ospf print
router-id: 0.0.0.0
distribute-default: always-as-type-1
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: no
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R1] > /routing ospf network add network=10.10.10.0/30 area=backbone
[tundra@R1] > /routing ospf network add network=10.10.11.0/30 area=backbone

[tundra@R1] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.10.0/30 backbone
1 10.10.11.0/30 backbone

R2
[tundra@R2] > /ip address add address=10.10.10.2/30 interface=ether1
[tundra@R2] > /ip address add address=10.10.12.2/30 interface=ether2
[tundra@R2] > /ip address add address=10.10.13.2/30 interface=ether3

[tundra@R2] > ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.10.10.2/30 10.10.10.0 10.10.10.3 ether1
1 10.10.12.2/30 10.10.12.0 10.10.12.3 ether2
2 10.10.13.2/30 10.10.13.0 10.10.13.3 ether3

[tundra@R2] > /routing ospf interface add interface=ether1 cost=10
[tundra@R2] > /routing ospf interface add interface=ether2 cost=100
[tundra@R2] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether1 10 1 broadcast none
1 ether2 100 1 broadcast none

[tundra@R2] > /routing ospf set distribute-default=never redistribute-connected=as-type-1 redistribute-static=as-type-1 redistribute-rip=as-type-1

[tundra@R2] > /routing ospf print
router-id: 0.0.0.0
distribute-default: never
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: as-type-1
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R2] > /routing ospf network add network=10.10.10.0/30 area=backbone
[tundra@R2] > /routing ospf network add network=10.10.12.0/30 area=backbone
[tundra@R2] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.10.0/30 backbone
1 10.10.12.0/30 backbone

[tundra@R2] > /routing rip set distribute-default=always redistribute-static=yes redistribute-connected=yes redistribute-ospf=yes metric-static=15

[tundra@R2] > /routing rip print
distribute-default: always
redistribute-static: yes
redistribute-connected: yes
redistribute-ospf: yes
redistribute-bgp: no
metric-default: 1
metric-static: 15
metric-connected: 1
metric-ospf: 1
metric-bgp: 1
update-timer: 30s
timeout-timer: 3m
garbage-timer: 2m

[tundra@R2] > /routing rip interface add interface=ether3
[tundra@R2] > /routing rip interface print
Flags: I - invalid, X - disabled, P - passive
# INTERFACE SEND RECEIVE AUTHENTICATION AUTHENTICATION-KEY
0 ether3 v2 v1-2 none

[tundra@R2] > /routing rip neighbor add address=10.10.13.1
[tundra@R2] > /routing rip neighbor print
Flags: X - disabled
# ADDRESS
0 10.10.13.1

[tundra@R2] > /routing rip network add network=10.10.13.0/30
[tundra@R2] > /routing rip network print
Flags: X - disabled
# NETWORK
0 10.10.13.0/30


R3
[tundra@R3] > /ip address add address=10.10.11.2/30 interface=ether1
[tundra@R3] > /ip address add address=10.10.12.1/30 interface=ether2
[tundra@R3] > /ip address add address=192.168.2.1/24 interface=ether3
[tundra@R3] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.10.11.2/30 10.10.11.0 10.10.11.3 ether1
1 10.10.12.1/30 10.10.12.0 10.10.12.3 ether2
2 192.168.2.1/24 192.168.2.0 192.168.2.255 ether3

[tundra@R3] > /routing ospf interface add interface=ether1 cost=50
[tundra@R3] > /routing ospf interface add interface=ether2 cost=100

[tundra@R3] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether1 50 1 broadcast none
1 ether2 100 1 broadcast none

[tundra@R3] > /routing ospf set distribute-default=never redistribute-connected=as-type-1 redistribute-static=as-type-1

[tundra@R3] > /routing ospf print
router-id: 0.0.0.0
distribute-default: never
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: no
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R3] > /routing ospf network add network=10.10.11.0/30 area=backbone
[tundra@R3] > /routing ospf network add network=10.10.12.0/30 area=backbone

[tundra@R3] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.11.0/30 backbone
1 10.10.12.0/30 backbone

R1.1
[tundra@R1.1] > /ip address add address=10.10.13.1/30 interface=ether1
[tundra@R1.1] > /ip address add address=10.10.14.1/30 interface=ether2
[tundra@R1.1] > /ip address add address=10.10.15.1/30 interface=ether3

[tundra@R1.1] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.10.13.1/30 10.10.13.0 10.10.13.3 ether1
1 10.10.14.1/30 10.10.14.0 10.10.14.3 ether2
2 10.10.15.1/30 10.10.15.0 10.10.15.3 ether3

[tundra@R1.1] > /routing rip set distribute-default=never redistribute-static=yes redistribute-connected=yes redistribute-ospf=yes

[tundra@R1.1] > /routing rip print
distribute-default: never
redistribute-static: yes
redistribute-connected: yes
redistribute-ospf: yes
redistribute-bgp: no
metric-default: 1
metric-static: 1
metric-connected: 1
metric-ospf: 1
metric-bgp: 1
update-timer: 30s
timeout-timer: 3m
garbage-timer: 2m

[tundra@R1.1] > /routing rip interface add interface=ether1

[tundra@R1.1] > /routing rip interface print
Flags: I - invalid, X - disabled, P - passive
# INTERFACE SEND RECEIVE AUTHENTICATION AUTHENTICATION-KEY
0 ether1 v2 v1-2 none

[tundra@R1.1] > /routing rip neighbor add address=10.10.13.2
[tundra@R1.1] > /routing rip neighbor print
Flags: X - disabled
# ADDRESS
0 10.10.13.2
[tundra@R1.1] > /routing rip network add network=10.10.13.0/30
[tundra@R1.1] > /routing rip network print
Flags: X - disabled
# NETWORK
0 10.10.13.0/30

[tundra@R1.1] > /routing ospf interface add interface=ether2 cost=10
[tundra@R1.1] > /routing ospf interface add interface=ether3 cost=5

[tundra@R1.1] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITYNET WORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether2 10 1 broadcast none
1 ether3 50 1 broadcast none

[tundra@R1.1] > /routing ospf set distribute-default=always-as-type-1 redistribute-connected=as-type-1 redistribute-static=as-type-1 redistribute-rip=as-type-1

[tundra@R1.1] > /routing ospf print
router-id: 0.0.0.0
distribute-default: always-as-type-1
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: as-type-1
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R1.1] > /routing ospf area add area-id=0.0.0.1 name=area1
[tundra@R1.1] > /routing ospf network add network=10.10.14.0/30 area=area1
[tundra@R1.1] > /routing ospf network add network=10.10.15.0/30 area=area1

[tundra@R1.1] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.14.0/30 area1
1 10.10.15.0/30 area1


R2.1
[tundra@R2.1] > /ip address add address=10.10.14.2/30 interface=ether1
[tundra@R2.1] > /ip address add address=10.10.16.1/30 interface=ether2
[tundra@R2.1] > /ip address add address=192.168.3.1/24 interface=ether3

[tundra@R2.1] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.10.14.2/30 10.10.14.0 10.10.14.3 ether1
1 10.10.16.1/30 10.10.16.0 10.10.16.3 ether2
2 192.168.3.1/24 192.168.3.0 192.168.3.255 ether3

[tundra@R2.1] > /routing ospf interface add interface=ether1 cost=10
[tundra@R2.1] > /routing ospf interface add interface=ether2 cost=100

[tundra@R2.1] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether1 10 1 broadcast none
1 ether2 100 1 broadcast none

[tundra@R2.1] > /routing ospf set distribute-default=never redistribute-connected=as-type-1 redistribute-static=as-type-1

[tundra@R2.1] > /routing ospf print
router-id: 0.0.0.0
distribute-default: never
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: no
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R2.1] > /routing ospf area add area-id=0.0.0.1 name=area1
[tundra@R2.1] > /routing ospf network add network=10.10.14.0/30 area=area1
[tundra@R2.1] > /routing ospf network add network=10.10.16.0/30 area=area1


[tundra@R2.1] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.14.0/30 area1
1 10.10.16.0/30 area1

R3.1
[tundra@R3.1] > /ip address add address=10.10.15.2/30 interface=ether1
[tundra@R3.1] > /ip address add address=10.10.16.2/30 interface=ether2

[tundra@R3.1] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.10.15.2/30 10.10.15.0 10.10.15.3 ether1
1 10.10.16.2/30 10.10.16.0 10.10.16.3 ether2

[tundra@R3.1] > /routing ospf interface add interface=ether1 cost=50
[tundra@R3.1] > /routing ospf interface add interface=ether2 cost=100

[tundra@R3.1] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
# INTERFACE COST PRIORITY NETWORK-TYPE AUTHENTICATION AUTHENTICATION-KEY
0 ether1 50 1 broadcast none
1 ether2 100 1 broadcast none

[tundra@R3.1] > /routing ospf set distribute-default=never redistribute-connected=as-type-1 redistribute-static=as-type-1
[tundra@R3.1] > /routing ospf print
router-id: 0.0.0.0
distribute-default: never
redistribute-connected: as-type-1
redistribute-static: as-type-1
redistribute-rip: no
redistribute-bgp: no
metric-default: 1
metric-connected: 20
metric-static: 20
metric-rip: 20
metric-bgp: 20
mpls-te-area: unspecified
mpls-te-router-id: unspecified

[tundra@R3.1] > /routing ospf area add area-id=0.0.0.1 name=area1
[tundra@R3.1] > /routing ospf network add network=10.10.15.0/30 area=area1
[tundra@R3.1] > /routing ospf network add network=10.10.16.0/30 area=area1

[tundra@R3.1] > /routing ospf network print
Flags: X - disabled, I - invalid
# NETWORK AREA
0 10.10.15.0/30 area1
1 10.10.16.0/30 area1

Entjep boedax TeKaJe

Life is like a piano, white and black. If God play it, all will be a beautiful melody.
Please Enable JavaScript!
Mohon Aktifkan Javascript![ Enable JavaScript ]

 

Copyright @ 2013 Encep Suryana.

Designed by Templateism