Advanced OSPF Lab1
Advanced OSPF Lab1
Advanced OSPF
lab1
https://www.facebook.com/groups/1720572871550995/
for
CCNP Students
By
Eng. Abeer Hosni
1- The broadcast network configurations.
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R2(config)#router ospf 2
R2(config-router)#network 2.2.2.2 0.0.0.0 area 1
R1#show ip route ospf
<Output omitted>
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/11] via 10.0.0.2, 00:01:01, FastEthernet0/0
Where O indicates that the route is in the same area and O IA indicates that the route is
in a different area.
Note 3)
R1 is the DR and R2 is the BDR as R1 OSPF process started first.
R1#show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.0.0.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost:
10 Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.0.0.1 Backup
Designated router (ID) 2.2.2.2, Interface address 10.0.0.2 Timer
intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output omitted>
R2(config)#int f0/0
R2(config-if)#ip add 10.0.0.2 255.255.255.252
*Mar 1 00:16:52.203: %OSPF-5-ADJCHG: Process 2, Nbr 1.1.1.1 on FastEthernet0/0
from FULL to DOWN, Neighbor Down: Interface down or detached
R1#u all
We then will fix everything again.
The second problem we will run is to change the hello interval and the dead interval which will
be configured per interface level.
R2(config)#int f0/0
<Output omitted>
*Mar 1 00:27:42.703: OSPF: Rcv hello from 2.2.2.2 area 0 from FastEthernet0/0 10.0.0.2
*Mar 1 00:27:42.703: OSPF: Mismatched hello parameters from 10.0.0.2
R1#u all
R2(config)#int f0/0
Hint:
R1(config-if)#ip ospf dead-interval minimal hello-multiplier 3
The previous command means that the router will send 3 hello packets each second and
the dead interval will be set to 1 second. This is not recommended to configure as it will
cause a load on the router’s CPU.
R2 should be the DR as it has the highest RID, 2.2.2.2. To fix that we should reload the routers
or clear the ip OSPF process.
<Output omitted>
R1(config)#int s1/0
R1(config-if)#no shutdown
R1(config-if)#router ospf 1
R2(config)#int s1/1
R2(config-if)#no shutdown
R2(config-if)#router ospf 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output omitted>
Notice that there is no mention for the election of the DR or the BDR.
R1(config)#int s1/0
<cr>
R2(config)#int s1/1
The problem with clear text authentication is that we can capture the password using any
program like wireshark.
R1(config)#int s1/0
*Mar 1 00:21:09.107: OSPF: Rcv pkt from 10.0.0.1, Serial0/0 : Mismatch Authenti
Where type 1 is the clear text authentication and type 2 is the MD5 authentication.
R2(config)#int s0/0
Hint:
- OSPF authentication mode can be configured globally for all
interfaces under the OSPF process, but the authentication key still
need to be configured under the interface.
R1(config)#router ospf 1
R1(config-router)#area 0 authentication ?
message-digest Use message-digest authentication
<cr>
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#router ospf 1
R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#router ospf 1
R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#router ospf 1
R3(config-router)#network 10.0.0.3 0.0.0.0 area 0
R4(config)#int f0/0
R4(config-if)#no shutdown
R4(config-if)#router ospf 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
<Output omitted>
The neighbor relationship between the DRother routers will stay still at
the 2WAY state as they don’t exchange the LSA between each other’s
directly.
5- The default-information originate
R1(config-if)#int s1/0
Suppose that R1 is the router connected to the ISP, we will configure R1 to announce itself
as a default route for each router in the OSPF network:
R1(config)#router ospf 1
R1(config-router)#default-information originate
To verify:
<Output omitted>
<Output omitted>
<Output omitted>
But R1 must have a default route pointing to the ISP in its routing table:
<Output omitted>
R2#show ip route
<Output omitted>
But we can override behavior that with using the option always:
R1(config)#router ospf 1
To verify:
<Output omitted>
<Output omitted>
<Output omitted>
6- The Cost:
OSPF Cost (metric) = 10^8/BW(bps)
R1(config)#int s1/1
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#int s1/2
R1(config-if)#no shutdwon
R1(config-if)#router ospf 1
R2(config)#int s1/1
R2(config-if)#no shutdown
R2(config-if)#int f0/0
R2(config-if)#bandwidth 100000
R2(config-if)#no shutdown
R2(config-if)#int loop 2
R2(config-if)#router ospf 1
R3(config)#int s1/2
R3(config-if)#no shutdown
R3(config-if)#int f0/0
R3(config-if)#bandwidth 100000
R3(config-if)#no shutdwon
R3(config-if)#router ospf 1
To verify:
R1#show ip route ospf
<Output omitted>
Notice that the cost is cumulative. If we want to change the path that R1 uses to reach
2.2.2.2, simply we could change the cost value.
R1(config)#int s1/1
<Output omitted>
Note:
By default OSPF doesn’t differentiate between Fast Ethernet and Giga Ethernet cost values:
Suppose that the organization planes to upgrade to gigabit Ethernet in the coming
months. OSPF should accurately calculate its metric assuming gigabit Ethernet will
be the fastest link in the network.
R1(config)#router ospf 1
R1(config-router)#auto-cost reference-bandwidth 1000
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent across all routers.
It doesn’t affect the adjacency but it’s better to run the last command on all routers in
the OSPF network.
R3(config)#int loop 0
R3(config)#int loop 1
R3(config)#int loop 2
R3(config)#int loop 3
To verify:
R2#show ip route ospf
<Output omitted>
15.0.0.0 00001111.00000000.00000000.00000000
15.1.0.0 00001111.00000001.00000000.00000000
15.2.0.0 00001111.00000010.00000000.00000000
15.3.0.0 00001111.00000011.00000000.00000000
R3(config)#router ospf 1
To verify:
R2#show ip route ospf
<Output omitted>
Note:
The passive-interface command prevents routing updates from being sent through the
specified router interface. This is commonly done to reduce traffic on the LANs as they do
not need to receive dynamic routing protocol communication.
R1(config-router)#passive-interface default
Best Wishes
Abeer