Thursday, July 25, 2013

Routing OSPF di Mikrotik



Silahkan baca teori OSPF pada link tautan ini http://www.scribd.com/doc/38620524/Multi-Area-OSPF
Implementasi  pada Router Mikrotik versi 3.30
Konsep OSFP Area 0
Konfigurasi di R1


/ip address add address=192.168.1.37/24 interface=ether1 
/ip address add address=10.10.10.1/30 interface=ether2 
/ip address add address=10.10.11.1/30 interface=ether3 
 
/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 
 
/routing ospf interface add interface=ether2 cost=10 
/routing ospf interface add interface=ether3 cost=50 
 
/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 
 
/routing ospf set distribute-default=always-as-type-1 
/routing ospf set redistribute-connected=as-type-1 
/routing ospf set redistribute-static=as-type-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: 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 
 
/routing ospf network add network=10.10.10.0/30 area=backbone 
/routing ospf network add network=10.10.11.0/30 area=backbone 
/routing ospf network print 
Flags: X - disabled, I - invalid 
#   NETWORK            AREA 
0   10.10.11.0/30      backbone 
1   10.10.10.0/30      backbone 
 
/routing ospf route print 
# DESTINATION        STATE      COST                            GATEWAY         INTERFACE 
0 0.0.0.0/0              imported   1                                              0.0.0.0 
1 10.10.10.0/30      intra-area 10                                             0.0.0.0         ether2 
2 10.10.11.0/30      intra-area 50                                             0.0.0.0         ether3 
3 10.10.12.0/30      intra-area 110                                           10.10.10.2       ether2 
4 192.168.1.0/24     imported   20                                           0.0.0.0 
5 192.168.2.0/24     ext-1      70                                              10.10.11.2       ether3 
6 192.168.3.0/24     ext-1      30                                              10.10.10.2      ether2 
 
/ip route print 
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
#      DST-ADDRESS        PREF-SRC        GATEWAY-STATE GATEWAY          DISTANCE INTERFACE 
0 A S  0.0.0.0/0                 reachable       192.168.1.21                              1        ether1 
1 ADC  10.10.10.0/30      10.10.10.1                                                               0        ether2 
2 ADC  10.10.11.0/30      10.10.11.1                                                               0        ether3 
3 ADo  10.10.12.0/30       reachable       10.10.10.2                                110      ether2 
4 ADC  192.168.1.0/24    192.168.1.37                                                             0        ether1 
5 ADo  192.168.2.0/24     reachable       10.10.11.2                                110      ether3 
6 ADo  192.168.3.0/24     reachable       10.10.10.2      




Supaya Router R1 dapat berkomunikasi dengan Internet maka harus ditambhakan NAT pada Router R1 dengan cara masukan perintah dibawah ini:


/ip firewall nat add action=masquerade out-interface=ether1 chain: srcnat

No comments:

Post a Comment