OSPFv2 has two ways of configuration.
- Process level
- Link Level
- The link level configuration overrides the process configuration.
- Secondary IPs are advertised but will not form neighbor.
- Secondary IP advertisement can be disabled, as show below.
Below items must match in order to establish OSPF neighbors.
- Interface MTU (If not matched, the neighborship will stay in Extart). It is not in the hello packet. MTU can be ignored with the interface command ip mtu ignore.
- Subnet mask.
- Area ID.
- Network type.
- Hello and Dead timers.
As an example, we will use R1 and R2
R1 is using interface configuration mode with a secondary.
R1#conf t
R1(config)#int g1
R1(config-if)#ip add 10.10.10.1 255.255.255.0 secondary
From R2 we can see that 10.10.10.0/24 is being received from R1
R2#sho ip route | in 10.10
O 10.10.10.0/24 [110/2] via 10.1.2.1, 00:00:47, GigabitEthernet1
R1 sets the secondaries to none and now, the secondary subnet is no long present at R2's Routing table.
R1#conf t
R1(config)#int g1
R1(config-if)#ip ospf 1 area 0 secondaries none
- The process numbers do not have to match between neighbors.
- Router ID is selection is based on the below three options.
- Manual configuration.
- Highest IP on any loopback interface
- Highest IP in the physical interface.
OSPF DR election
- Priority is de decision factor.
- Higher priority wins.
- 0 priority means the router does not become DR.
- If there is a tie, highest router ID wins.
- No preemption.
Hello and Dead interval.
- Dead interval is four times the hello interval.
- Hello intervals should match for the routers to become neighbors.
R1#sho ip ospf interface g1 | in Hello|POI
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Below is an example of how changing the Hello timer affect the Dead interval.
R1's G1 interface is configured as p2p, hence the default hello interval is 10, which makes the dead interval 40.
- Changing R1's hello interval
R1#conf t
R1(config)#int g1
R1(config-if)#ip ospf hello-interval 5
- Verification
R1#sho ip ospf int g1 | in Hello
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
- Dead interval can also be changed with the interface command (ip ospf dead-interval)
OSPF database
- LSA Type 1 (Router Link States)
- LSA Type 2 (Net Link States)
- LSA Type 3 (Summary Net Link States)
- LSA Type 4
- LSA Type 5
- LSA Type 7
For better understanding, we will analyze the basic network topology.
R1's database
LSA Type 1, 2 and 4 are displayed.
- Type 1 LSA - are intra-area LSA, and do not leave the area. When they leave the area, they become inter-area LSA generated by the ABR. In the example, R2 (2.2.2.2).
- Type 2 LSA - are intra area that only generated by the DR.
R1#sho ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 7 0x80000032 0x00E09F 6
2.2.2.2 2.2.2.2 10 0x8000003C 0x00DC9E 5
3.3.3.3 3.3.3.3 8 0x80000020 0x007D0C 5
4.4.4.4 4.4.4.4 8 0x80000020 0x00A6D3 5
5.5.5.5 5.5.5.5 312 0x80000017 0x00E9A6 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.0.4 4.4.4.4 257 0x80000002 0x0091F9
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.2.5.0 2.2.2.2 13 0x80000002 0x00839E
Some helpful troubleshooting tools and commands.
- debug ip ospf hello
- debug ip ospf adj
No comments:
Post a Comment