Export BGP Routes to other Protocols
Before exporting routes from BGP (Border Gateway Protocol) to another protocol, you must first
configure both protocols and then verify the independent operation of each. When you export
routes from BGP, the exported routes are limited to those for the respective address family
and protocol. For example, you can export IPv4 unicast routes from BGP to RIP (Routing Information Protocol), but you cannot export IPv6 unicast routes from BGP to RIP. IPv6 routes can
be exported only from BGP to IPv6 routing protocols; and IPv4 routes can be exported only to
IPv4 routing protocols.
You
can use route maps to associate BGP attributes including Community,
NextHop, MED, Origin, and Local Preference with the routes. Route
maps can also be used to filter out exported routes.
-
To enable or disable the export of routes into BGP from
other routing sources like ospf and rip, use the following commands:
enable bgp
export [blackhole | direct | isis | isis-level-1 | isis-level-1-external | isis-level-2
| isis-level-2-external | ospf | ospf-extern1 | ospf-extern2 | ospf-inter | ospf-intra |
ospfv3 | ospfv3-extern1 | ospfv3-extern2 | ospfv3-inter | ospfv3-intra | rip | ripng |
static {address-family [{ipv4-unicast |ipv4-multicast | ipv6-unicast | ipv6-multicast]}
{export-policy policy-name}
disable bgp
export [blackhole | direct | isis | isis-level-1 | isis-level-1-external | isis-level-2
| isis-level-2-external | ospf | ospf-extern1 | ospf-extern2 | ospf-inter | ospf-intra |
ospfv3 | ospfv3-extern1 | ospfv3-extern2 | ospfv3-inter | ospfv3-intra | rip | ripng |
static {address-family [{ipv4-unicast |ipv4-multicast | ipv6-unicast |
ipv6-multicast]}
Note
When exporting BGP routes, static routes,
configured with the
configure bgp add
network command, take precedence over BGP discovered
routes.
For Layer 3 VPNs, a local PE advertises the local
customer routes to the remote PE by exporting the BGP routes in the VPN-VRF associated
with that customer as VPNv4 routes.
-
To enable or disable the export to the remote PE of BGP
routes from the CE or static/direct routes in the CE VPN-VRF, use the following
commands:
enable bgp
export [bgp | direct | static] {export-policy} policy-name} {address-family [ipv4-unicast | vpnv4]}
disable bgp
export [bgp | direct | static] {address-family [ipv4-unicast | vpnv4]}