![]() MikroTiks have a reputation for being a networking Swiss army knife. You’d typically be looking in the multiple hundreds or thousands of pounds for a similar offering from other vendors. For example, I have a MikroTik RB4011 for my home router that has 10 single gigabit ports and 1 ten gigabit port. MikroTik are often significantly lower in price than what you’d find from other vendors. Their operating system (RouterOS) is built upon Linux, but unlike Arista EOS (or the BSD base of JunOS), you don’t typically have access to a Linux shell itself. MikroTik is a Latvian company who provide routing, switching, wireless and other networking devices. You can view the other posts in the series below: -Īll the playbooks, roles and variables used in this article are available in my Network Automation with Ansible repository. The best routes for a given destination will be copied from the protocol's route table to the main route table.The sixth part of my ongoing series of posts on Ansible for Networking will cover Mikrotik’s RouterOS. List the routes in OSPF's route table: /routing ospf route print List the OSPF neighbors on the device with the following command: /routing ospf neighbor print OSPF Routes ![]() The best device to check for neighbors is the middle router - if it has two neighbors then the top and bottom routers must be configured correctly. The following sections walk us through checking the status of OSPF routing:īy now OSPF should have established neighbor states between devices. ![]() With networks connected and OSPF configured we need to verify functionality. On the bottom router: /routing ospf networkĪdd network=10.255.255.3 area=backbone comment=LoopbackĪdd network=172.16.0.4/30 area=backbone comment="Middle router"Īdd network=192.168.3.0/24 area=backbone comment=LAN Verifying OSPF On the middle router: /routing ospf networkĪdd network=10.255.255.2 area=backbone comment=LoopbackĪdd network=172.16.0.0/30 area=backbone comment="Top router"Īdd network=172.16.0.4/30 area=backbone comment="Bottom router"Īdd network=192.168.2.0/24 area=backbone comment=LAN Use the following commands to advertise the routes directly connected on each router:Īdd network=10.255.255.1 area=backbone comment=LoopbackĪdd network=172.16.0.0/30 area=backbone comment="Middle router"Īdd network=192.168.1.0/24 area=backbone comment=LAN OSPF will advertise the following networks and addresses: With our OSPF instances configured properly we can now begin advertising our connected networks. Set default router-id=10.255.255.3 Advertising Networks On the bottom router: /routing ospf instance On the middle router: /routing ospf instance Set default distribute-default=always-as-type-1 On the top router: /routing ospf instance Use the following commands to configure the OSPF instances: Since the top router is attached to an upstream provider we'll also advertise the default route from that device. We'll configure the IP addresses created in the previous steps as the OSPF router's ID. Use the following commands to assign IP addresses to the new bridge interfaces:Īdd interface=lan address=192.168.3.1/24 OSPF Instance Configuration LAN interfaces need addresses for connecting user-facing LANs. The following commands create new bridge interfaces on all three of our routers:Īdd name=lan comment="LAN" Assigning IP AddressesĮach ospf bridge interface needs an IP address that can be used later to identify the router. Running OSPF on a virtual interface also makes the protocol more stable, because that interface will always be online. This makes the following steps work across any router model, regardless of how many ethernet ports it has. ![]() We'll use virtual loopback (bridge) interfaces for this exercise. The link from top-middle routers will use the 172.16.0.0/30 subnet. This provides the foundation for OSPF to communicate. We'll establish the point-to-point links between the router first. The following sections walk us through configuring interfaces, adding address, setting up OSPF, and advertising networks: Configuring it on MikroTik router's isn't difficult, and the long-term benefits of using dynamic routing can be big. While OSPF doesn't move traffic across the network on its own, it does allow routers to discover network paths. It's an open, industry-standard protocol supported by all major vendors. ![]() Open Shortest Path First (OSPF) is a Link-State routing protocol used by routers to dynamically exchange route information. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |