Community discussions

MikroTik App
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

It is possible this with OSPF?

Fri Feb 05, 2016 8:13 pm

Good afternoon, everyone.

I wonder if it's possible with OSPF what I show in the picture attached and if you can help me or guide to configure it.

Thank you! ;)
You do not have the required permissions to view the files attached to this post.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: It is possible this with OSPF?

Fri Feb 05, 2016 8:35 pm

This is very possible....take a look at the first OSPF example in the wiki below:

http://wiki.mikrotik.com/wiki/Manual:OSPF-examples
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: It is possible this with OSPF?

Fri Feb 05, 2016 8:44 pm

note that 1.1.1.4/30 , 2.2.2.4/30 , and 3.3.3.4/30 are invalid IP addresses for /30 subnets. . .

1.1.1.X / 1.1.1.Y valid addresses are:
x / y
1 / 2
5 / 6
9 / 10
13 / 14
17 / 19
etc....

Also 172.80.1.0/22 isn't valid CIDR:
172.80.0.0/22 ( ranges up to 172.80.3.255 )
172.80.4.0/22 ( ranges up to 172.80.7.255 )
172.80.8.0/22 ( etc )
172.80.12.0/22 ( etc )
etc.

As for the OSPF design, you should also be using a loopback IP for each router:
/int bridge add name=loopback
/ip address add interface=loopback address=10.10.10.1/32
/routing ospf instance set 0 router-id=10.10.10.1

EDIT: whoops - you do have loopback IPs in your example. Be sure to set those as your router-id in the OSPF default instance.
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Fri Feb 05, 2016 11:23 pm

note that 1.1.1.4/30 , 2.2.2.4/30 , and 3.3.3.4/30 are invalid IP addresses for /30 subnets. . .

1.1.1.X / 1.1.1.Y valid addresses are:
x / y
1 / 2
5 / 6
9 / 10
13 / 14
17 / 19
etc....

Also 172.80.1.0/22 isn't valid CIDR:
172.80.0.0/22 ( ranges up to 172.80.3.255 )
172.80.4.0/22 ( ranges up to 172.80.7.255 )
172.80.8.0/22 ( etc )
172.80.12.0/22 ( etc )
etc.

As for the OSPF design, you should also be using a loopback IP for each router:
/int bridge add name=loopback
/ip address add interface=loopback address=10.10.10.1/32
/routing ospf instance set 0 router-id=10.10.10.1

EDIT: whoops - you do have loopback IPs in your example. Be sure to set those as your router-id in the OSPF default instance.

Thanks for your reply ZeroByte ;). IP addresses in the picture, are only for example, not real jejej

Thanks again ;)
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Fri Feb 05, 2016 11:24 pm

This is very possible....take a look at the first OSPF example in the wiki below:

http://wiki.mikrotik.com/wiki/Manual:OSPF-examples
Thanks IPANetEngineer, I will look closely at the wiki. If I have some questions I ask: D
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Sun Feb 07, 2016 12:26 am

I've been doing some tests with the information you gave me and I have some questions that do not quite understand

Question 1:
Following the example of the previous image, it is possible that a client connected to the backhaul on Router 1 (172.80.1.0/22) whose IP address is 172.80.1.75 to ping a client connected to the backhaul on the router 4 (172.80.4.0/22) having eg 172.80.4.252 ip address?

Question 2:
A client connected to backhaul on Router 4 could see the PPPoE server directly or to do some additional configuration on OSPF?

Thank you! ;)
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: It is possible this with OSPF?

Mon Feb 08, 2016 7:00 pm

PPPoE is a layer 2 protocol - so if you want a device to see some server (I assume you mean that you want it to be able to connect to it using PPPoE, not "it can ping the other host via IP address" - these are completely different "can see the other server" scenarios) then you have to use bridging or some bridge-like protocol such as VPLS.

Unless you're trying to do something advanced, the basic answer is this:
If both the source and destination IP addresses are correct in the routing table, then they'll be able to talk.

I know it sounds like I'm being picky, but when you say 172.16.1.x/22 and 172.16.4.x/22 - I have to wonder if your goal is to take a /22 and break it up among 4 routers.. this is completely doable, but your use of the /22 CIDR prefix is somewhat inconsistent, so I'm left to wonder what your actual goal is.

If you mean "I got a /22 from a network provider and I want to break it up among several access routers (pppoe servers) then what you would do is use smaller subnets of that range at each router - e.g. 172.16.0.0/22 -> assign 172.16.0.1/24 on R1, 172.16.1.1/24 on R2, 172.16.2.1/24 on R3, and 172.16.3.1/24 on R4.

If you mean "I want to use the same /22 at multiple routers and it's no accident that I showed two customer pools on two routers, but both pools are from the same /22" - then that's also doable, but the methodology is different.

The reason your diagram is vague to me is that 172.16.1.1/22 is not the boundary of the /22 block - so I'm left to wonder if this is intentional and relevant to the solution you want, or just an inconsistency by accident.

Here is an example network diagram of taking a /22 from the Internet (172.16.0.0/22) and breaking it down on a simple router topology, with some of the IP routes depicted. Of course all of the /30s and the router loopback IPs (10.10.10.x in my diagram) would also be in the routing table....
routing example.png
You do not have the required permissions to view the files attached to this post.
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Wed Feb 10, 2016 12:14 am

Goodnight ZeroByte. Thank you so much for your time to resolve my doubts.

The IP addresses that appear in the image are just an example. I explain how my situation and to guide me if you please.

Currently our network is in bridge mode as pictured below and we want to make a routed network using OSPF to improve service to our customers.
schema.png
Our network has only one main router (R0), the other routers are in bridge mode and also have a pool / 22 public IP addresses configured on the PPPoE server.

I set OSPF and works great when you disconnect a cable, the problem I have is that I do not know how to manage the PPPoE server.

As you told me you could keep a major pppoe server but would have to use VPLS for it and do not want to complicate this. You also told me that you can create in each router pppoe server and split the main pool / 22 into smaller subnets true?

Currently we have 6 routers on the network, but we will install more secure, which raises the following question me. How to distribute subnets while the network gets bigger? He would have to go removing addresses from a router to give to another?

Would greatly appreciate your help to configure OSPF correctly;)

Thank you very much again

Best regards
You do not have the required permissions to view the files attached to this post.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: It is possible this with OSPF?

Wed Feb 10, 2016 1:59 am

In general, you want to assign IPs to your customers in contiguous blocks - start with as small a block as you think will adequately serve the router for the time being and for a reasonable near-future. Then each router can advertise these blocks as single redistributed static routes:
172.16.0.0/25
172.16.0.128/25
172.16.1.0/27
172.16.1.32/27
etc...

any customer whose IP falls outside of the range native to the router should be allowed into OSPF as a /32 route if you cannot make this customer's IP fall into the "home" range for their router. You can assign additional blocks to the routers whenever the existing blocks fill up. That's why you should keep the ranges as small as feasible. Another good practice is to reserve the next block of the same size for expansion.
e.g.:
172.16.1.0/27 on router 2
172.16.1.32/27 - reserved for router2 expansion

If router2 doesn't get the number of customers you'd expected, and you need to assign more space to another router, you can use the .1.32/27 block on that other router, but try to save the reserved blocks for last. If R2 grows as planned, then you simply change its block to be 172.16.1.0/26 which doubles the IP space that's routed to R2.

If your customers aren't assigned in a manner that would be convenient to do this, you can let all of the customers' /32 routes go into OSPF and everyone will be able to surf. Perhaps you can start re-numbering certain customers until you can tidy up the routing table as described earlier in this post.
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Wed Feb 10, 2016 10:48 pm

Good evening

Thank you very much for your help ZeroByte. I'll try what you told me in a virtual machine.

The only router that has to redistribute routes is "Router0" or should be distributed routes other routers too?

Thank you! :D
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: It is possible this with OSPF?

Thu Feb 11, 2016 12:52 am

Well, in general you want to avoid redistributing routes except where it's necessary and meaningful to do so... A router that redistributes into OSPF is referred to as an ASBR - you should make sure that all ASBR routers are at the "edges" of your OSPF cloud - meaning that any routes they distribute into OSPF point to next hops that are not also speaking OSPF.

Customer-facing PPPoE servers are usually ASBR routers because you don't want your customers participating in your OSPF.

So I guess to address your "only R0 is distributing routes" statement, I would say definitely not - all of your routers should be announcing everything that's attached to them - by native origination as much as possible - so if you have a network attached to ether3, place that into the "networks" list of the OSPF process - e.g. "/routing ospf network add network=172.16.4.0/24 area=backbone"

Think of a route announcement like a magnet that pulls packets towards it from everywhere else in your network. If customers have such-and-such an IP address, then the magnet for their addresses needs to be on the router they're connected to.

Loopback interfaces are often left to be advertised by "redistribute connected" configurations, but you really should just put the /32 of the loopback as an interface as well.
 
djfrancis
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 78
Joined: Thu Feb 02, 2012 12:01 am

Re: It is possible this with OSPF?

Thu Feb 11, 2016 11:52 pm

Zero thank you very much. I'll set up a few routers that I have in the lab with OSPF to see how it gives me hehehe :lol:

Thank you again, if I had any questions I'll ask here :D

Cheers

Who is online

Users browsing this forum: No registered users and 7 guests