Redistribution between any pair of routing protocols
Introduction
General information about “Redistribution”:
- Used to take routes from one routing protocol/source and redistribute it into another routing protocol
- Routes must be already in the routing table to be redistributed
Redistribution into EIGRP
General information on “Redistribution from/into EIGRP”:
- Will appear in routing table as “D EX” (EIGRP External)
- Will have an AD of 170
CLI command arguments breakdown:
- source:
- Mandatory
- Specifies the source protocol
- Can be bgp, connected, eigrp, isis, mobile, ospf, static and rip
- metric:
- Mandatory
- Specification of bandwidth, delay, reliability, load and MTU
- A default-metric for all redistributed routes can be defined
- When a redistributed protocol has a metric specified, the default metric will be overwritten
- Important: Metric is required since there’s no default metric configured by default!
- route-map:
- Optional
- Applies the logic of a route-map to the route while being redistributed
“Redistribution from/into EIGRP” CLI configuration commands:
## Configuring redistribution for EIGRP (classic mode)
Router(config-router)# redistribute <source> [options]
## Defining a default metric for EIGRP (classic mode)
Router(config-router)# default-metric <bandwidth> <delay> <reliability> <load> <mtu>
## Configuring redistribution for EIGRP (named mode)
Router(config-router-af)# topology base
Router(config-router-af-topology)# redistribute <source> [options]
## Defining a default metric for EIGRP (named mode)
Router(config-router-af)# topology base
Router(config-router-af-topology)# default-metric <bandwidth> <delay> <reliability> <load> <mtu>
Redistribution into OSPF
General information on “Redistribution from/into OSPF”:
- External routes will by propagated by Type 5 LSA
- Exception: Inside an NSSA, Type 7 LSA is used!
- The default external metric type is E2
- E1 type routes have metrics that increase as they traverse the network
- E2 type routes have metrics that don’t increase and only use the metric set by the ASBR (20 by default)
- If two E2 routes are learned by the same router it needs to be able to tie break to avoid routing loops
- Tie break when the router and ASBR is in the same area:
- Find advertising ASBRs as listed in the Type 5 LSA
- Calculate the lowest cost route to reach the ASBR based on the LSDB
- Use the outgoing interface and next-hop based on the result
- The metric of the route remains unchanged
- Tie break when the router and the ASBR are in different areas:
- Calculate the cost to reach the ASBR based on the LSDB
- Add the cost from the ABR to the ASBR as listed in a Type 4 LSA
- Important regarding redistribution of OSPF external routes: By default, Cisco IOS only redistributes OSPF Intra-Area and Inter-Area routes. Redistribution of OSPF External (E1/E2) must be explicitly configured!
CLI command arguments breakdown:
- source:
- Mandatory
- Specifies the source protocol
- Can be bgp, connected, eigrp, isis, mobile, ospf, static and rip
- metric:
- Optional
- No metric required since there’s a default metric!
- Routes taken from BGP have a default metric of 1
- Routes taken from another OSPF process use the source routes metric
- Routes taken from all other sources use a metric of 20
- A custom default-metric for all redistributed routes can be defined
- When a redistributed protocol has a metric specified, the default metric will be overwritten
- metric-type:
- Optional
- Can be set to 1 for E1 (External Route 1) type
- Can be set to 2 for E2 (External Route 2) type
- tag:
- Optional
- Used to match the route against a tag
- route-map:
- Optional
- Applies the logic of a route-map to the route while being redistributed
- subnets:
- Optional, but highly recommended
- Important: Without this command only classful subnets will be redistributed (unique to OSPF)!
“Redistribution from/into OSPF” CLI configuration commands:
## Configuring redistribution for OSPFv2
Router(config-router)# redistribute <source> [options]
## Defining a default metric for OSPFv2
Router(config-router)# default-metric <cost>
## Configuring redistribution for OSPFv3
Router(config-router-af)# redistribute <source> [options]
## Defining a default metric for OSPFv2
Router(config-router-af)# default-metric <cost>
Redistribution into BGP
General information on “Redistribution from/into BGP”
- When redistributing from BGP into an IGP, the command bgp redistribute-internal must be used under the BGP process or either iBGP-learned routes won’t get redistributed (redistribution of iBGP is not recommended)
CLI command arguments breakdown:
- source:
- Mandatory
- Specifies the source protocol
- Can be bgp, connected, eigrp, isis, mobile, ospf, static and rip
- match:
- Mandatory and only configure for OSPF
- Specifies which OSPF route types to be redistributed
- By default, BGP only redistributes OSPF intra-area and inter-area routes
- metric:
- Optional
- A custom metric for all redistributed routes can be defined
- route-map:
- Optional
- Applies the logic of a route-map to the route while being redistributed
“Redistribution from/into BGP” CLI configuration commands:
## Configuring redistribution for BGP
Router(config-router-af)# redistribute <source> [options]
Preventing Loops with AD
General information on “Preventing Loops with AD”:
- Multiple redistribution points within a routing domain can cause possible routing loops
- One solution is to give redistributed routes a higher AD than non-redistributed routes
- EIGRP does this by default and uses AD 90 for internal routes and AD 170 for external routes
- The distance command can be used to change the AD for each protocol
- The distance command can be linked to an ACL to set per-route AD
“Preventing Loops with AD” CLI configuration commands:
## Modifying the AD for EIGRP (classic mode)
Router(config-router-af)# distance eigrp <eigrp-int-ad> <eigrp-ext-ad>
## Modifying the AD for EIGRP (named mode)
Router(config-router-af)# topology base
Router(config-router-af-topology)# distance eigrp <eigrp-int-ad> <eigrp-ext-ad>
## Modifying the AD for OSPFv2
Router(config-router)# distance ospf intra-area <ospfv2-intra-ad> inter-area <ospfv2-inter-ad> external <ospfv2-external-ad>
## Modifying the AD for OSPFv3
Router(config-router-af)# distance <ospfv3-ad>
## Modifying the AD for BGP
Router(config-router-af)# distance bgp <ebgp-ad> <ibgp-ad> <local-bgp-ad>
Preventing Loops with Route Tags
General information about “Preventing Loops with Route Tags”
- Route tags can be used to prevent routing loops
- Example: Routes from routing domain Domain-A are redistributed into routing domain Domain-B. When entering routing Domain-B the routes are given a tag. If they try to leave the routing domain at another redistribution point back into routing domain Domain-A they can be filtered out based on the tag.