The LSA uses the network address as an identifier. If one router is generating multiple Type 5 LSAs with the same network number but different masks, then only 1 would be advertised because the LSA ID would be the same.
I have created 3 static routes. all end up with the same network number and would normally have the same LSA ID:
R1(config)#ip route 192.9.0.0 255.255.0.0 Null0
R1(config)#ip route 192.9.0.0 255.255.254.0 Null0
R1(config)#ip route 192.9.0.0 255.255.255.0 Null0
R1(config)#router ospf 1
R1(config-router)#redistribute static subnets
Let’s see what LSA IDs are:
R1#sho ip osp database | inc 192.9
192.9.0.0 1.1.1.1 246 0x80000001 0x00933F 0
192.9.0.255 1.1.1.1 149 0x80000001 0x00933F 0
192.9.1.255 1.1.1.1 234 0x80000001 0x00834F 0
R1#
R1#sho ip ospf database external 192.9.0.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 14
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 192.9.0.0 (External Network Number )
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x8F41
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
The router gives the last 2 networks as broadcast address of that respective network as the Link State ID. The /16 network got the network address as the ID.
Removing two routes to understand the behavior:
R1(config)#no ip route 192.9.0.0 255.255.0.0 Null0
R1(config)#no ip route 192.9.0.0 255.255.254.0 Null0
R1(config)#no ip route 192.9.0.0 255.255.255.0 Null0
R1(config)#ip route 192.9.0.0 255.255.255.0 Null0
So now /24 is the only there and it is using 192.9.0.0 as its ID:
R1#sho ip osp database external 192.9.0.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 36
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 192.9.0.0 (External Network Number )
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x933F
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
What happens if we add a /16 now?
R1(config)#ip route 192.9.0.0 255.255.0.0 Null0
R1#sho ip osp database external 192.9.0.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 12
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 192.9.0.0 (External Network Number )
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0x9140
Length: 36
Network Mask: /16
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R1#
The /16 has taken the ID from the /24. This is amazing.
R1#sho ip osp database | inc 192.9
192.9.0.0 1.1.1.1 45 0x80000002 0x009140 0
192.9.0.255 1.1.1.1 45 0x80000001 0x00933F 0
Thanks for reading the blog ………