Community discussions

MikroTik App
 
DiogoT
just joined
Topic Author
Posts: 19
Joined: Tue Feb 21, 2017 7:31 pm

OSPF networks

Wed Feb 22, 2017 1:16 pm

Hello,
why are the networks we add in OSPF shared to other routers?

configuration of the following instance:
/routing ospf instance> print 
name="default" 
router-id=10.255.255.2 
distribute-default=never 
redistribute-connected=no 
redistribute-static=no 
redistribute-rip=no 
redistribute-bgp=no 
redistribute-other-ospf=no 
metric-default=1 
metric-connected=20 
metric-static=20 
metric-rip=20 
metric-bgp=auto 
metric-other-ospf=auto 
in-filter=ospf-in 
out-filter=ospf-out
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: OSPF networks

Wed Feb 22, 2017 3:05 pm

What is listed under OSPF Networks ?
 
DiogoT
just joined
Topic Author
Posts: 19
Joined: Tue Feb 21, 2017 7:31 pm

Re: OSPF networks

Wed Feb 22, 2017 3:27 pm

[admin@R1] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.100.128/25 area1
[admin@R2] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.250.248/29 backbone
[admin@R1] /routing ospf route> print
 # DST-ADDRESS        STATE          COST          GATEWAY         INTERFACE    
 0 192.168.100.128/25 intra-area     10            0.0.0.0         b-vlan100     
 1 192.168.150.248/29 intra-area     10            0.0.0.0         b-vlan150    
 2 192.168.250.248/29 inter-area     20            192.168.150.252 b-vlan150
[admin@R2] /routing ospf route> print
 # DST-ADDRESS        STATE          COST          GATEWAY         INTERFACE     
 0 192.168.100.128/25 intra-area     20            192.168.150.250 b-vlan150     
 1 192.168.150.248/29 intra-area     10            0.0.0.0         b-vlan150    
 2 192.168.250.248/29 intra-area     10            0.0.0.0         b-vlan250

Why network 192.168.250.248/29 appear on the router1?
Why network 192.168.100.128/25 appear on the router2?
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPF networks

Wed Feb 22, 2017 4:24 pm

The purpose of OSPF is to exchange routes between routers, so OSPF is doing exactly what it was designed to do. :-)

R1 is learning 192.168.250.248/29 from R2 via OSPF
R2 is learning 192.168.100.128/25 from R1 via OSPF

Is this not what you wanted to happen?
 
DiogoT
just joined
Topic Author
Posts: 19
Joined: Tue Feb 21, 2017 7:31 pm

Re: OSPF networks

Wed Feb 22, 2017 4:28 pm

So what are these settings for? Since they are in "no" were not supposed to not share?
distribute-default=never 
redistribute-connected=no  
redistribute-other-ospf=no 
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPF networks

Wed Feb 22, 2017 4:35 pm

[admin@R1] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.100.128/25 area1
[admin@R2] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.250.248/29 backbone
When the subnet is added to 'ospf network' it will advertise the prefix
 
DiogoT
just joined
Topic Author
Posts: 19
Joined: Tue Feb 21, 2017 7:31 pm

Re: OSPF networks

Wed Feb 22, 2017 4:46 pm

[admin@R1] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.100.128/25 area1
[admin@R2] /routing ospf network> print
Flags: X - disabled, I - invalid 
 #   NETWORK            AREA                                                     
 0   192.168.150.248/29 area1                                                    
 1   192.168.250.248/29 backbone
When the subnet is added to 'ospf network' it will advertise the prefix


Ok, thanks!
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: OSPF networks

Wed Feb 22, 2017 4:58 pm

If you would like 192.168.250.248/29 not to appear on router 1 you need move this network on router to into it's own area so that it is not passed as a backbone area would be.
If you would like 192.168.100.128/25 not to appear on router 2 you should not put it in area1 as you defined area 1 on both routers.
What routes are you wanting to be passed between the two routers?
 
DiogoT
just joined
Topic Author
Posts: 19
Joined: Tue Feb 21, 2017 7:31 pm

Re: OSPF networks

Wed Feb 22, 2017 5:08 pm

If you would like 192.168.250.248/29 not to appear on router 1 you need move this network on router to into it's own area so that it is not passed as a backbone area would be.
If you would like 192.168.100.128/25 not to appear on router 2 you should not put it in area1 as you defined area 1 on both routers.
What routes are you wanting to be passed between the two routers?
Thank you.
I've already tested what you said, and it worked. Thanks.
This doubt arose, since before they were allowed to share routes, they were already shared. However, it has already been explained that when I add a subnet to "OSPF networks" this will share its prefix.
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: OSPF networks

Wed Feb 22, 2017 6:48 pm

good news.

Who is online

Users browsing this forum: No registered users and 15 guests