Ospf Flashcards
OSPF Characteristics
• OSPF is a Link State routing protocol
• It supports large networks
• It has very fast convergence time
• Messages are sent using multicast
• OSPF is an open standard protocol
• It uses Dijkstra’s Shortest Path First algorithm to determine the best path to learned networks
OSPF vs EIGRP VS RIP
• RIP has scalability limitations so it is not typically used in production networks
@ It is suitable for small networks or lab/test environments
• The choice for most companies for their IGP comes dowi?to EIGRP or
OSPF
OSPF is the most commonly used
• It supports large networks and has always been an open standard. It is supported on all vendors equipment
• EIGRP can be simpler to implement and troubleshoot
• It was historically a Cisco proprietary protocol
e It is now an open standard but there is still limited support on other
vendor’s equipment
Link State Routing Protocols
• In Link State routing protocols, each router describes itself and its interfaces to its directly connected neighbours
• This information is passed unchanged from one router to another
• Every router learns the full picture of the network incluang every router, its interfaces and what they connect to
• OSPF routers use LSA Link State Advertisements to pass on routing updates
OSPF Operations
- Discover neighbours
- Form adjacencies
- Flood Link State Database (LSDB)
- Compute Shortest Path
- Install best routes in routing table
- Respond to network changes
OSPF Packet Types
• Hello: A router will send out and listen for Hello packets when OSPF is enabled on an interface, and form adjacencies with other OSPF routers on the link
• DBD DataBase Description: Adjacent routers will tell each other the networks they know about with the DBD packet
• LSR Link State Request: If a router is missing information about any of the networks in the received DBD, it will send the neighbour an LSR
• LSA Link State Advertisement: A routing update
• LSU Link State Update: Contains a list of LSA’s which should be updated, used during flooding
• LSAck: Receiving routers acknowledge LSAs
OSPF Configuration - Process ID
R1 (config) #router ospf 1
@ Different interfaces on a router can run in different instances of OSPF.
• Different instances have different Link State Databases
• Only one instance is typically configured on OSPF routers - multiple
Process IDs are very rarely used
• The Process ID is locally significant. It does not have to match on the neighbour router to form an adjacency
OSPF Configuration - network
• The network command uses a wildcard mask which is the inverse of a subnet mask.
• Subtract each octet in the subnet mask from 255 to calculate the wildcard
mask
• A subnet mask of 255.255.0.0 equals a wildcara mask of 0.0.255.255
• A subnet mask of 255.255.255.252 equals a wildcard mask of 0.0.0.3
• The command does not default to using the classful boundary
• You must enter a wildcard mask
OSPF Configuration - network
R1 (config-router) # network 10.0.0.0 0.0.255.255 area 0
• The network command means:
• Look for interfaces with an IP address which falls within this range.
• Enable OSPF on those interfaces - send out and listen for
OSPF hello messages, and peer with adjacent OSPF routers.
• Advertise the network and mask which is configured on those interfaces.
OSPF Verification
sh run | section ospf
-router ospf 1
-network 10.0.0.0 0.255.255.255 area 0
OSPF Operations
- Discover neighbours
- Form adjacencies
- Flood Link State Database (LSDB)
- Compute Shortest Path
- Install best routes in routing table
- Respond to network changes
OSPF Router ID
OSPF routers identify themselves using an OSPF Router ID which is in the form of an IP address.
• This will default to being the highest IP address of any loopback interfaces configured on the router, or the highest other IP address if a loopback does not exist.
• Loopback interfaces never go down so the Router ID will not change.
• You can also manually specify the Router ID.
• Best practice is to use a Loopback or manually set the Router ID.
Passive Interface Configuration
R1 (config) #router ospf 1
R1 (config-router) #passive-interface loopback 0
R1 (config-router) #passive-interface f2/0
RI (config) #router ospf 1
R1 (config-router) #passive-interface default
R1 (config-router) #no passive-interface f0/0
R1 (config-router) #no passive-interface f1/0
R1 (config-router) #no passive-interface f3/0
Default Route Injection using ospf
R4 (config) #ip route 0.0.0.0 0.0.0.0 203.0.113.2
R4 (config) #router ospf 1
R4 (config-router) #default-information originate
Default Route Injection Verification in ospf
Gateway of last resort is 10.0.0.2 to network 0.0.0.0
O*E20.0.0.0/0 [110/1] via 10.0.0.2, 00:00:01, FastEtherneto/0
OSPF Areas
• Every router learns the full picture of the network including every router, its interfaces and what they connect to @ This can cause issues in large networks:
• Too many routes can use up too much router memory
• Network changes cause all routers to reconverge which takes time and CPU resources
• OSPF supports a hierarchical design which segments large networks into smaller areas to solve this problem
• Each router maintains full information about its own area, but only summary information about other areas
A two level hierarchy is used:
• Transit area (backbone or area 0). Does not generally contain end users.
Regular areas (nonbackbone areas). Used to connect end users to the Transit area.
By default, all transit traffic goes through the Transit area.