i. A link state protocol
ii. Maintains 3 tables
a. Neighbor table
b. Topology table
c. Routing table
iii. uses SPF algorithm
iv. Send triggered updates when n/w changes
v. Refresh updates are send in every 30 min
Need of areas: Since OSPF is a big process, which demands a good CPU time, as the n/w grows, the process will be slower and takes time to find the best route and convergence time increases. Hence we separate the OSPF domain into areas
i. all areas MUST be connected to area 0
ii. update messages will be distributed locally
iii. All routers in one area will have same topology table.
i. determine router ID [highest interface IP < highest loop back IP < hardcoded router-id]
ii. add interface to the link state database [by network command]
iii. send hello
a. In broadcast/p2p network:: hello interval = 10 sec, dead interval = 40 sec.
b. In NBMA network:: hello interval = 30 sec, dead interval = 120 sec.
c. Hello packet contains:
| || |
i. receives hello from neighbor
i. Reply to hello messages
ii. DR-BDR election (if any)
i. master-slave election
a. decided by router priority < router ID
ii. Sends DBD
a. Master sends DBD first and slave listens
b. Slave sends DBD second and master listens
i. DBDs are acknowledged and receiving updates
a. Slave send LSR
b. Master sends LSU for the LSR
c. Master sends LSR
d. Salve sends LSU for the LSR
i. neighbors are synchronized
ii. SPF algorithm has to run to find out best path to each network reachable.
Cost = 100/ BW in Mbps
56K = 1785
T1 = 65
Ethernet = 10
Fast ethernet 1
After Dr-BDR election, DR sends updates to all routers in the broadcast domain. All routers should send n/w change updates to only DR-BDR.
i. OSPF uses multicast for updates
a. 184.108.40.206 for all routers in OSPF
b. 220.127.116.11 to DR-BDR in domain.
ii. in point to point link there will not be any DR/BDR
iii. A DROTHER router will make FULL state with only DR and BDR, other routers in the domain will be in 2-WAY state.
OSPF packet types
- Link state acknowledgement
i. LSU are send as reply to the LSR.
ii. One LSU may contain multiple LSA.
iii. LSAck will be send to each LSU received.
OSPF over NBMA [5 modes]
i. non-broadcast [NBMA] (RFC complained)
ii. point to multi point – RFC complained)
iii. Point to point – (CISCO)
iv. Broadcast – (CISCO)
v. Point to multi point-non broadcast – (CISCO)
a. neighbors statically configured
b. must be in single subnet
c. act like in LAN
d. DR-BDR election happens
ii. Point to multi-point
- must be in single subnet
- no DR-BDR
- neighbors auto detected
iii. Point to multi point-non broadcast
a. must be in single subnet
b. no DR-BDR
c. neighbors statically configured
iv. Point to point
a. separate subnet is possible
b. no DR-BDR
c. auto neighbor detection
i. Use the command: area
ii. In order to hide a route from outside world use the keyword not-advertise at the end.
i. router LSA
ii. network LSA [DR]
iii. summery LSA [ABR]
iv. ASBR summery [ ABR with ASBR IP]
v. External LSA [ ASBR]
vi. NSSA LSA - Type-7 [ASBR in not so stubby area]
Virtual link is used, where an area is not directly connected to area 0 and seeking a connection to area 0. This kind of situation comes when there is merger of networks demands a redesign of entire network, where virtual links are temporary fix.
An area, which does not originate or terminate packets. i.e a packet is moving from area 5 to area 4 through area 0 and 3, then both area 0 and 3 are transit areas.
The neighbor ABR of the transit area. i.e if router 18.104.22.168 is ABR for area 0 and 1 and router 22.214.171.124 is ABR for area 1 and 2. Area 2 is connecting to area 0 via area 1. Virtual link is created between 126.96.36.199 and 188.8.131.52. Hence the latter will be the neighbor id.
OSPF special area types
To make an area stub, give the following command in all routers. Because stub flag is also considered while an OSPF router add a new neighbor.
Totally stub area:
Configure the ABR with following command: area
stub no-summery and other routers inside the area with: area stub command.
Totally stubby area is Cisco proprietary. So ABR MUST be a Cisco router, but member routers can be any make.
i. Stubby area blocks type 5 LSA from entering the area.
ii. Totally stubby area blocks type 3, 4 and 5 LSA from entering the area.
Not so stubby area [Not so totally stubby area]
Basically it is a totally stubby area to which an external protocol cloud is attached. Say, RIP network. The router connected to RIP network becomes ASBR in OSPF domain. But as we know totally stubby area will block type-5 LSA, hence another LSA type, type-7 is introduced. [aka NSSA LSA]
ASBR in the NSSA will generate type-7 LSA and once it reaches it ABR, it converts it into type-5 LSA and sends out to other routers (routers outside area).
Redistributed routers [E1 and E2]
E2 is the default for redistributed routes/external routes.
In E1 routes, cost will be increasing as it pass through areas; where as in E2 cost will remain same through out OSPF admin area.
E2 is used where we have a single exit point/single ASBR.
E1 is used where we have multiple ASBR. If we know the cost for different path leads to different ASBR, it will be easy for a router to select best path to the outside networks through each of the ASBR.