The Open Shortest Path First (OSPF) network routing protocol has been around a long time in IP networking terms. While version 2 was released in 1998, it is still the preferred routing protocol especially for border gateways. Terminology note – originally (in the 1960s) computers that acted as routers came under the term “gateways.” As time wore on and routers became more specialized, use of the term “router” was used for gateways specialized in packet routing. In modern times, the old gateway term still shows up especially when referring to border gateways as we’ll see. In this issue, Tech Savvy starts to look into the OSPF protocol. This is a two-column series. This time we’ll set the scene to explore how network paths are determined and routing tables are created to be seen in Part Two.
Routing Terms and Underlying Protocols
There is some routing language to get used to before we dig in to OSPF. Here are a few of the most often used terms:
• Autonomous System (AS) – an autonomous system is a “stand alone network.” More officially: within the Internet, an AS is a collection of connected Internet Protocol (IP) routing prefixes under the control of and on behalf of a single administrative entity that presents a common, clearly defined routing policy to the Internet.
• Border Gateway Protocol (BGP) and Internal Gateway Protocol (IGP) essentially say that they use OSPF to make connections to other networks.
• Default Gateway – as noted above, originally routers came under the generic term of gateways before the router term came into general use. As routers proliferated, they received the distinction from gateways as routers. However, routers must still specify what is known as a “default gateway.” When a router receives a data packet identifying a network ID that is not in their routing table, the unknown network ID packet gets sent to its default gateway – as in “Hey pal see if you can figure this one out.” If that default gateway doesn’t recognize the network ID, it gets forwarded to its default gateway and so on. To save the day and not let a packet with a bogus network ID run around the network forever, there’s a Time to Live counter embedded in the IP header. Each time a default gateway gets a bogus packet it decrements the Time to Live count by one. The last default gateway simply throws the packet away when this count reaches zero.
The Bottom Line
OSPF is a routing protocol for Internet Protocol (IP) networks. It uses a Link State Routing (LSR) algorithm and, as stated earlier, it falls into the group of interior routing protocols, operating within a single AS. In terms of border gateways, it also can interface between ASs.
The Main Idea (costs vs. hops)
The Link State, or sizing up your connections to the network, is based on assessing a cost to use rather than how many router hops it needs as in Routing Information Protocol (RIP). The cost metric is based upon the link’s network bandwidth. The higher the available bandwidth, the lower the cost to use that link.
How OSPF Routers Communicate
As shown below, an IP address includes the network ID and the node ID. There are three main types of addressing. A unicast address is intended for a particular network node. If you’re on a network, you see your unicast address by running the ipconfig command. In a Microsoft based operating system hit the “windows” key (usually to the left of the spacebar) and the letter “R” to open a run command window. Type CMD in the open box to open a command line screen. Here, type in ipconfig and you’ll learn your IP address, see your subnet mask and your default gateway.
The second type of IP addressing is called a broadcast address. All the bits in a broadcast address are set to 1 resulting in 255.255.255.255 as the IP broadcast address. Each network node looks for packets with their unicast address or a broadcast address intended to be read by all.
Finally, a multicast address is intended for a specific number of nodes. In our OSPF examination we’ll find that OSPF routers use 220.127.116.11. Therefore, if you’re programmed to also listen to a particular multicast address you’ll also read 18.104.22.168 addressed packets. This is how OSPF routers share their routing tables and network maps. The routers will use this multicast address only for updates to the routing information as they come up. This helps keep extraneous network traffic to a minimum.
The IPv4 Class System
The last item for Part One of this column series is to review how the routers recognize which portion of the IP address is the network ID.
Internet Protocol version 4 (IPv4) addresses have three main classes and are four bytes in length, with each byte written in decimal notation and separated by a period. The table above defines the main classes. Their class reveals the number of bytes in the network ID and, therefore, how many addresses are available for nodes to use for unicast addresses. A Class A address, for instance, uses just the first byte for the network ID. Routers and other interested parties will know to use the value of the first byte to determine the network ID. A value between 1 and 126 indicates a Class A address and just the value of the first byte is the network ID. An example: 22.214.171.124. (The node locations are set to zero to give the network its numerical name.)
Class B addresses are determined by the value of 128 through 191 for the first byte (e.g. 126.96.36.199). If the first byte has a value within this range, the router will know that the first two bytes are to be used to identify the network.
Finally – you guessed it – Class C networks use the leading three bytes to identify the network. If the value of the first byte falls between 192 and 223, the router will know it’s a Class C address (e.g. 188.8.131.52). The table above summarizes the IPv4 class system. Note that in the address range column, an X represents a node identifying number, which can range from one to 254 (as 255 falls into the broadcast address).
Part One of this series sets the scene to dive into how OSPF routers function to draw a map of the AS it’s operating within. This is where Part Two will pick up the story.
© 2018, TechNation Magazine. Site designed by MD Publishing, Inc.