Reference: Mikrotik : OSFP,  Mikrotik ForumBALTIC Networks usa Training Academy

Configuring OSPF “Open Shortest Path First”

MK-Router1

[admin@MK-Router1] > export file=OSFP_MK-Router1

[admin@MK-Router1] > export compact

sep/28/2016 13:03:19 by RouterOS 6.37

software id = 36UM-PD8F

#=====================================================================
/interface bridge
add name=loopback
/interface ethernet
set [ find default-name=ether3 ] name=ether3-LAN
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-128-cbc
/ip pool
add name=dhcp_pool1 ranges=192.168.88.100-192.168.88.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether3-LAN name=dhcp1
/routing ospf instance
set [ find default=yes ] router-id=10.255.255.1
/tool user-manager customer
set admin access=own-routers,own-users,own-profiles,own-limits,config-payment-gw
/ip address
add address=192.168.88.1/24 comment=”LAN3 : 192.168.88.1/24″ interface=ether3-LAN \
network=192.168.88.0
add address=10.10.1.1/30 comment=”WAN-Ether1: R1-R2″ interface=ether1 network=\
10.10.1.0
add address=10.255.255.1 comment=Loopback interface=loopback network=10.255.255.1
add address=10.10.3.1/30 comment=”WAN-Ether4: R1-R3″ interface=ether4 network=\
10.10.3.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid disabled=no interface=\
ether2
/ip dhcp-server network
add address=192.168.88.0/24 gateway=192.168.88.1
/ip dns
set servers=61.19.245.245,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat
/routing ospf network
add area=backbone network=10.10.1.0/30
add area=backbone network=192.168.88.0/24
add area=backbone network=10.10.3.0/30
add area=backbone network=10.255.255.1/32
add area=backbone network=192.168.99.0/24
/system clock
set time-zone-name=Asia/Bangkok
/system identity
set name=MK-Router1

MK-Router2

 

[admin@MK-Router2] > export compact

sep/28/2016 13:09:12 by RouterOS 6.37

software id = 4ICB-V30E

#=====================================================================
/interface bridge
add name=loopback
/interface ethernet
set [ find default-name=ether3 ] name=ether3-LAN
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b rx-chains=0 ssid=MikroTik tx-chains=0
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=dhcp_pool1 ranges=192.168.188.100-192.168.188.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether3-LAN name=dhcp1
/routing ospf instance
set [ find default=yes ] router-id=10.255.255.2
/tool user-manager customer
set admin access=own-routers,own-users,own-profiles,own-limits,config-payment-gw
/ip address
add address=192.168.188.1/24 comment=”LAN3 : 192.168.188.1/24″ interface=ether3-LAN network=\
192.168.188.0
add address=10.10.1.2/30 comment=WAN-Etehr1:R2-R1 interface=ether1 network=10.10.1.0
add address=10.255.255.2 comment=Loopback interface=loopback network=10.255.255.2
add address=10.10.2.1/30 comment=WAN-Ether4:R2-R3 interface=ether4 network=10.10.2.0
/ip dhcp-server network
add address=192.168.188.0/24 gateway=192.168.188.1
/ip dns
set servers=61.19.245.245,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat
/routing ospf network
add area=backbone network=10.10.1.0/30
add area=backbone network=192.168.188.0/24
add area=backbone network=10.255.255.2/32
add area=backbone network=10.10.3.0/30
/system clock
set time-zone-name=Asia/Bangkok
/system identity
set name=MK-Router2
/system lcd
set contrast=0 enabled=no port=parallel type=24×4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set loopback disabled=yes display-time=5s
set wlan1 disabled=yes display-time=5s
set ether1 disabled=yes display-time=5s
set ether2 disabled=yes display-time=5s
set ether3-LAN disabled=yes display-time=5s
set ether4 disabled=yes display-time=5s
set ether5 disabled=yes display-time=5s

MK-Router3

[admin@MK-Router3] > export compact

sep/28/2016 13:07:48 by RouterOS 6.37

software id = PILY-4WSU

#======================================================================
/interface bridge
add name=loopback
/interface ethernet
set [ find default-name=ether3 ] name=ether3-LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-128-cbc
/ip pool
add name=dhcp_pool1 ranges=192.168.199.100-192.168.199.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether3-LAN name=dhcp1
/routing ospf instance
set [ find default=yes ] router-id=10.255.255.3
/tool user-manager customer
set admin access=\
own-routers,own-users,own-profiles,own-limits,config-payment-gw
/ip address
add address=10.10.2.2/30 comment=”WAN-Ether4: R3-R2″ interface=ether4 network=\
10.10.2.0
add address=192.168.199.1/24 comment=”LAN-Ether3: 192.168.199.1/24″ interface=\
ether3-LAN network=192.168.199.0
add address=10.10.3.2/30 comment=”WAN-Ether1: R3-R1″ interface=ether1 network=\
10.10.3.0
add address=10.255.255.3 comment=Loopback interface=loopback network=\
10.255.255.3
/ip dhcp-server network
add address=192.168.199.0/24 gateway=192.168.199.1
/ip dns
set servers=61.19.245.245,8.8.4.4
/routing ospf network
add area=backbone network=192.168.199.0/24
add area=backbone network=10.10.3.0/30
add area=backbone network=10.255.255.3/32
add area=backbone network=10.10.2.0/30
/system clock
set time-zone-name=Asia/Bangkok
/system identity
set name=MK-Router3

Advertisements