Community discussions

 
makstex
newbie
Topic Author
Posts: 46
Joined: Fri Mar 27, 2009 6:31 am

OSFP need hint.

Wed Nov 29, 2017 9:28 am

Two providers on each gateway: the main and emergency.
How to configure OSPF so that R1 has routes to each subnet, and R2, R3 and R4 did not know about each other's existence, but only about R1?
You do not have the required permissions to view the files attached to this post.
 
mlenhart
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Mon Oct 30, 2017 11:30 pm

Re: OSFP need hint.

Thu Nov 30, 2017 4:37 pm

Hello,

I am not an OSPF guru, so my proposed solution may be incorrect, but here is my idea how this could be done:

1) configure OSPF on all interfaces on R1 so it can make a neighbourships with R2, R3 and R4
2) use out-filter to allow only networks you want to be advertised to R2, R3, R4
 
User avatar
jprietove
Trainer
Trainer
Posts: 88
Joined: Fri Jun 03, 2016 3:00 pm
Location: Cádiz, Spain
Contact:

Re: OSFP need hint.

Thu Nov 30, 2017 8:02 pm

Hello. I don't really understand what do you mean when you say "R2, R3 and R4 did not know about each other's existence, but only about R1".
You can use different totally-stub areas for R2, R3 and R4. This way, R2, R3 and R4 will have a default gateway that will be R1. BUT they can send packets to all the networks.
Code for R1:

Code: Select all

/system identity
set name=R1
/interface bridge
add name=local
add name=loopback
/routing ospf area
add area-id=1.1.1.1 default-cost=1 inject-summary-lsas=no name=a1 type=stub
add area-id=2.2.2.2 default-cost=1 inject-summary-lsas=no name=a2 type=stub
add area-id=3.3.3.3 default-cost=1 inject-summary-lsas=no name=a3 type=stub
/routing ospf instance
set [ find default=yes ] router-id=1.1.1.1
/ip address
add address=1.1.1.1 interface=loopback network=1.1.1.1
add address=172.16.0.1/30 interface=ether1 network=172.16.0.0
add address=172.16.1.1/30 interface=ether2 network=172.16.1.0
add address=172.16.0.5/30 interface=ether3 network=172.16.0.4
add address=172.16.1.5/30 interface=ether4 network=172.16.1.4
add address=172.16.0.9/30 interface=ether5 network=172.16.0.8
add address=172.16.1.9/30 interface=ether6 network=172.16.1.8
add address=192.168.100.1/24 interface=local network=192.168.100.0
/routing ospf network
add area=a1 network=172.16.0.0/30
add area=a1 network=172.16.1.0/30
add area=a2 network=172.16.0.4/30
add area=a2 network=172.16.1.4/30
add area=a3 network=172.16.0.8/30
add area=a3 network=172.16.1.8/30
Code for R2:

Code: Select all

system identity
set name=R2
/interface bridge
add name=local
add name=loopback
/routing ospf area
add area-id=1.1.1.1 default-cost=1 \
inject-summary-lsas=yes name=a1 type=stub
/routing ospf instance
set [ find default=yes ] router-id=2.2.2.2
/ip address
add address=2.2.2.2 interface=loopback network=\
2.2.2.2
add address=172.16.0.2/30 interface=ether1 network=\
172.16.0.0
add address=172.16.1.2/30 interface=ether2 network=\
172.16.1.0
add address=192.168.101.1/24 interface=local network=\
192.168.101.0
/routing ospf network
add area=a1 network=192.168.101.0/24
add area=a1 network=172.16.0.0/30
add area=a1 network=172.16.1.0/30
R3 and R4 can be configured in a similar way.
When this is done, this is the routing table for R2:

Code: Select all

[admin@MikroTik-ap] > 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
0 ADo 0.0.0.0/0 ------- 172.16.0.1
1 ADC 2.2.2.2/32 2.2.2.2 loopback
2 ADC 172.16.0.0/30 172.16.0.2 ether1
3 ADC 172.16.1.0/30 172.16.1.2 ether2
4 ADC 192.168.101.0/24 192.168.101.1 local

Who is online

Users browsing this forum: No registered users and 24 guests