Route Redistribution

Route redistribution is the process of sharing routing information between different routing protocols or instances within a network. It’s used when a router needs to advertise routes learned from one routing protocol (e.g., OSPF) into another (e.g., EIGRP) to ensure full connectivity across a network running multiple protocols. Redistribution is common in complex networks with multiple routing domains, such as enterprise networks or during network mergers.

Key Concepts of Route Redistribution

  • Routing Protocols: Redistribution typically involves protocols like OSPF, EIGRP, RIP, BGP, or static routes.
  • Redistribution Direction: Routes can be redistributed one-way (from protocol A to B) or mutually (A to B and B to A).
  • Redistribution Points: Performed on a router running both protocols, often called a border router.
  • Metrics: Each protocol uses different metrics (e.g., OSPF uses cost, EIGRP uses composite metrics). During redistribution, you must specify a metric compatible with the target protocol.
  • Administrative Distance (AD): Redistribution doesn’t alter AD, so routes from a protocol with a lower AD (e.g., EIGRP, AD=90) are preferred over those from a higher AD protocol (e.g., RIP, AD=120) unless modified.
  • Route Loops: Mutual redistribution can cause loops if not carefully configured (e.g., using route filters or tags).
  • Route Maps: Used to control which routes are redistributed, set metrics, or tag routes for filtering.

Why Redistribute?

  • Multi-Protocol Networks: Connect networks running different protocols (e.g., OSPF in one domain, EIGRP in another).
  • Network Integration: Merge networks after acquisitions or during migrations.
  • Backup Paths: Provide alternate paths via another protocol.
  • Policy Enforcement: Control routing behavior across domains.

Challenges

  • Metric Translation: Converting metrics between protocols (e.g., OSPF cost to RIP hop count).
  • Loop Prevention: Avoiding routing loops in mutual redistribution.
  • Suboptimal Routing: Redistribution may lead to less efficient paths if not carefully planned.
  • Filtering: Ensuring only necessary routes are redistributed to avoid overwhelming routing tables.

Default Metrics for Redistribution

When redistributing routes, the target protocol requires a metric. If not specified, some protocols reject the routes, while others use defaults:

  • EIGRP: Requires a metric (bandwidth, delay, reliability, load, MTU) unless a default is set.
  • OSPF: Default metric = 20 (type E2 external route), metric type can be E1 or E2.
  • RIP: No default metric; requires manual specification (hop count).
  • BGP: Uses the IGP metric or a manually set MED (Multi-Exit Discriminator).

Configuration Steps (Cisco IOS Example)

  1. Enter the routing protocol configuration mode for the target protocol.
  2. Use the redistribute command to import routes from the source protocol.
  3. Specify a metric or use a default metric.
  4. Optionally, apply route maps to filter or modify redistributed routes.

Examples of Route Redistribution

Example 1: Redistributing OSPF into EIGRP

Scenario:

  • A router (R1) runs OSPF (Area 0) and EIGRP (AS 100).
  • OSPF learns network 192.168.1.0/24 from another router.
  • R1 needs to redistribute this OSPF route into EIGRP so EIGRP routers can reach 192.168.1.0/24.

Topology:

[OSPF Router] --- OSPF --- [R1] --- EIGRP --- [EIGRP Router] 192.168.1.0/24 10.0.0.0/24

Configuration on R1 (Cisco IOS):

router eigrp 100 redistribute ospf 1 metric 10000 100 255 1 1500 network 10.0.0.0 0.0.0.255 ! router ospf 1 network 192.168.1.0 0.0.0.255 area 0

  • redistribute ospf 1: Redistributes OSPF routes into EIGRP.
  • metric 10000 100 255 1 1500: Specifies EIGRP metric (bandwidth=10000, delay=100, reliability=255, load=1, MTU=1500).
  • Result: EIGRP routers learn 192.168.1.0/24 as an external EIGRP route (AD=170).

Routing Table on EIGRP Router:

D EX 192.168.1.0/24 [170/28160] via <R1>, <interface>

(D EX indicates an EIGRP external route, AD=170.)

Example 2: Redistributing EIGRP into OSPF

Scenario:

  • Same router (R1) now redistributes EIGRP routes (e.g., 10.0.0.0/24) into OSPF.
  • OSPF routers need to reach 10.0.0.0/24.

Configuration on R1:

router ospf 1 redistribute eigrp 100 metric 50 metric-type 1 network 192.168.1.0 0.0.0.255 area 0 ! router eigrp 100 network 10.0.0.0 0.0.0.255

  • redistribute eigrp 100: Redistributes EIGRP routes into OSPF.
  • metric 50: Sets OSPF cost to 50.
  • metric-type 1: Uses E1 (cost includes internal + external paths) instead of E2 (default, external cost only).
  • Result: OSPF routers learn 10.0.0.0/24 as an external OSPF route (AD=110).

Routing Table on OSPF Router:

O E1 10.0.0.0/24 [110/50] via <R1>, <interface>

(O E1 indicates OSPF external type 1 route.)

Example 3: Mutual Redistribution with Route Filtering

Scenario:

  • R1 mutually redistributes OSPF and RIP.
  • OSPF has 192.168.1.0/24, RIP has 172.16.1.0/24.
  • Only specific routes should be redistributed to avoid loops:
    • Redistribute 192.168.1.0/24 from OSPF to RIP.
    • Redistribute 172.16.1.0/24 from RIP to OSPF.

Topology:

[OSPF Router] --- OSPF --- [R1] --- RIP --- [RIP Router] 192.168.1.0/24 172.16.1.0/24

Configuration on R1:

! Define route maps for filtering route-map OSPF-TO-RIP permit 10 match ip address 1 route-map RIP-TO-OSPF permit 10 match ip address 2 ! Access lists to match networks access-list 1 permit 192.168.1.0 0.0.0.255 access-list 2 permit 172.16.1.0 0.0.0.255 ! RIP configuration router rip version 2 redistribute ospf 1 metric 5 route-map OSPF-TO-RIP network 172.16.1.0 ! OSPF configuration router ospf 1 redistribute rip metric 100 metric-type 2 route-map RIP-TO-OSPF network 192.168.1.0 0.0.0.255 area 0

  • OSPF to RIP:
    • redistribute ospf 1 metric 5 route-map OSPF-TO-RIP: Redistributes only 192.168.1.0/24 into RIP with hop count 5.
  • RIP to OSPF:
    • redistribute rip metric 100 metric-type 2 route-map RIP-TO-OSPF: Redistributes only 172.16.1.0/24 into OSPF with cost 100, type E2.
  • Result:
    • RIP routers learn 192.168.1.0/24 (AD=120).
    • OSPF routers learn 172.16.1.0/24 (AD=110).
    • Route maps prevent loops by limiting redistributed routes.

Routing Tables:

  • RIP Router: textCopyR 192.168.1.0/24 [120/5] via <R1>, <interface>
  • OSPF Router: textCopyO E2 172.16.1.0/24 [110/100] via <R1>, <interface>

Example 4: Redistributing Static Routes into BGP

Scenario:

  • A router (R1) has a static route for 192.168.100.0/24 and runs BGP.
  • The static route needs to be redistributed into BGP to advertise to external peers.

Configuration on R1:

ip route 192.168.100.0 255.255.255.0 10.1.1.1 ! router bgp 65001 redistribute static neighbor 10.2.2.2 remote-as 65002

  • redistribute static: Redistributes all static routes into BGP.
  • Result: BGP advertises 192.168.100.0/24 to its neighbor (10.2.2.2).
  • BGP Table on Neighbor: textCopyNetwork Next Hop Metric LocPrf Weight Path *> 192.168.100.0 <R1> 0 0 65001 i

Best Practices for Route Redistribution

  1. Use Route Maps: Filter routes to redistribute only what’s necessary.
  2. Set Appropriate Metrics: Ensure metrics align with the target protocol’s scale to avoid suboptimal routing.
  3. Prevent Loops:
    • Use route tags to mark redistributed routes and block them from being redistributed back.
    • Apply access lists or prefix lists for precise control.
  4. Monitor Redistribution:
    • Use show ip route to verify redistributed routes.
    • Check for unexpected routes or loops.
  5. Consider Administrative Distance: Ensure redistributed routes don’t override preferred routes unless intended.
  6. Document Changes: Redistribution can impact the entire network, so document configurations and test thoroughly.

Common Issues and Troubleshooting

  • Missing Routes: Check if metrics are set correctly or if filters are too restrictive.
  • Routing Loops: Verify route tags and filters to ensure routes aren’t redistributed back into the source protocol.
  • Suboptimal Paths: Adjust metrics or use route maps to prefer better paths.
  • High CPU Usage: Redistribution can be resource-intensive; limit the number of redistributed routes.

Summary

Route redistribution enables connectivity across different routing domains by sharing routes between protocols. It requires careful planning to set metrics, prevent loops, and filter routes. Using tools like route maps and understanding AD ensures efficient and stable routing. The examples above (OSPF to EIGRP, EIGRP to OSPF, mutual OSPF-RIP, and static to BGP) illustrate practical applications in Cisco environments.

If you want a deeper dive into specific configurations (e.g., Juniper, Arista), troubleshooting commands, or advanced scenarios like redistribution with route tags, let me know!

Leave a Reply