MikroTik - OSPF Configuration

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what's up everybody the network Berg here I hope you're doing well in today's video we'll be discussing OSPF on a mikrotik router it's pretty straightforward actually if you look at this diagram it looks a bit hectic I don't want things like a network diagram to scare you into learning networking but it is something that you have to get used to so whenever you look at a diagram like this try and tackle it as logically as possible just look at what routers they are how they're all connected and if there's any IP address information between these routers because it's actually just showing you how everything is connecting it's not really showing you the solution as a whole so just something to take note of so whenever I need to look at a router I'll just look at the interfaces and try and figure out how everything's actually connecting you'll see I did add a switch here the switch it has nothing to do with OSPF this is just for me to quickly manage these routers and set them up and configure them so that we can do it very quickly I didn't want to struggle and make it a hassle so I just added like a management range on all of the port ends of these devices and there's some management IPS that I can get to them from my computer so back to the topic OSPF what is it it is an eye GP and interior gateway protocol typically what an eye GP is it is a routing or a dynamic routing protocol that works within its own autonomous system so this is something that you would use in your own network this isn't something that you would use to be peering with another provider that is something that you'd use like BGP for OSPF we use that locally it works great in the enterprise it works great for small ISPs and when you start moving to some bigger ISP territory you might see something like IAS is in order to do that internal routing for you so OSPF is also a link state routing protocol so we'll look at all of the links all of the interfaces that is coming in that you've configured where it is broadcasting its hello messages out of in order to form adjacencies or neighbor ships with other routers and then it will learn the base path through the network by looking at things like costs and bandwidth and all kinds of cool stuff like that so we've got a basic topology here this area is zero zero zero zero or area zero there's always going to be your backbone so area zero always needs to learn all of the different routes it's kind of the main routing table if you think about it and we can split OSPF into smaller areas like areas the UC area one or area two I'll just hover my mouse there where you can limit the amount of link state updates being broadcasted with inside the area so let's say if you only used area zero what happens if you have a thousand routers they would flood each other with broadcast traffic and it could potentially down your own network just by router sending each other hello updates and LSU's and stuff like that it's really not best practice to do that however if you split it up into smaller areas it will only keep those broadcasts within that area so not all the routers will keep talking to each other and learning all of the base paths only the routers within the areas will learn their relevant routes and then you'll see like this router in the middle that will then bring it into area zero limiting the amount of broadcast traffic then so it OSPF you typically get three different types of routers the one is an ir or an internal router that you can think of the last mile or the edge where you're going to stop running your oh s PF or not stop running it but there's not going to be typically another router that you're going to connect into a different area from here if you do that then that router automatically becomes an ABR or an area border router so this is like this a B or one or a B - so this is a router that exists inside both areas it will learn the routes of area 0 0 or 0 - and it will learn the routes of area 0 but it will bring the routes of area 2 into area 0 and vice versa it will bring those routes at learns from area 0 into area 2 as well so it's just a router it's between the areas and then lastly you'll get an ASB R or autonomous system border router so that would typically be a router on your edge somewhere that's peering with let's say an internet service provider and your learning your internet routes or external networks through this router so the external networks will still come into the router but that part it's it's that that's EGP that's not going to be IGP but we call it an ASPR because it exists on your edge connecting two different routers but it's still learning your internal routes so you might see that at your edge where like like I said we are connecting with your ISP that's the base of OSPF actually so now that we've done the logic let's quickly do the configuration so I've already configured all of these routers they've they all have OSPF running and it's working and it's great and it's good but me showing you that OSPF is running and working doesn't necessarily show you anything so what I'm quickly going to do is I'm going to spin up a new router for you let's just find a mikrotik here I'll call this r2 now our yeah we can use r2 r2 is not being used I might just move this a little bit for my own sanity and I'm also just going to connect this router into the switch quickly actually we need to connect the router to some of the other outer sole it let's may be connected to ABR one on ether 3 and router one on ether 3 so let's do it that way just make it look a little neater doesn't matter too much we already know which ports goes where and then port 10 I'm just going to bring into my management's as well so we can quickly get there I'm gonna turn the router on and then we're gonna configure an IP address on it quickly let's get in there add learn blank so you see this is a blank creature in its default State nothing's happening here IP address add address so this is again just the management route if you're 10 so now I can go into my winix and we can do this through the command line as well I just choose to do it through wind box because it is relatively straightforward on my critics one box so we've got one box open we're on that new router we created so in order to do the OSPF we need to go into the routing tab we go into OSPF first thing we do is we can add our instances but there's already going to be an instance and this should be your backbone so this will be here by default you can't delete this it will always be here it's always good to set a router ID because this identifies think of this as your name in the routing process so typically what you do is you'd either give this like a loopback address or you could potentially give it one of your van IPS or something that you know another out on the network isn't going to have so I might just make this let's just make it seven dot 7.7 not actually 838 38 to the right but 9 because I don't want that Google's DNA is to be an issue ok I cancel that by accident let's just quickly create a loopback address so we can do that by adding a bridge call it a low one and assign that same IP address to that bridge 834 8.9 my fingers are so quick to type Google's DNS fly so now I just quickly need to set up IP addresses between this new router we set up and the two other routers because they need to be able to communicate with each other directly so let's just do that I did connect ether one into the ABR so let's just give it a I P address of I'll just make it 10 3 0 1 / 30 and then ten-30 5/30 and I just need to assign this same eye piece to the other routers quickly so that should be dot a3 just want to make sure this is the right router it looks like it is so let me just quickly add the address and this came on to ether 3 so that will make about two just need to enable it sorry I disabled these interfaces in my lab and I need to do the same on router 1 or the we can think of that as the provider odd or the core router same thing enable ether 3 add an IP address and I don't want the eyepiece to confuse you they could have already been pre set up like a lot of your networks might be and you're just thinking to bring OSPF online in order to dynamically start routing or your travel your routes instead of having to manually or statically put everything in because that's such a mission isn't it ok so I've added my address but that isn't a right address it should be that six okay so I should now be able to reach ten three zero five correct and let's just go to the ABR and this one should be able to reach ten 3:02 okay cool so we do have IP connectivity between our outers so this new router we brought in it can talk to router one and the ABR or or whatnot let's just quickly set up the OSPF again now so let's go back into our new router we have our loopback address we've got IP addresses that can communicate across the network so let's go into the OSPF so to do it on mikrotik very straightforward and this is also an automatic process the first time like you'll see what I'm talking about now so we click on the plus if I add that 10.3 dot 0 dot 0 slash 30 on the backbone and I add 10 dot 3 dot 0 dot 4/30 that's yes that's right then we are going to start seeing it is running now and if I go to my interfaces which was blank when we went in here it created two dynamic interfaces ether one and ether two which are the interfaces that's connecting to the other routers so they're currently in a waiting State reason being is I haven't set the networks up on the remote router so it doesn't it's not sending out hello packets on router one or the ABR so let's just quickly do that Oh SPF so this should be that's rather one so it's this one and let's go into router or the ABR routing OSPF networks same thing will apply on this router you'll see if the three became a dynamic interface but I'll go to our new router that we created and the OSPF has connected the new router went into the the dr or designated router state so think of this it's it's just like is it a primary or backup or whatever outer but we'll change this right now because i tend to like to use point-to-multipoint whenever i do is set up and I don't like using the dynamic interfaces either so to change it just double click on the interface copy it same values except the network type we're going to switch to point-to-multipoint and all these other values you can change them as much as you want it will have a change on how this router distributes it routes to the other routers so if you increase this cost it will make the route cost more in order to get here to this router ok point-to-multipoint i've set this I just want to set it on all of them quickly and it's very quickly to do as you can see so same thing here copy point-to-multipoint and then the last one copy point-to-multipoint ok so now I have all these interfaces configured for OSPF and it is running so let me just go back to our new little router it is set up it is running so if I go to my neighbors tab I can see which neighbors I have what their outer IDs are what their addresses are that I'm connecting to them which interfaces they're on and how many times the link state has changed so this can be any updates that are sent throughout the network if it goes down maybe or if there's some issue this state value changes we can go into our routes and then here we can see which routes we are learning so these are all of the OSPF routes that are being sent through the network these are all of the addresses these gateways just tells our outer how to get to him and here's the interfaces it's learned it as well as what the cost is so it's just like static routing when you define a cost it's gonna take this much to get to that network right you'll see the state the state is also important so you will get three different states in OSPF on mikrotik the one is intra area so those are routes or routes that are learned inside your area so routes that are learned inside areas zero the backbone inter area or routes that are learned in a different area inside area one or area two in order to create a new area it's pretty straightforward I'll do the creation so you click on the plus and then from here actually let's just jump back into gns3 I'll go into this ABR and show you we had it open the ABR let's go into the ABR so if we go into our routes and we go into the OSPF we go into the areas you'll see I've already defined area zero zero here to add the area obviously you just click on the plus call it whatever you want you might call it a customer name or area zr1 whatever you're comfortable with the instance that's just remember the start where we had our instances where we define the router ID that's what this instance is referring to so in that instance you could also use a different routing table which is quite nice area ID so this isn't an important bit so here you can make it like area 1 or 2 or 10 or 100 and that's it you can set the type as well generally you're going to leave it as default we hit apply and then I've got an area 100 here so when we define the networks earlier to start that OSPF communication here you see I've got area 0 1 define so if I wanted to bring this into a different area I would just connect it on area 0 there and I would put the network that I want to broadcast inside that area so let's go back to our new router I just want to broadcast our route out quickly to the rest of the network because if I go into let's say rather 1 you remember on the new router we have an 8.8.8.8 pack address if I go into my routes I suspect that I do not have that route as you can see I do not have it so let's quickly send that route throughout the network so I'm going to go back onto the new router when we go into the network's we can click on the plus here again and I'm going to say I'm going to broadcast 8.8.8.8 apply now let's go back to router one and rather one is that router at the top so router 1 it's learning 8.8.8.8 knows how to get there on on dot 5 and if I go into my routing OSPF and I go look at the route again you'll see there it's learning it and it learns how to get there so that is OS PF in a nutshell it's a routing protocol that will make your life a lot easier once you implement it inside your network especially like I said if you're a small ISP it'll save you so much time and there's so many different things that you can do I could probably round on for a good couple of hours on the different types of configurations you can run on OSPF how you could redistribute your routes into different routing protocols as well it's it's really an interesting subject routing in general I hope this wasn't too confusing for you if it was I can make a follow-up video I just wanted to show you how to set up a OSPF on a mikrotik router and how it works I hope this has been informative and I'd like to thank you for watching if you haven't subscribed to the channel please consider doing it it does help grow it and consider sharing this with your friends if you know anybody that wants to get internet working I I appreciate it so much thanks again
Info
Channel: The Network Berg
Views: 14,644
Rating: undefined out of 5
Keywords:
Id: ct6-XZNBC2Q
Channel Id: undefined
Length: 20min 3sec (1203 seconds)
Published: Wed Sep 25 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.