Total 3 Blogs

Created by - Orhan Ergun

OSPF Protocol Basic Overview

What is OSPF Language-wise it stands for Open Shortest Path First, and Family wise it belongs to the Link-State Interior Gateway Dynamic Routing Protocols. Done with the CV yet?, OSPF is an open standard internal routing protocol that is supported across all the different vendors manufacturing networking platforms. In this article, we will review the basics and specs of this protocol, and see its own unique features. OSPF Neighbor States As a start, the OSPF routing protocol uses a multicast hello message that is destined to the OSPF Multicast address of 244.0.0.5 seeking any possible other OSPF routers in the area. This message keeps repeating every 10 seconds by default, and that will be out of the interfaces that announced an OSPF configuration, which depends on how you configured it + the vendor-specific configuration template. Upon receiving a multicast hello message from another router we already sent it a hello message earlier, and that should be within the dead timer of 40 seconds maximum (by default). An OSPF neighbor process will start by: Init: at the moment of confirmation that a bidirectional multicast hello has initiated 2-Way: communication from the 2 parts has successfully occurred ExStart: OSPF router-id gets exchanged and database information begins to be shared Exchange: link states bidirectional communication and exchange Loading: final synchronization of LSA's Full: settlement and official neighboring announcement OSPF Routing Protocol Before starting routing, OSPF understands its neighboring environment by drawing a shortest-path tree SPT to those neighbors that it established a neighboring state with them earlier, based on the Dijkstra's Algorithm. Having the tree will allow the OSPF router to know how to reach each neighbor in the best way, and that will depend on the OSPF metric calculated per neighbor. named as the "Cost". OSPF at Rest With no triggers or events, OSPF routers will be calm, with no need to exchange any routes or LSA's, leaving the databases named LSDB's as steady, identical between routers, and containing the same types and amounts of LSA's. Only the OSPF hello message will be forever bidirectionally exchanged to maintain the neighbor state.

Published - Wed, 20 Apr 2022

Created by - Orhan Ergun

OSPF Configuration - A sample template on multi-vendor routers

There are commons and differences to the time when it comes to configuring an OSPF routing protocol on a router you manage, based on the router's manufacturer. We will take a look at the basic sample of configuring OSPF on Cisco IOS-XE and Juniper's JunOS operation systems. OSPF on Cisco IOS-XE With ios-xe we start configuring OSPF by mentioning the numerical value of the: OSPF Process ID And what that does mean is just a number to isolate some hierarchical designs of the OSPF process on the router of cisco. Does it have to be matched on both the peering ends?, the answer is NO Does it affect some priorities in some OSPF election processes?, the answer is also NO Is it that mandatory?, well based on that "OS" it is, but it is not a general OSPF concept? As it is missing with the other vendors!! That makes the first line of configuration look like this:         OERouter1(config)#router OSPF [Process ID] i.e. "OERouter1(config)#router ospf 10 OSPF Network Advertisement The later step after getting into the hierarchical mode of OSPF, specifying the process ID as well, is to advertise the networks. These networks prefixes and prefix lengths will be announced to the adjacent neighbors inside the transported LSA's of the OSPF routing protocol. OERouter1(config-router)#network [network prefix] [network wild card mask] _____ i.e. "OERouter1(config-router)#network 10.10.10.0 0.0.0.255 _____ and that will be advertising a network with the prefix of 10.10.10.0 and the prefix length of 24 OSPF Area ID The real key here in OSPF configuration is the Area ID, the Area ID does the isolation, it does the creation of multiple databases LSDB, it generates the need and the role for the ABR Router, It has to be matched on both the ends of the peering OSPF routers, and there will be a database for every area. OERouter1(config-router)#network [network prefix] [network wild card mask] Area [Area ID] i.e. "OERouter(1config-router)#network 10.10.10.0 0.0.0.255 Area 0 That line had just advertised the network of 10.10.10.0/24 into the domain and database of Area 0 Any other participating router within the same area will receive some LSA's carrying the 10.10.10.0/24 network advertisement. OSPF on JunOS OS On the other end, the other router awaiting to peer with the Cisco IOS-XE router will be a router from Juniper Networks, Having the one unified intelligent JunOS OS installed on, Here, just like it is with many other vendors, there will be no "Process ID" Advertise a network and its Area ID under the umbrella of OSPF configuration hierarchy, and that is it. [edit] [email protected]#edit protocols [dynamic routing protocol] [email protected]#edit area [Area ID] i.e. [email protected]#edit protocols OSPF [email protected]#edit area 0.0.0.0 Areas with JunOS can be mentioned either as a normal numerical value [0] or as a 32-bit value [0.0.0.0] The classic of JunOS is to use the [0.0.0.0] form. After specifying the Area ID, and also making sure that the syntax started with "edit" We will log in another JunOS hierarchical mode, where we can advertise "Participating Interfaces" instead of "Networks" [email protected]#set interfaces [interface_ID.logical_unit] i.e [email protected]#set interfaces ge-0/0/0.0 or: [email protected]#set interfaces ge-0/0/0 unit 0 Now any network getting advertised within the interface ge-0/0/0 generally (unit 0) Will be advertised out of that interface as a network participating in OSPF Area 0, to the other side. Point of Argument Will the above samples of configuring 2 different platforms, running 2 different operating systems, Having 2 different ways of advertising a network out, and also one of them misses a mandatory statement based on the other aspect, Will all of that work!!! The answer is YES, OSPF is an open standard protocol, it is supported across multiple vendors, the slight differences in configuration samples are just some languages differentiations, But neighboring adjacency will come up and full Link-State Databases (LSDB's) will be established and fully synchronized between the routers using LSA's. A more unified method As we've seen earlier, with Cisco IOS-XE, the OSPF configuration was done by advertising a network, while in JunOS it was done by advertising an interface. That can have an alternative way on Cisco's IOS-XE, by also advertising an interface, BUT, from the interface hierarchical config. mode. OERouter1(config)#interface [interface ID] OERouter1(config-if)#ip ospf [Process ID] Area [Area ID] i.e. OERouter1(config)#interface gi 0/1 OERouter1(config-if)#ip ospf 10 area 0

Published - Wed, 20 Apr 2022

Created by - Orhan Ergun

OSPF FAQ - Frequently Asked Questions

In this post, some of the frequently asked OSPF questions will be answered. Some of the answers will be from a design point of view and we will try to provide enough justification for the answer. Questions are selected randomly, not based on the order of importance. How many routers should be placed in one OSPF area? We don't give any numerical number as an answer to this question. Depending on the number of routers, links, prefixes, and the topology of the network also depends on the hardware capabilities and the performance of the routers, the number change from Network to network. In some networks, you can place only a couple of hundreds, and in some networks, you can place thousands of Routers in a single OSPF Area. What command would you use to only see the OSPF routes in the routing table? On Cisco devices, sh ip route ospf is used to see only the OSPF routes in the routing table. What will an OSPF router prefer to use first as a router-id? The first preference for an OSPF router ID is an explicitly configured 32-bit address. This address is not included in the routing table and is not defined by the network command. If it is not configured manually, the highest loopback IP address is used. In which OSI model layer will you find the OSPF protocol? OSPF is an IP-based protocol. Not like IS-IS or BGP. IS-IS is Layer protocol and BGP runs on top of Layer 4, TCP protocol. OSPF is Layer 3, IP Based protocol based on OSI Layer. What is one reason to use the ip ospf priority command when the OSPF routing protocol is in use? In DR and BDR selection in OSPF, a priority command is used for the election process. A higher priority router is selected as a DR. If the purpose is not to allow one of the routers in the election process, then ip ospf priority command is used. With multiarea OSPF, which OSPF router type has all interfaces in the same area? In Multi-area OSPF, which is also commonly known as Hierarchical OSPF design, Internal routers have all interfaces in the same area. ABR Routers need to have more than one Area, and one of the OSPF Areas, has to be OSPF Area 0, OSPF Backbone Area. Why would you want to change the OSPF default reference bandwidth? By default, the reference bandwidth is 100 Mbps. However, if you have faster links in your network, such as gigabit Ethernet or higher speed, OSPF can't give these links a better cost than 1. So you should set the reference bandwidth to at least as high as the fastest link in your network. Overall you can manipulate the cost, so you can do better Traffic Engineering by using OSPF cost. What is the format of the router id on an OSPF-enabled router? OSPF router ID is a 32-bit number formatted like an IPv4 address and assigned in order to uniquely identify a router. What is a benefit of multiarea OSPF routing? Multi-Area OSPF routing is done for scalability purposes. When routers are in place in different OSPF Areas, the purpose is to be able to send only summary routes or default route into the OSPF Non-Bachone Areas. Multiarea OSPF Routing is known as Hierarchical OSPF Routing and it is done to grow a number of routers and the prefixes in the OSPF network. What function is performed by the OSPF designated router? OSPF Designated Router also provides scalability. When it is used, routers don't have a full-mesh adjacency with each other in OSPF networks. Thus it reduces the number of control plane exchanges and LSA advertisements. Reducing flooding in case of newly added networks or in case of failure allows scalability. If there is a p2p network, we should avoid having OSPF DR. Which command will provide information specific to ospfv3 routes in the routing table? show ipv6 route ospf command provides information specific to ospfv3 routes only. Which command is used to display the collection of OSPF link states? show ip ospf database provides all the entries in the OSPF Link state database. What is a characteristic of a single-area OSPF network? Single Area OSPF network is by default placing routers in a single OSPF Area. It can be OSPF Backbone Area, which is OSPF Area 0. It is the most common deployment model. Or, if all the routers are placed in an OSPF Non-backbone area, which is any number other than Area 0, it is also called Single Area OSPF Routing design. Single-Area OSPF is known as a Flat OSPF network as well. What does an OSPF area contain? The OSPF area contains OSPF internal routers. Their connections, which mean links, and through these links, OSPF neighborship allows OSPF Routers to exchange IP prefixes. In a given OSPF Area, every router has the same Link state database. What command will display all connected ospfv2 routers? With show ip ospf neighbor command you can view the connected OSPFv2 routes. How to configure OSPF on the Cisco router? To enable OSPF on a Cisco router and advertise interfaces, the following tasks are required: Use the command router ospf process ID to start OSPF. Use the network command to enable the interfaces. Identify OSPF area assignments. (Optional) Assign the router ID. Which type of OSPF router will generate type 3 lsas? OSPF Type3 LSA is generated by the OSPF ABR to summarize OSPF Type 1 and OSPF Type2 LSA. Because between the OSPF Areas, Type 1 and Type 2 LSAs cannot be sent, Type 3 LSA is generated by the ABR to teach a given OSPF Area prefixes to another. What is the easiest and preferred method of manipulating OSPF route costs? OSPF uses cost to calculate the metric, based on the bandwidth of the link. Higher bandwidth means lower cost, and it is preferred over higher cost. So increasing bandwidth is one way to influence/manipulate the path in OSPF. What does the Cisco IOS use to calculate the OSPF cost to a destination network? Cisco and many other vendor Routers use Bandwidth to calculate OSPF cost to a destination network. Although cost can be manipulated manually and manual cost can be assigned based on other criteria such as delay/latency, fiber route mile, monetary cost, and so on, many networks in real-life OSPF design, keep the default cost parameter, which is bandwidth. In OSPF, hellos are sent to what IP address? OSPF neighbors are dynamically discovered by sending Hello packets out to each OSPF-enabled interface on a router. Hello packets are sent to the multicast IP address of 224.0.0.5. Which command can be used to verify the contents of the lsdb in an OSPF area? show ip ospf database is used to verify all the contents of the OSPF link-state database. We have two different databases in OSPF. One of them is LSDB, a link-state database and another is TED, a Traffic Engineering Database. Which type of OSPF LSA is generated by an ASBR and includes external routes? Type5 LSA is generated in OSPF by the ASBR and sent into the network. Single-Area OSPF and Multi-Area OSPF networks Type5 LSA is sent everywhere. Except, if the Area is Stub, Totally Stub, NSSA, or Totally NSSA, then Type 5 LSAs are not allowed into those OSPF Area Types. What are two reasons for creating an OSPF network with multiple areas? The main reason we create Multiple Areas in OSPF is Scalability. Scalability means allowing for growth. So, the number of Routers, links, and prefixes, in time, can grow and our network design shouldn't stop growing. When Multi-area OSPF is designed, into the Non-backbone areas topology information is not sent, thus it provides more stability in those areas. Also, convergence time gets faster and troubleshooting becomes easier in Multi-area network design. What default length is used for the OSPF dead interval? The default values are 10 seconds for the hello time, and 40 seconds for the dead time. The usual rule of thumb with OSPF is to keep the dead time value four times the hello interval. If OSPF fast convergence is the requirement, then these values can be reduced to provide fast failure detection. BFD is another method for fast failure detection. What are the enhancements that ospfv3 supports over ospfv2? In OSPFv3, similar to IS-IS protocol, reachability information and topology information are separated. So. when we add a new loopback interface (not topology change), in OSPFv2, it triggers full-SPF calculation, which is a resource-intensive task. Also, OSPFv3 supports both IPv6 and IPv4, but OSPFv2 only supports IPv4.

Published - Mon, 04 Apr 2022