Default Route Origination Example for IPv4

The following example configures the originate default route feature for BGP (Border Gateway Protocol) neighbor using policy def_originate.pol.

entry prefix_matching {
if match any {
} then {
as-path "64505";
enable bgp neighbor originate-default policy def_originate

With this configuration, a default route is originated and sent to neighbor only if there is a BGP route in the local RIB which matches the statement nlri If a matching route exists, the default route is sent to neighbor with the 64505 as-path prepended. If this is an EBGP neighbor, then the local AS-Number is prepended after 64505.

If the route for the match statement nlri goes away and there is no other matching route in the BGP RIB, the default route origination feature becomes inactive and BGP withdraws the default route from neighbor When a matching route becomes available again in the local BGP RIB, the default route origination feature becomes active again and the default route is advertised to neighbor