Basic configuration of all routers:
R1:
interface Fa0/0
ip address 12.0.0.1 255.255.255.0
ip ospf 1 area 0
no sh
!
router ospf 1
router-id 0.0.0.1
R2:
interface Fa0/0
ip address 12.0.0.2 255.255.255.0
ip ospf 1 area 0
no sh
!
interface Fa0/1
ip address 23.0.0.2 255.255.255.0
ip ospf 1 area 1
no sh
!
router ospf 1
router-id 0.0.0.2
R3:
interface Fa0/0
ip address 23.0.0.3 255.255.255.0
ip ospf 1 area 1
no sh
!
router ospf 1
router-id 0.0.0.3
When the Type-4 LSA is generated by an ABR, is it after after receiving a Type-5 LSA from an ASBR or after saying the E-bit in the Type-1 LSA's ASBR?
There is no redistribution currently, so we can see that R2 does not contain a Type-5 LSA and it does not generate a Type-4 LSA in order to be flooded into the backbone area 0:
R2#show ip osp data ext
OSPF Router with ID (0.0.0.2) (Process ID 1)
R2#
R2#show ip ospf data asbr-summary
OSPF Router with ID (0.0.0.2) (Process ID 1)
R2#
Using wireshark I captured a Type-1 LSA advertised by R3 to describe itself and it does not identify itself as ASBR with E-bit since there is no redistribution and we can see that the E-bit is set to 0:
Let's configure the redistribute static subnets command without a real static route in the routing table of R3, so we make R3 as an ASBR without generating a Type-5 LSA:
R3(config)#router ospf 1
R3(config-router)#redistribute static subnets
We can see below that there is no Type-5 LSA in the LSDB of R2 but it generated a Type-4 LSA even if there is no Type-5 LSA in its LSDB:
R2#show ip ospf database exter
OSPF Router with ID (0.0.0.2) (Process ID 1)
R2#
R2#show ip osp data asbr-summary
OSPF Router with ID (0.0.0.2) (Process ID 1)
Summary ASB Link States (Area 0)
LS age: 48
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 0.0.0.3 (AS Boundary Router address)
Advertising Router: 0.0.0.2
LS Seq Number: 80000001
Checksum: 0x5BDA
Length: 28
Network Mask: /0
MTID: 0 Metric: 1
R2#
Wireshark displays now that R3 triggers a new Type-1 LSA with E-bit set to 1, so the Type-4 LSA will be generated by the ABR R2 as long as it sees that E-bit on the ASBR R3’s Type-1 Router LSA.