redistribute
redistribute
{
ospf
}
[
match
[
external1
|
external2
|
internal
]
|
metric
num
|
route-map
string
]
redistribute
{
source-protocol
}
[
metric
num
|
metric-type
{
type1
|
type2
}
|
route-map
string
]
no redistribute
{
ospf
}
[
match
[
external1
|
external2
|
internal
]
]
[
metric
num
]
[
route-map
string
]
no redistribute
{
source-protocol
}
[
metric
num
]
[
metric-type
{
type1
|
type2
}
]
[
route-map
string
]
The device does not redistribute routing information.
- source-protocol
- Specifies the source protocol from which routes are being redistributed. It can be one of the following keywords: bgp, connected, ospf, rip, or static.
- metric num
- Specifies a metric for redistributed routes. Range is from 0 through 65535. No value is assigned by default.
- route-map string
- Specifies a route map to be consulted before a route is added to the routing table.
- metric-type
- Specifies the external link type associated with the default route advertised into the OSPF routing domain.
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
OSPF router configuration mode
OSPFv3 router configuration mode
OSPF router VRF configuration mode
OSPFv3 router VRF configuration mode
Routes can be filtered by means of an associated route map before they are distributed.
The metric-type { type1 | type2 } option is only available in OSPFv3 router configuration mode and OSPFv3 router VRF configuration mode.
The match, metric, and metric-type options are not available in OSPF router configuration mode and OSPF router VRF configuration mode.
default-metric command does not apply to the redistribution of directly connected routes. Use a
route map to change the default metric for directly connected routes.
The no form of the command restores the defaults.
The following example redistributes OSPF external type 1 routes.
device# configure terminal device(config)# router bgp device(config-bgp)# redistribute ospf match external1
The following example redistributes OSPF routes with a metric of 200.
device# configure terminal device(config)# router bgp device(config-bgp)# redistribute ospf metric 200
The following example redistributes OSPFv3 external type 2 routes in VRF instance "red".
device# configure terminal device(config)# router bgp device(config-bgp)# address-family ipv6 unicast vrf red device(config-bgp-ipv6u-vrf)# redistribute ospf match external2
The following example redistributes static routes into BGP4+ and specifies a metric of 200.
device# configure terminal device(config)# router bgp device(config-bgp)# address-family ipv6 unicast device(config-bgp-ipv6u)# redistribute static metric 200
The following example redistributes RIP routes and specifies that route-map "rm2" be consulted in BGP address-family IPv6 unicast configuration mode.
device# configure terminal device(config)# router bgp device(config-bgp)# address-family ipv6 unicast device(config-bgp-ipv6u)# redistribute rip route-map rm2
The following example redistributes BGP routes and specifies that route-map "rm7" be consulted in OSPF router configuration mode.
device# configure terminal device(config)# router ospf device(config-ospf-router)# redistribute bgp route-map rm7