2. Routing Protocols
IGP
Interior Gateway
Protocol
RIP (Routing Information
Protocol)
RIP (Routing Information
Protocol)
EIGRP (Enhanced Interior
Gateway Routing Protocol)
OSPF (Open Short Path
First Protocol)
ISIS (Intermediate System –
Intermediate System)
EGP
Exterior Gateway
Protocol
BGP
iBGP(interior
Border Gateway
Protocol)
eBGP(exterior
Border Gateway
Protocol)
3.
4. Overview
●OSPF - Open Shortest Path First is one of the most important and most used protocol in the world of networking either at LAN side
or WAN.
●OSPF is a - Links State Protocol
●Enterprise level users use this protocol for efficient communication of devices over best possible paths.
●ISP’s use this protocol as IGP (Interior Gateway Protocol) for BGP to work from one end to another end.
Hello and Dead Interval : Hello- 10sec, Dead Interval – 40sec
OSPF uses Hello packets in every 10 Sec and if a Router miss 4 consecutive hello’s then it will consider the neighbor to
be dead and will try to change the path.
●Metric is Cost of a link. Cost is inversly prototional to Bandwidth.
●Update is sent only when there is a Change in network, default whole RT is sent every 30 mins even though no change occurs in
the network.
We don’t have any loop avoidance Mechanism in OSPF because
we have Topology Table
1. Topology Table - #show ip ospf database
2. Neighbor Table - #show ip ospf neighbor
3. Routing Table - #show ip route
Tables In OSPF
5. Overview
● N number routers can be used, so to control the number of updates we need areas to group routers.
● Areas are used to group the routers into multiple areas to save routing table size
● Area 0 is always a Backbone area
● All area should have direct connectivity with the backbone area
● AD (Administrative Distance) = 110 – These are default Values
● Uses Multicast Address 224.0.0.5 – OSPF Hello packet’s destination.
Area 2
Area 0
Area 1
6. Key Topic : Loopback Interface
Loopback interface is a logical interface, which we can create in a router or a switch.
The loopback interface s are always in UP state.
We no need to have any physical cable to make this interface up.
Why ?
Physical interface can go to down state if cable is not connected.
Configure :
#interface loopback <0 – 65535>
#ip address 1.1.1.1 255.255.255.255
#exit
7. RID - Router ID
It’s a Name for a router to identify itself.
It is 32 Bit Character value and looks like IP address
Router ID Election process:
1. Manually configuration (Router1(router-config)#router-id x.x.x.)
2. Highest Loopback IP - ** When router boots it sees loopback first.
3. Highest Routers interface IP
Its just a name nothing else, this name is in the format of IP address.
Note : We cannot ping the Router ID.
8. DR (Designated Router) and BDR (Backup Designated Router)
OSPF has a default feature of sending the updates received from any router to all the other devices without any
restriction which will increase unwanted bandwidth. Designated Routers(Like a class monitor) is used to receive
any topology change within a network segment and share the information to others.
BDR is backup.
DR Election :
1. Highest interface priority
2. Highest Router ID
Note : DR communication uses 224.0.0.6 by other routers.
Note: For every Broadcast Network There will be one DR and BDR
Router(config-if)#ip ospf priority 125
Default is 1
0 Mean not participate
in DR election.
9. Hello Packet
OSPF will form neighborship only when following parameters are identical
Router ID - Unique
Area Type – Normal,Stub, Totally Stub, NSSA, Totally NSSA - Same
Area ID - Same
Subnet Mask - Same
Hello and Dead Interval (Hello – 10sec, Dead-40sec) – Same
Network Type – Need to be same
10. States Of OSPF
OSPF go through multiple state before forming a neighborship.
Almost like investigating about someone before making them as friends (for ospf its
“neighborship”)
1. Down - No hello’s have been heard from the neighbors
2. Init - Hello’s have been heard from the neighbor
3. Two-way - The routers sees its own RID in neighbors hello.
4. Attempt(only for NBMA) - As multicast is not allowed to discover the neighbor.
5. Extart - Router preparing to start to share LSA(Link State
Advertisement). Master/Slave election happens to elect who will start first.
6. Exchange- Routers are exchanging DBD(Database Descriptor) packets,
DBD contains routers
Topology database.
7. Loading - Finally Exchanging LSA’s
8. Full - Routers are fully synchronized.
Full/DR - Neighbor is DR
Full/BDR - Neigbhor is a BDR
Full/DROther- Neighbor is no DR
R1 Hello :
This Hello is for RID: 2.2.2.2
R2 Hello :
This Hello is for RID: 1.1.1.1
11.
12. Full State
There are three types of full state depending on the role of the router in the network
Full/DR - Neighbor is DR
Full/BDR - Neighbor is BDR
Full/DROther - Neighbor is neither DR or BDR
Sample :
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:30 12.0.0.2 FastEthernet0/0
4.4.4.4 1 FULL/DR 00:00:30 14.0.0.4 FastEthernet0/1
13. OSPF Network Types
OSPF functionality differs from network types.
Broadcast Multiaccess
DR and BDR election happens
Packets To DR and BDR uses 224.0.0.6.
Packets from DR and BDR uses 224.0.0.5
No need of manual neighbor configuration.
Hello 10, Dead 40
Router(config-if)#ip ospf network ?
Point-to-Point
No DR and BDR election happens
OSPF Packets uses 224.0.0.5
No need of manual neighbor configuration.
Hello 10, Dead 40
Router(config-if)#ip ospf network ?
14. OSPF Network Types
OSPF functionality differs from network types.
Point to Multipoint
No DR and BDR election happens
OSPF Packets uses 224.0.0.5
No need of manual neighbor configuration.
Hello 30, Dead 120
Router(config-if)#ip ospf network ?
Non Broadcast Multiaccess
DR and BDR election happens
Need of manual neighbor configuration.
Router ospf 10
Neighbor 12.0.0.0.2
Hello 30, Dead 120
Router(config-if)#ip ospf
network ?
Multicast
Hellos are
not
allowed
15. R1#show ip ospf interface fa0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 12.0.0.1/24, Area 0
Process ID 10, Router ID 11.11.11.11, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 23.0.0.2, Interface address 12.0.0.2
Backup Designated router (ID) 11.11.11.11, Interface address 12.0.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:06
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 23.0.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)
16. OSPF Topology
● OSPF learnt routes either be a Intra Area route or Inter-Area route.
● All the router within an area share common topology database within the area only, conversing better
CPU utilization.
Area Border Router (ABR) :
Area 0 is always a backbone area. The router belonging to multiple area is called ( ABR )Area
Border Router. A router which connects Area0 and Area X
Internal Routers :
Routers part of single area
(ASBR) Autonomous System Boundary Router
Routers that conect OSPF to different protocol
18. External Route types
We can receive External routes from Other protocols after redistribution
There are two type of External Routes.
External routes means a route learnt by other protocol or from other OSPF domain
External Route - Type 1 - E1 - Contains cost to reach ASBR and ASBR cost to reach
destination.
External Route Type 2 - E2 - Contains only cost of ASBR to reach the destination.
19. LSA Types – Link State Advertisements
There are 11 types of LSA’s in OSPF.
Type 1 : Router LSA : List of all routes local to the routers.
Generated by all routers one per link
Scope within Area
Type 2 :Network LSA: List of links in the Area
Generated by all DRs
Scope within Area
Consist of all links attached to the DR
20. LSA Types cont.
Type 3 : Network Summary LSA : Contains list of all destination network for an area
Generated by ABR
Scope is between two areas
This is exchanged between area to have inter area communication
Type 4 : ASBR LSA : Contains route to any ASBRs
Generated by ABR
Sent by ABR to its local Area alone so that internal router understand how to
exit the Autonomous System
Type 5: External LSA : Contains the routes to the destination outside the local AS
Generated by ASBRs
Can also take a default route to all network outside AS
Flooded to all areas within AS
Type 7: NSSA LSA (Not So Stubby Area):
This is a type 7 LSA that is generated by an NSSA ASBR. Type 5 LSAs are not allowed in NSSA areas, so the NSSA
ASBR generates a type 7 LSA instead, which remains within the NSSA. This type 7 LSA gets translated back into a
type 5 by the NSSA ABR