For topology, see the attachment.
NE20 is at VRP5.10 Realse:1243.01.
(1) C6509 and NE20 are in the same AS, running OSPF.
(2) User network segment is under NE20, to which C6509 is configured with a black hole route that is imported into OSPF.
(3) NE20 runs EBGP with NE40 , advertising the routes of user network segment.
Generally, no matter the port of NE20 is enabled or disabled(NE20 advertises direct route if the port is enabled, or O_ASE route is advertised if it is shut down). NE40 should be able to learn the route. However, in maintenance, if OSPF does not use NETWORK to enable the network segment, NE40 could learn the route normally; if NETWORK is used to enable the user network segment, NE40 cannot learn the route once the port is enabled after shutdown.
(1) Checkup for the configurations could help find the problem. NE40 could learn the route normally if NE20 OSPF does not use NETWORK command, so the configuration is normal.
(2) Use NETWORK command to shut down the port and then enable it again, and a direct route is found. According to advertising principle of BGP, NE20 should advertise the route, but it does not learn the route, so BGP may fail in advertising of the route.
(3) Check the BGP packets received at NE40 through enabling the switch for BGP Debug, and NE20 has advertised two pieces of UPDATE message, of which the first is to update the route, and the second is to cancel it. The updated route is in the same network segment with the cancelled one, but once the cancelled route is advertised, the route learned by NE40 is deleted at right. Route learning fails.
(4) If NETWORK is not used, shut down the port and capture packets; it is found that only one route including the update and cancelled is advertised. The update route takes effect, and NE40 could learn route normally.
(5) The problem is caused by NE20 because the scheme for advertising of route by NE20 differs whether the NETWORK command is used or not.
(6) Solution: NE20 does not use NETWORK to enable user network segment in OSPF of NE20.
(1) Problematic configuration.
(2) The route advertising scheme differs for using NETWORK and non-using NETWORK in OSPF, resulting in difference in route learning.
For difference in commands used on equipment, the route advertising scheme differs.