Skip to main content
Contributor III
November 26, 2021

Technical Tip: BGP routes learned/advertised using RIB

  • November 26, 2021
  • 0 replies
  • 1609 views

Description

This article describes how BGP routes are learned/advertised using RIB.

Scope

FortiGate.

Solution

Routes are stored in the  Routing Information Bases (RIBs):

  • Adj-RIBs-In.

  • Loc-RIB.

  • Adj-RIBs-Out.

 

ranand_0-1637918430659.png

 

Adj-RIBs-In.

 

  • Stores routing information that has been learned from inbound UPDATE messages; contents represent routes that are available as an input to the Decision Process.

  • Contains unprocessed routing information that has been advertised to the local  BGP speaker by its peers.

 

Loc-RIB.

 

  • Contains the local routing information that the BGP speaker has selected by applying its local policies to the routing information contained in its Adj-RIBs-In.

 

Adj-RIBs-Out.

 

  • Information that the local BGP speaker has selected for advertisement to its peers.

  • Routing information stored will be carried in the local BGP speaker's UPDATE messages and advertised to its peers.

 

In BGP, the config network statement is used to originate and advertise a specific prefix. By default, iBGP advertises a prefix only if an exact matching route exists in the routing table.

The 'network-import-check' option controls this behavior. When enabled (this is the default in BGP global settings), BGP advertises a network only if the corresponding route is present in the routing table. If this option is disabled, BGP can advertise the configured prefix even when the route is missing from the routing table or the associated interface is down.

Because disabling network-import-check may result in advertising unreachable networks, it should be used with caution.

This feature was added in FortiOS v7.0.4+: Allow per-prefix network import checking in BGP.

config router bgp
    config network
        edit 1
            set prefix 10.1.2.0 255.255.255.0
            set network-import-check global
            set backdoor disable
            set route-map ''
        next
    end
end


Related articles:

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!