Open Shortest Path First
By: aliffirdaus • Essay • 3,652 Words • May 7, 2011 • 1,209 Views
Open Shortest Path First
OSPF Tutorial
OSPF Definition:
Open Shortest Path First (OSPF), is a routing protocol used to determine the correct route for packets within IP networks. It was designed by the Internet Engineering Task Force to serve as an Interior Gateway Protocol replacing RIP.
Advantages of OSPF:
1. Changes in an OSPF network are propagated quickly.
2. OSPF is heirarchical, using area 0 as the top as the heirarchy.
3. OSPF is a Link State Algorithm.
4. OSPF supports Variable Length Subnet Masks (VLSM).
5. OSPF uses multicasting within areas.
6. After initialization, OSPF only sends updates on routing table sections which have changed, it does not send the entire routing table.
7. Using areas, OSPF networks can be logically segmented to decrease the size of routing tables. Table size can be further reduced by using route summarization.
8. OSPF is an open standard, not related to any particular vendor.
Disadvantages of OSPF:
1. OSPF is very processor intensive.
2. OSPF maintains multiple copies of routing information, increasing the amount of memory needed.
3. Using areas, OSPF can be logically segmented (this can be a good thing and a bad thing).
4. OSPF is not as easy to learn as some other protocols.
5. In the case where an entire network is running OSPF, and one link within it is "bouncing" every few seconds, OSPF updates would dominate the network by informing every other router every time the link changed state (I've done this).
OSPF routers check the status of other routers on the network by sending a small hello packet at regular intervals. If a router does not respond to the hello packet, it is assumed dead, and routing updates are sent to every other router by using a multicast address.
In the case where there are no network changes, OSPF will use very little bandwidth (only sending hello packets). As soon as there is an outage, however, OSPF will flood the network as the change is sent to every router (and then every router notifies every other router about the change). This system of near silence when possible and flooding when necessary ensures that routing information gets propagated throughout the network as quickly as possible.
It's now time to...
Build an OSPF network, version 1.0
Scenario: Camp Swampy is running out of IP addresses. They have a fully meshed base backbone consisting of five seperate routers, here known as A through E:
Camp Swampy's Base Network Topology
Camp Swampy has been given the Class B network 181.160.0.0. The network uses IGRP as their routing protocol, and they are using an 8 bit subnet mask (255.255.255.0).
Since IGRP does not support VLSM's, Camp Swampy is forced to use an 8 bit mask throughout their entire network. For networks that contain users, this should be acceptable, but for network connections, such as the network that connects A and B, this is a huge waste of IP addresses. We will rebuild their base network using OSPF for one reason only: To free up IP addresses by using Variable Length Subnet Masks.
This means we are going to have to get into binary, just a little...
Pick a class C equivalent network (in other words, pick a number out of the range available in their third octet), and use it for network connections within their base backbone. In this case, lets use 181.160.254.0. We could use a 14 bit subnet mask, 255.255.255.252 (which would only leave two bits for the host part) to get the maximum number of networks out of the 254 subnet, but that only allows two hosts per network. Since the Camp Swampy admin regularly put sniffers and other devices on their network connections, we need to scale the subnet mask back a bit to 13, 255.255.255.248 (leaves three bits for hosts, a total of 6 possible devices on each net).
You can't use the first or last network to connect to hosts, since the first net is always the network address for the ENTIRE network (for instance, you don't see many IP addresses like 181.160.0.1), and the broadcast address for the last subnetted network is also the broadcast address for the ENTIRE network (you don't see many