Network Architect, Marc Perea, walks through how to build an OSPF Network. Learn how to document your network before you start creating it, and then how to configure and organize your routers for an efficient OSPF Network. Watch parts 1 and 2, and follow along with the written instructions below.
Video: How to Build an OSPF Network – Part 1 #
Video: How to Build an OSPF Network – Part 2 #
Step-by-Step Guide #
Part 1: Visualize & Diagram Your Network #
- Create a blank diagram using your favorite diagramming tool (Vizio, Lucidchart, Diagrams.net, etc)
- Insert router icons and create a basic layout of your network by organizing them and linking them with lines
- Insert an internet icon at the top of the diagram
- Choose an IP range for your transport IP’s and document it on a blank section of your diagram – I.E. 100.64.0.0/10 (CGNAT)
- This is the network that communicates with OSPF and is different from your internet IP’s
- This means Private IP’s can be used to help conserve Public IP’s – but you can use Public IP’s if you want.
- Assign a range for your Loopback IP’s, which will also be your Router ID’s, and document it under your IP range – I.E. 100.127.0.0/24
- Assign a range for your transport network – I.E. 100.126.0.0/26
- Subnet all of your links, starting closest to the internet* – I.E. 100.126.0.0/29
- Increase by your subnet as you go – In this example, a /29 – I.E. 100.126.0.8/29, 100.126.0.16/29
- *This pattern is arbitrary, organize and flow your link subnets however it makes sense to you.
- Need help with subnetting? Check out this tutorial! – NEED LINK
- Pro-Tip: Use /29 instead of /30 to help with troubleshooting by allowing you to have more than 2 hosts on the subnet. This allows extra devices that can take a Layer 3 IP to be added, so if you are having network trouble you can take a look at your ARP, Bridge, and Mac tables to determine if you are having a link problem or a router problem.
- Starting closest to the internet*, assign your hosts an IP – I.E. .1 & .2 for your 100.126.0.0/29 link
- Continue assigning hosts with IP’s – I.E. .9 & .10 for 100.126.0.8/29
- *This pattern is arbitrary, organize and flow your host IP’s however it makes sense to you.
- Assign a Loopback/RID to each router – I.E. 100.127.0.1/32, 100.127.0.2/32
- Since this is just a Loopback IP, the subnet is /32
- (From Part 2 Video) Assign physical ports to your routers.
- A good practice is to assign ether1 to all upstream connections, having it be the closest internet facing Ethernet port.
- (From Part 2 Video) Number routers based on the ID of the loopback.
- For example, router one is .1, two is .2, etc.
- Your diagram is now all set!
Part 2: Configure & Organize Your Network #
- Sign into the first router you will be configuring. Set a system ID if you have not already done so
- /system identity set name=OSPFRouter1
- Change 1 to correct number based on router
- /system identity set name=OSPFRouter1
- Create a loopback on the router & assign an IP to it
- /interface bridge add name=loopback0
- This bridge will always be up, behaving the same as you may expect to see in other vendors
- /ip address add address=100.127.0.1 interface=loopback0
- Adjust IP as you continue to add routers
- Make sure interface is set to the loopback bridge you created at the start of this step
- /interface bridge add name=loopback0
- Add IP addresses to all interfaces based on diagram
- /ip address add address=100.126.0.1/29 interface=ether2
- Set address and interface based on diagram from Part 1
- /ip address add address=100.126.0.1/29 interface=ether2
- Check OSPF configuration
- /routing ospf instance print
- Check that there is no conflicting configuration
- /routing ospf instance print
- Update Router ID
- /routing ospf instance set router-id=100.127.0.1
- Set router-id based on loopback address
- /routing ospf instance set router-id=100.127.0.1
- Set which interfaces will use OSPF
- /routing ospf interface add interface=loopback0 passive=yes
- Setting the loopback with the passive flag will keep the loopback from attempting to form an impossible adjacenecy
- /routing ospf interface add network-type=point-to-point interface=ether2 use-bfd=yes
- Run for all interfaces set in diagram
- use-bfd=yes can reduce a network outage from 30 seconds to 1 second and is recommended over default values when your gear is compatibile
- Run for all interfaces set in diagram
- /routing ospf interface add interface=loopback0 passive=yes
- Add network statements so OSPF which interfaces to talk on
- /routing ospf network add network=100.127.0.1 area=backbone
- /routing ospf network add network=100.126.0.0/29 area=backbone
- Run for all networks set in diagram
- Repeat steps 1 through 7 for all other OSPF routers, moving to a connected router next
- /ip neighbor print
- Use to determine and copy it’s MAC for use in:
- /tool mac-telnet AA:AA:AA:AA:AA:AA
- Sign into the router and continue from step 1
- If you cannot sign in this way, open a new WinBox connect and connect to the router
- /ip neighbor print
- Test adjacency by running ping over the link
- /ping count=1 100.126.0.1
- /routing ospf neighbor print
- state=”full” means the connection is ready to form an adjacency
- /ip route print
- OSPF routers will show up as “ADo”
Having trouble? Contact us at support@admiralplatform.com
Learn more about managing your MikroTiks at https://admiralplatform.com