Hello, I have an OSPF network operating with private addressing classes. I have set the private address of the loopback interface for each router in the OSPF instance as usual. (Example: 172.16.0.1/32). Everything works perfectly. At this point I wanted to route a public subnet between two routers but when I create a static route (Dst.Address Gateway 172.16.0.2) as the next hop I enter the IP of the router. The problem is that the route is “unrechable” even if I actually manage to reach that IP (I did a ping and it is reachable). I don’t understand where the problem lies. Any suggestions can help thanks
Thanks, if you change the “target scope” parameter from 10 to 20 the routes are active and with the words “recursive”.
I have one last question, I was using those routes to route a public subnet from router where I have a BGP session with my ISP to a router on my network.
In the first router I added a static route
Dst.address =
gateway = .
In the internal router of my network, where I wanted to make the public subnet usable, I loaded an IP of that subnet on the loopback interface and
added a generic static route
Dst.address = 0.0.0.0 / 0
gateway = <loopback-ip-first -router>.
I was wondering if conceptually I have performed a suitable configuration or the routing procedures of public subnets in an OSPF network are carried out differently. Thank you in advance
Not sure if I follow your setup.
But since you already have ospf, is there a reason why you don’t want to let ospf does its job? IE have the bgp router advertise default route (0.0.0.0/0) and each of the internal advertise its ?
This way you don’t have to keep adding static route everywhere when you start adding more internal routers.
One reason is actually this because I wrote on the forum, I was not sure about the configuration so briefly I explain my problem maybe you have some suggestions.
I have a router with a BGP instance that connects my OSPF network to that of my ISP. On this router I announced a public / 24.
My routers internal network is fully OSPF. I split my / 24 subnet into / 29 so that I want to use each subnet on a different router.
Basically I can’t make it possible to use these last subnets on the final routers.
For this reason I have thought of static routes, but if there is a more suitable way, it is welcome.
The public subnet is not in the scheme because it has only entered the private network classes.
The subnet I publish from the AS_router through the bgp session is 185.yyy.zzz.0 / 24.
Basically I would like to divide the subnet into subnets / 29 and assign one for each router present in my network, with the exception of the AS_router.
I have tried with static routes but for now to no avail.
I read that it would also be possible to route the OSPF directly by adding the public network class / 20 on each individual router and as you suggested to route the default route from the AS_router to all the others in order to have a 0.0.0.0/0 route on all routers in the network.
Okay, for the discussion, let’s assume the public subnet is 185.123.123.0/24.
For simplicity, assuming also on Router_3 you would like to assign ip 185.123.123.25/29. In my case I am adding it to a bridge, but in reality you can also add it to an interface.
So let’s focus on the LSA for 172.16.0.5 (R3) which is at the end of your drawing. It shows the following routes advertised:
10.0.15.253/32
10.0.12.0/22
172.16.0.5/32
Assuming 10.0.12.0/22 works, I have two questions:
What does the LSA look like when you try to advertise a public /29 on this router (I would recommend to substitute the doc prefix of 203.0.113.0/24 into the output instead of the actual public range)
What kind of interface is 10.0.12.x/22 assigned to (eth, vlan, bridge, etc) and is the public subnet configured on a similar type of interface?
I also performed this test allowing the spread of the 0.0.0.0/0 route.
Basically all the suggestions you have given me are consistent with my current configuration but there must be a step, even a trivial one, that I have made incorrectly and for this I have problems.
I ask you a last courtesy, I have decided to reconfigure the network again because it has become confusing; when i ask you if you know of examples of ospf mikrotik configuration with routing of public subnets in order to draw example.
Basically summing up my need is to create a ospf network by routing a public / 29 for each router.
Thank you