Networking

Open Shortest Path First (OSPF) Configuration Basics

Open Shortest Path First (OSPF) is widely deployed in networks throughout the world, and its successor OSPFv3 is taking over the same segment with IPv6. Given that, OSPF will be around for some time. The concepts behind both versions of OSPF are very similar. Because of this, only OSPFv2 (IPv4) will be used for examples in this article, in which I’ll go over the basics of OSPF configuration.

OSPF Basics

There are a couple of things that need to be known by every entry level network engineer about OSPF, as it is implemented on Cisco equipment, these include:

  • OSPF (both v2 and v3) has an administrative distance of 110. (This is trusted more than RIP but less than EIGRP).
  • OSPF can be configured into different administrative areas that are used to maintain routing efficiency.
  • A central area 0 (Backbone) must exist in the center of the OSPF network with every other area having a direct connection to this area (either physically or logically [virtual link]).
  • OSPF is a classless protocol and fully supports Virtual Length Subnet Masking [VLSM – with IPv4]).
  • OSPF is standards based (IPv4 – RFC 2328, 5709; IPv6 – RFC5340, 6845, 6860).
  • OSPF advertises routing information via Link State Advertisements (LSA).

For Neighborships

  • OSPF Hello and Dead intervals must match.
  • OSPF Router-ID (RID) must be unique.
  • OSPF Areas must match.
  • OSPF Authentication parameters must match.

For IPv4 Neighborships

Sponsored Content

Maximize Value from Microsoft Defender

In this ebook, you’ll learn why Red Canary’s platform and expertise bring you the highest possible value from your Microsoft Defender for Endpoint investment, deployment, or migration.

  • OSPF neighbors must be in the same IPv4 subnet

For IPv6 Neighborships

  • OSPF Neighbors DON’T have to be in the same IPv6 prefix range (OSPFv3 uses the link local addresses to communicate).

Configuring OSPFv2 (IPv4)

The typical configuration of OSPF on a Cisco device is rather simple, assuming that the IPv4 addressing has been configured correctly (connecting interface subnet’s match). For the purposes of this example, the topology shown in Figure 1 will be used.

 

ospf

To be thorough for this section, both the IP address configuration and the OSPF configuration steps will be shown. The configuration of R2 is assumed complete for the purposes of this section with a single area of 0 being used.

The first step involves the configuration of the IPv4 addresses on the appropriate interfaces; these are shown below in Table 1.

1 Enter global configuration mode R1#configure terminal
2 Enter interface configuration more for the FastEthernet0/0 interface R1(config)#interface fastetherent0/0
3 Configure the IPv4 Address as specified in Figure 1 R1(config-if)#ip address 20.20.20.1 255.255.255.0
4 Enable the interface R1(config-if)#no shutdown
5 Enter interface configuration more for the FastEthernet0/1 interface R1(config)#interface fastetherent0/1
6 Configure the IPv4 Address as specified in Figure 1 R1(config-if)#ip address 10.10.10.1 255.255.255.0
7 Enable the interface R1(config-if)#no shutdown

 

The second step involves the configuration of the OSPF process on the router and the configuration of the interfaces that will be included in the OSPF process. With OSPFv2 this is typically done by specifying a specific range of IP network addresses using a wildcard mask.

8 Enter OSPF router configuration modeNote: For this example a process-id of ‘10’ is used R1(config-if)#router ospf 10
9 Configure a network range that will specify the interfaces to be included within the OSPF process.Note: This matches all interfaces that would have an IP address assigned between 10.10.10.0 and 10.10.10.255. R1(config-router)#network 10.10.10.0 0.0.0.255 area 0
10 Configure a network range that will specify the interfaces to be included within the OSPF processNote: This matches all interfaces that would have an IP Address assigned between 20.20.20.0 and 20.20.20.255 R1(config-router)#network 20.20.20.0 0.0.0.255 area 0

 

This completes the configuration that would be required on R1 to have the neighborship between R1 and R2 established. Often the biggest hurdle for those new to networking (and Cisco networking specifically) is the logic behind a wildcard netmask. A wildcard netmask basically works in the opposite way that a common subnet mask does. A common subnet mask is used to mask the network and subnetwork bits from the host bits, e.g. 10.10.10.0 255.255.255.0. The first 24 bits are masked off for network and subnetwork bits while the eight remaining are used for host address space. In this case, the network and subnetwork bits do not change for any of the hosts within the same network (broadcast domain). A wildcard mask is used to mask the part of the address that is permitted to change (basically the opposite of what was just described) – e.g., 10.10.10.0 0.0.0.255 will match all addresses that start with 10.10.10 and the fourth octet (the last eight bits) can be any value.

It is very common for many people getting into Cisco networking (especially those new to networking) to wonder why engineers don’t just implement Cisco’s Enhanced Interior Gateway Routing Protocol (EIGRP), as it can be considerably easier to configure. The basic answer to this is that EIGRP is Cisco proprietary, and it is not supported across vendors. This isn’t a problem if the company is small enough or has committed to a complete Cisco solution, but if the company is very large and is not Cisco-centric, a standard basic solution like OSPF works across various vendors products.

Related Topics:

External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by:

 
Office 365 Coexistence for Mergers & Acquisitions: Don’t Panic! Make it SimpleLive Webinar on Tuesday, November 16, 2021 @ 1 pm ET

In this session, Microsoft MVPs Steve Goodman and Mike Weaver, and tenant migration expert Rich Dean, will cover the four most common steps toward Office 365 coexistence and explain the simplest route to project success.

  • Directory Sync/GAL Sync – How to prepare for access and awareness
  • Calendar Sharing – How to retrieve a user’s shared calendar, or a room’s free time
  • Email Routing – How to guarantee email is routed to the active mailbox before and after migration
  • Domain Sharing – How to accommodate both original and new SMTP domains at every stage

Aimed at IT Admins, Infrastructure Engineers and Project Managers, this session outlines both technical and project management considerations – giving you a great head start when faced with a tenant migration.the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

Sponsored by: