Link State Routing Protocol
- Maintains Neighbor table, topology table, Routing table.
- The difference when compared to EIGRP in regards to these tables is that Topology table where EIGRP will have the list of just a list of what the neighbors passed on, thats why it is alway referred as Routing by rumor(Distance vector routing protocol).
- EIGRP topology table doesn’t have the roadmap of the network whereas OSPF does.
Dijkstra’s SPF algorithm
- SPF algorithm runs on the Link state database
- Finds the best path to the destination and generates the routing table.
- Processor intensive than DUAL algorithm.
- Why? when SPF alogrithm run too often, updates become too numerous because the network has grown too large. So by splitting into multiple areas we make the topology database smaller for routers within that area. So that SPF algorithm can be run less often, the reason being summarization can be done at the borders(ABR and ASBR).
- Area 0 – Backbone Area /** All areas must connect to area 0**/
- All routers within an area will have same database and roadmap.
- ABR – Area Border Router – Router connecting two area in which one interface connects to backbone area and another interface connects to non-backbone area within an autonomous system.
- ASBR – Router connects two networks that part of different autonomous system.
- Summarization can be done only on ABR and ASBR.(Area boundaries). Summarization will generate LSA’s.
R1 ——- R2
- Once the OSPF process is started, router will determine its own Router-ID.(Router-id will be the highest active IP address, Preference – Loopback interface > Interface address.
- Adds interfaces to the link state database (dictated by the network command)
- Sends Hello message on chosen interfaces – “DOWN” state
- Router-ID, Hello & Dead timers , Network mask, Area-id, Neighbors, Router Priority, DR/BDR IP address, Authentication Password, Stub flag (options field).
- Bold are mandatory parameters that should be matched between the neighbors to form a successful neighborship.
- Receive Hello (Check Hello/Dead Interval, Net-mask, Area-id, Authentication passwords) – “INIT” State
- Send Reply Hello – After the verification is successful, enters into “2WAy” state. R1 and R2 both look at each other’s hello packets and checks if am I listed as neighbor in your hello packet ?(If yes, Reset the DEAD timer; If No, Add as a new neighbor). Continue in case only if the neighbor is new…….
- MASTER – SLAVE relationship – Exstart (Exchange start) State, exchanges the link state database between the neighbors. Master-slave determination determines who sends the information first.
- Determined by Priority, Router-id break tie (higher router-id)Master send DBD packetSlave sends its DBD packet.
- DBD’s are acknowledged and reviewed – “Loading” state (loading into the memory).
- If any information is missing in the DBD’s that were exchanged, Master/Slave requests the information , sends LSR.
- Master/Slave sends the update (LSU).
- The information will be exchanged until the LSDB is synchronized between the neighbors. At this point, neighbors have same database and enters into “FULL” state.
SPF algorithm will be run on the top of the LSDB and forms the routing table which will have only the best paths to the destination vs LSDB contains all the possible paths to the destination.
OSPF metric is Cost, Cost = 100/BW-IN-Mbps.
DR and BDR (NBMA & Ethernet)
- OSPF DR/BDR uses multicast address 18.104.22.168 to send and receive/Listens on 22.214.171.124
- DR and BDR are elected for every shared segment.
- On point to point links, the only address used is 126.96.36.199
- In an ethernet/shared network world, it doesn’t matter which router will become DR/BDR, but it is important in the frame-relay network.
- DR Election doesn’t have the capability of “pre-empt”.
- Inside the hello packet (two fields Router Priority and router-id (neighbor))
- Router Priority – By default set to: “1”(Cisco); 128(Juniper)
- Highest router priority wins
- Higher router-id breaks tie.
- In a shared network, Non-DR/BDR routers will stay in “2Way state” as there is no need for these routers to synchronize the LSDB. That’s the basic idea behind electing DR/BDR.
Virtual-Links (Breaking Rules)
Area 0 is the main office in USA and Area 1 in UK of company A. Company A want to merge with company B. In this scenario, temporarily we need to merge Company A and B so lets say Company B is in Area 2. In order to provide connectivity to area 0 (main office) we need to create a virtual links. This solution is used during the transition period.
=>Virtual-link is like a tunnel interface. Virtual-link is a tunnel that looks like it is directly connected to the device in area 0. We can accomplish the same by configuring the tunnel interface.
LSA Types (Advertise routes,
- LSA Type 1 : Router LSA (Advertise routes)
- LSA Type 2 : Network LSA (Generated where DR has been elected)
- LSA Type 3 : Summary LSA (Provide summary info about Type 1 and Type 2 LSA’s for other areas).
- LSA Type 4 : Summary LSA
- LSA Type 5 : External LSA (ASBR Summary)
- LSA Type 7 : NSSA (OSPF Not So Stubby Area (NSSA) (area x nssa) is like a Stub area in that it does not allow Type 5 LSA’s. However, the NSSA is allowed to have an ASBR originating External Routes as Type 7 LSA’s)
- Type 4 LSA’s (Summary ) are always generated by an ABR when an ASBR is present in an area it touches. OSPF routers in a different area than the ASBR’s area will look at the Type 5 and Type 4 LSA’s to calculate the path and metric to reach the external route. OSPF routers in the same area as the ASBR can look at just the Type 5 LSA to calculate the path. However, the Type 5 LSA by itself does not have enough information for OSPF routers outside the area*, hence the need for the Type 4 LSA.* The Type 5 LSA remains unmodified as it passes from area to area. One of the key pieces of information that remains unmodified is the “Advertising Router”. Routers outside of the ASBR’s area do not have the Type 1 LSA describing the ASBR (because its a different area). The Type 4 LSA has information about the ASBR that matches the “Advertising Router” information in the Type 5 LSA. Furthermore, the Type 4 LSA’s “Advertising Router” field changes to that of the ABR as it passes into a new area. All of this information helps the OSPF router in other areas calculate the metric and next hop to reach the external routes
- Stub Area – Blocks Type 5 LSA’s from entering.(Default route will be generated by ABR as type-3 LSA and will be installed in the stub router and next-hop as ABR)
- Totally stubby (Cisco Proprietary) : Blocks Type 3, 4, 5 LSA from entering(Default route will be generated by ABR as Type3 LSA and will be installed in the totally stub router).
- Not-So-Stubby-Area Passes external routes through Type 7 LSA, these convert back to Type 5 once they reach the Backbone by ABR.
- Redistribution is a bad idea,
- Why do we redistribute?
- Politics, Merging companies, Vendors, Application/Business Requirements (Credit card companies).
- Don’t do two way FULL redistribution. (Use Static or default for one way and one way do FULL table).
- Looping issues with Two way full redistribution. (Filtering is one solution).
- Passive Interfaces
- Administrative distance modification (External routes)
- Distribute-list/ Prefix-list
- Route Maps / Route Tagging
- Seed Metric
- By default Redistribute into RIP and EIGRP will have metric of Infinity; into OSPF will have 20, into BGP will keeps the what ever the other protocol have.
- Subnets Keyword : By default, when you redistribute into OSPF, it will summarize. Subnet command will redistribute the individual subnets.
- Route Tag : Tagging routes will give flexibility to use it for later purposes like filtering.
- Under the route-map, When you match tag like match tag 10 20 30 (This is an OR operation) where as match 10, match 20, match 30 (This is an AND operation).( Specific to Cisco IOS)
- Administrative Distance is local to the router and it is not advertised.
OSPF Over NBMA
Additional Adjacency State
ATTEMPT This state is only valid for manually configured neighbors in an NBMAenvironment. In Attempt state, the router sends unicast hello packets every poll interval to the neighbor, from which hellos have not been received within the dead interval
Broadcast, Multi-access Networks
- Eg: Ethernet, Token Ring
- Single mode of operation
- DR/BDR election, 10 sec Hello’s, DUAL multicast Address
- Eg: T1, ISDN BRI/PRI
- single mode of operation
- No DR/BDR, 10 sec Hello’s, Single Multicast Address. (188.8.131.52)
Non-Broadcast Multi-access Network (NBMA)
- Eg: Frame-relay, ATM, MPLS, X.25 (WAN technologies)
- Five modes of operation
Five modes of operation
- NBMA- RFC Standard
- NBMA networks by default deny broadcast and multicast.
- Broadcast keyword in the frame-relay map doesn’t allow broadcast, it creates “pseudo broadcasting” (its a directed broadcast).
- Neighbor statically configured and must be on subnet.
- Acts like a LAN environment.
- DR/BDR elected.(Must have full connectivity)
2. Point-to-Multipoint – RFC Standard
- Treat the cloud like a series of point to point networks
- Fixes issues with NBMA networks, requires single subnet.
- No DR/BDR elected
- Neighbors automatically formed.
- Partial Mesh (No full connectivity, spokes cannot ping each other)
- Full Mesh (full connectivity)
3.Point-to-Point – Cisco Proprietary
- Uses separate sub-interfaces and requires different subnets.
- Consumes lots of public ip address.
4.Broadcast – Cisco Proprietary
- Works like broadcast in ethernet world.
5.Point-to-multipoint, Non-Broadcast – Cisco Proprietary
- Works like Point to Multipoint except for neighbors do not form automatically, need static configuration