BGP installing a BGP-learned route into the routing table

A BGP-learned route will be installed in the local routing table only if the local router has a valid path to the next-hop IP. For example, if R3 learns about 1.1.1.1/32 from R1 which has an IP address of 192.168.12.1, the R3's BGP table will look something like this:

R3#show ip bgp Network Next Hop Metric LocPrf Weight Path * i 1.1.1.1/32 192.168.12.1 0 100 0 1 i

In order for this network to be installed in the routing table, a valid route to the next-hop IP of 192.168.12.1 must exist in the local routing table. Note that even a default route in the local routing table would be considered a valid route to the next-hop IP for BGP to operate.

Remember, BGP peers may be several hops away, and such a network prefix may be learned via a BGP Route Reflector, so it may be the case that 192.168.12.1 is indeed not in the routing table.

You must ensure that routing is established within an AS (typically using an Interior Gateway Protocol (IGP) in order for BGP to operate correctly.

Links:

https://networklessons.com/bgp/how-to-advertise-networks-in-bgp

https://forum.networklessons.com/t/bgp-route-reflector/1131/108?u=lagapides

https://forum.networklessons.com/t/internal-bgp-border-gateway-protocol-explained/1129/275?u=lagapides