redistribute (BGP)

Configures the device to redistribute RIP routes, directly connected routes, or static routes into BGP4 and BGP4+.
Syntax
redistribute { connected| rip | static } [ metric num ] [ route-map string ]
no redistribute { connected| rip | static } [ metric num ] [ route-map string ]
Command Default

The device does not redistribute routing information between BGP4 or BGP4+ and the IP interior gateway protocol OSPF.

Parameters
connected
Redistributes connected routes.
rip
Redistributes Routing Information Protocol (RIP) routes.
static
Redistributes static routes.
metric
Metric for redistributed routes.
num
Specifies a metric number. The range is from 0 through 4294967297. No value is assigned by default.
route-map
Specifies that a route map be consulted before a route is added to the routing table.
string
Specifies a route map to be consulted before a route is added to the routing table.
Modes

BGP configuration mode

BGP address-family IPv6 unicast configuration mode

BGP address-family IPv4 unicast VRF configuration mode

BGP address-family IPv6 unicast VRF configuration mode

Usage Guidelines

Use the no form of the command to restore the defaults. When this command is entered in BGP global configuration mode, it applies only to the IPv4 address family. Use this command in BGP address-family IPv6 unicast configuration mode for BGP4+ configurations.

Use this command to configure the device to redistribute RIP, directly connected routes, or static routes into BGP4 or BGP4+. The routes can be filtered by means of an associated route map before they are distributed.

Note: The default-metric command does not apply to the redistribution of directly connected routes into BGP4 or BGP4+. Use a route map to change the default metric for directly connected routes.
Examples

This example redistributes static routes into BGP4 and specifies a metric of 200.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# redistribute static metric 200

This example redistributes static routes into BGP4+ and specifies that route-map "rm5" be consulted.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv6 unicast
device(config-bgp-ipv6u)# redistribute route-map rm5

This example redistributes directly connected routes into BGP4 in VRF instance "red".

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# address-family ipv4 unicast vrf red
device(config-bgp-ipv4u-vrf)# redistribute connected
History
Release version Command history
08.0.30 Support was added for the BGP address-family IPv6 unicast VRF configuration mode.