6. OSPF (Open Shortest Path First) Part- II
Here we can see only one route, because R1 is in Area 2 and it is not directly connected with area 0.
Each area must be connected with area 0. Now we will create virtual link to connect area 2 with area 0.
Virtual link would be created on edge to edge router.
R2 (config) #router os 100
R2 (config-router) #area 1 virtual link 3.3.3.3
R3 (config) #router os 100
R3 (config-router) #area 1 virtual link 2.2.2.2
R1#sh ip route os
R1#ping 192.168.5.2 successful
R1#ping 172.30.1.1 successful
OSPF creates three tables
R1#sh ip os neighbor
R1#sh ip os database
R1#sh ip route os
Passive-Interface
R1 (config) #router os 100
R1 (config-router) #passive-interface default
This command will apply on each interface.
R1 (config-router) #no passive-interface s0/0
If we want to make only fa0/0 passive then we need to apply only on fa0/0
R1 (config) #router os 100
R1 (config-router) #passive-interface fa0/0
OSPF Authentication
R1 (config) #int s0/0
R1 (config-if) #ip ospf authentication message-digest
R1 (config-if) #ip ospf message-digest key 1 md-5 Mani
R1#sh ip ospf neighbor
After 40 sec neighborship will be down.
R1#debug ip ospf events
7. OSPF (Open Shortest Path First) Part- II
Mismatch authentication.
R1#un all
R2 (config) #int s0/0
R2 (config-if) #ip ospf authentication message-digest
R2 (config-if) #ip ospf message-digest key 1 md-5 Mani
Neighborship will be up.
Now we will check hello & hold timers
R1#sh ip ospf int s0/0
Hello – 10 sec Dead 40 sec
We will change the timer
R1 (config) #int s0/0
R1 (config-if) #ip ospf hello-interval 5
R1#sh ip os int s0/0
Hello 5 Dead 20
We can see if we change hello, Dead will be changed automatically.
R1#sh ip os ne
Neighborship will be break. In ospf hello and dead interval must match for the neighborship.
R1#clear ip os process
Yes
R1#debug ip os events
Mismatch hello parameter
R – Received
C – Configured
R2 (config) #int s0/0
R2 (config-if) #ip os hello-interval 5
Neighborship will be build-up
Now we will change Dead interval
8. OSPF (Open Shortest Path First) Part- II
R2 (config) #int s0/0
R2 (config-if) #ip os dead-interval 15
R2#sh ip int os s0/0
When we change dead, hello will not change automatically.
R2#debug ip os events
R2#un all
R1 (config) #int s0/0
R1 (config-if) #ip os dead-interval 15
Neighborship will be buildup
Now OSPF domain should be communicated with Eigrp 100.
For that we will perform redistribution.
R4 (config) #router os 100
R4 (config-router) #redistribute ei 100
R1#sh ip route os
E2 – 192.168.108.0
E2 – 192.168.7.0
By default it would advertise classfull network. If we want to advertise classless also then we need to
add a keyword “Subnets”.
R4 (config) #router os 100
R4 (config-router) #redistribute ei 100 subnets
R1#sh ip route os
Now we can see the classless network also. 172.50.0.0.
O – OSPF
E2 – External (Metric type 2)
Now we can see external routes metric is 20 on each route.
That is not true.
Default metric 20
Here internal cost should be added.
9. OSPF (Open Shortest Path First) Part- II
R4 (config) #router os 100
R4 (config-router) #redistribute ei 100 subnets metric-type 1
Metric type 1 means add internal cost also when you exchange routes.
R1#sh ip route
OE – 172.30.4.0 (110/212) previously it was 20.
Above we redistributed Eigrp in ospf
Now we will redistribute ospf in Eigrp
R4 (config) #router ei 100
R4 (config-router) #redistribute os 100 metric 1 1 1 1 1
R1#ping 172.30.1.1 successful
R1#sh ip route
Here we can see two types of route, External routes and Inter area routes.
There are two types of summarization
1. External Summarization (ASBR)
2. Inter Area Summarization (ABR)
ASBR router is router no 4 here.
R4 (config) #router os 100
R4 (config-router) #summary-address 172.80.0.0 255.255.248.0
R1#sh ip route
Here we can see only one route of 172.80.0.0/21
R1#ping 172.80.1.1
R1#ping 172.80.1.1
Successful
Now we will remove it.
R4 (config) #router os 100
R4 (config-router) #no summary-address 172.80.0.0 255.255.248.0
Now we will summarize inter area routes.
It will perform on ABR.
10. OSPF (Open Shortest Path First) Part- II
We will summarize the network 172.50.0.0 network. For that ABR is R5.
R5 (config) #router os 100
R5 (config-router) #area 3 range 172.50.0.0 255.255.248.0
R1#sh ip route os
Here we can see summarized inter area routes.
R1#ping 172.50.1.1
R1#ping 172.50.1.1
Successful