Thursday, July 25, 2013

Menggabung 2 Routing (OSPF + RIP) di Mikrotik




Berikut konfigurasi yang bisa kawan-kawan terapkan :

[d8920ya@R1] > /ip address add address=192.168.1.37/24 interface=ether1
[d8920ya@R1] > /ip address add address=10.10.10.1/30 interface=ether2
[d8920ya@R1] > /ip address add address=10.10.11.1/30 interface=ether3
 
[d8920ya@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
 
[d8920ya@R1] > /ip firewall nat add action=masquerade out-interface=ether1 chain=srcnat
[d8920ya@R1] > /ip route add gateway=192.168.1.21
 
[d8920ya@R1] > /routing ospf interface add interface=ether2 cost=1
[d8920ya@R1] > /routing ospf interface add interface=ether3 cost=50
 
[d8920ya@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
 
[d8920ya@R1] > /routing ospf set distribute-default=always-as-type-1 redistribute-connected=as-type-1 redistribute-static=as-type-1
 
[d8920ya@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
 
[d8920ya@R1] > /routing ospf network add network=10.10.10.0/30 area=backbone
[d8920ya@R1] > /routing ospf network add network=10.10.11.0/30 area=backbone
 
[d8920ya@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

No comments:

Post a Comment