Social Icons

Tuesday, May 13, 2014

CCNP ROUTE: 6. IPv6 Redistribution

Some differences exist between IPv4 and IPv6 route redistribution:
- Any matching done with distribution lists or route maps would use IPv6 prefix lists and IPv6 ACLs, which match based on IPv6 prefix and length.
- The IPv6 version of the redistribute command takes only routes learned from an IGP but by default does not take connected routes on interfaces enabled for that IGP. To also redistribute those connected routes, the redistribute command must include the include-connected parameter. When an IPv4 routing protocol redistributes from an IGP, it always attempts to take both the IGP-learned routes and the connected routes for interfaces enabled for that IGP.
- Unlike OSPFv2, OSPFv3 does not require a subnets parameter on the redistribute command, because IPv6 does not maintain the IPv4 concept of classful networks and the subnets inside those classful networks.
- IPv6 redistribution ignores the “local” routes in the IPv6 routing table (the /128 host routes for a router’s own interface IPv6 addresses). IPv4 has no equivalent concept.

Note: The same basic mechanisms exist in IPv6 to defeat routing loop problems: administrative distance, route tags and filtering.

Let's consider routers R1, R3, R6 and R7. R1 and R3 will be configured with RIPng. R3, R6 and R7 will be configured with OSPFv3. R3 will be the ASBR on which the redistribution takes place.

Note: We already have ipv6 routing enabled and IPv6 addresses configured on each interface.
!
ipv6 unicast-routing
!

RIPng configuration:

R1(config)#ipv6 router rip r1r3rip
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 rip r1r3rip enable            
R1(config)#interface serial 0/1
R1(config-if)#ipv6 rip r1r3rip enable

R3(config)#ipv6 router rip r3r1rip
R3(config)#interface fastEthernet 0/1
R3(config-if)#ipv6 rip r3r1rip enable

As a verification, we can check if R3 has learned the 2002::/64 subnet between R1 and R4 via RIPng:

R3#show ipv6 route rip
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R   2002::/64 [120/2]
     via FE80::C201:12FF:FE0C:0, FastEthernet0/1
   
OSPF configuration:

R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 3.3.3.3

R6(config)#ipv6 router ospf 1
R6(config-rtr)#router-id 6.6.6.6

R7(config)#ipv6 router ospf 1
R7(config-rtr)#router-id 7.7.7.7

R3(config)#interface serial 0/0
R3(config-if)#ipv6 ospf 1 area 0

R6(config)#interface fastEthernet 0/0
R6(config-if)#ipv6 ospf 1 area 0
R6(config)#interface serial 0/0
R6(config-if)#ipv6 ospf 1 area 0

R7(config)#interface fastEthernet 0/0
R7(config-if)#ipv6 ospf 1 area 0

The expected OSPF neighborships are formed:

R6#show ipv6 ospf neighbor

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
3.3.3.3           1   FULL/  -        00:00:36    6               Serial0/0
7.7.7.7           1   FULL/DR         00:00:38    4               FastEthernet0/0

Before any redistribution being configured, R3 knows about its connected and local subnets, about the 2002::/64 subnet via RIPng and about the 2003:0:0:1::/64 (R6-R7) subnet via OSPFv3.

R3#show ipv6 route
IPv6 Routing Table - 10 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C   2000:0:0:2::/64 [0/0]
     via ::, FastEthernet0/1
L   2000:0:0:2::2/128 [0/0]
     via ::, FastEthernet0/1
C   2000:0:0:3::/64 [0/0]
     via ::, FastEthernet0/0
L   2000:0:0:3::2/128 [0/0]
     via ::, FastEthernet0/0
R   2002::/64 [120/2]
     via FE80::C201:12FF:FE0C:0, FastEthernet0/1
C   2003::/64 [0/0]
     via ::, Serial0/0
L   2003::1/128 [0/0]
     via ::, Serial0/0
O   2003:0:0:1::/64 [110/74]
     via FE80::C205:13FF:FEE8:0, Serial0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0

R1, R6 and R7 know nothing about subnets beyond R3.

1) Redistributing without Route Maps

R3(config)#ipv6 router rip r3r1rip
R3(config-rtr)#redistribute ospf 1 include-connected metric 3

R3(config)#ipv6 router ospf 1
R3(config-rtr)#redistribute rip r3r1rip include-connected


Now, R1 knows about subnets 2003::/64 and 2003:0:0:1::/64 from R3, both being redistributed from OSPFv3.

R1#show ipv6 route
IPv6 Routing Table - 10 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C   2000:0:0:1::/64 [0/0]
     via ::, Serial0/0
L   2000:0:0:1::1/128 [0/0]
     via ::, Serial0/0
C   2000:0:0:2::/64 [0/0]
     via ::, FastEthernet0/0
L   2000:0:0:2::1/128 [0/0]
     via ::, FastEthernet0/0
C   2002::/64 [0/0]
     via ::, Serial0/1
L   2002::1/128 [0/0]
     via ::, Serial0/1
R   2003::/64 [120/4]
     via FE80::C203:12FF:FE0C:1, FastEthernet0/0
R   2003:0:0:1::/64 [120/4]
     via FE80::C203:12FF:FE0C:1, FastEthernet0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
   
Likewise, R7 learned about subnets 2000:0:0:2::/64 and 2002::/64 from R3, both being redistributed from RIPng.

R7#show ipv6 route
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OE2  2000:0:0:2::/64 [110/20]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
OE2  2002::/64 [110/20]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
O   2003::/64 [110/74]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
C   2003:0:0:1::/64 [0/0]
     via ::, FastEthernet0/0
L   2003::1:C206:13FF:FEE8:0/128 [0/0]
     via ::, FastEthernet0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
   
Note: OSPF metrics will often be more than the maximum usable RIP metric of 15, making these routes instantly unusable in RIP.
Redistributing from EIGRP into RIP would not work either, given the relatively large integer metrics calculated by EIGRP.
So when redistributing into RIP, change the configuration to set the metric.
For instance, using the command redistribute ospf 1 include-connected metric 3.

In our case, R3 had a metric of 74 to reach the 2003:0:0:1::/64 subnet, which is far greater than the maximum usable RIP metric of 15. That's why without the "metric 3" addition, R3 wouldn't advertise this subnet into RIPng.

R3#show ipv6 route 2003:0:0:1::/64 | i 2003
O   2003:0:0:1::/64 [110/74]

2) Redistributing with Route Maps

Continuing with the configurations made above, we can apply route-maps to the redistribution process to filter routes or set metrics.
For example, considering the RIPng routes being redistributed into OSPFv3 (OE2 2000:0:0:2::/64 and OE2 2002::/64), let's say we want to set a metric of 100 to the first route and filter the second route.
We should see the results on either R6 or R7.

Currently (before filtering is applied):
R7#show ipv6 route
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OE2  2000:0:0:2::/64 [110/20]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
OE2  2002::/64 [110/20]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
O   2003::/64 [110/74]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
C   2003:0:0:1::/64 [0/0]
     via ::, FastEthernet0/0
L   2003::1:C206:13FF:FEE8:0/128 [0/0]
     via ::, FastEthernet0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
   
Configuration on ASBR R3:

R3(config)#ipv6 prefix-list set-100 seq 10 permit 2000:0:0:2::/64
R3(config)#route-map set-and-filter-rip permit 10
R3(config-route-map)#match ipv6 address prefix-list set-100
R3(config-route-map)#set metric 100

R3(config)#ipv6 router ospf 1                    
R3(config-rtr)#redistribute rip r3r1rip route-map set-and-filter-rip include-connected


Checking after filtering was applied:

R7#show ipv6 route
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OE2  2000:0:0:2::/64 [110/100]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
O   2003::/64 [110/74]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
C   2003:0:0:1::/64 [0/0]
     via ::, FastEthernet0/0
L   2003::1:C206:13FF:FEE8:0/128 [0/0]
     via ::, FastEthernet0/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
   
Indeed the first route now has a metric of 100 and the second route was filtered (due to the implicit deny at the end of the route-map).

Note: OSPFv3 lists the routes as OSPF external Type 2, because just like OSPFv2, OSPFv3 defaults to redistribute routes as external Type 2 routes. Note also that the output lists the metric for the route as 100, because R3 set the metric to 100 and OSPF does not add anything to the metric of E2 routes.

Additional verification commands:

R3#show ipv6 prefix-list
ipv6 prefix-list set-100: 1 entries
   seq 10 permit 2000:0:0:2::/64
  
R3#show route-map
route-map set-and-filter-rip, permit, sequence 10
  Match clauses:
     ipv6 address prefix-list set-100
  Set clauses:
    metric 100
  Policy routing matches: 0 packets, 0 bytes
 
R7#show ipv6 route | s OE2
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
OE2  2000:0:0:2::/64 [110/100]
     via FE80::C205:13FF:FEE8:0, FastEthernet0/0
   
R1#show ipv6 route | s R
IPv6 Routing Table - 10 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R   2003::/64 [120/4]
     via FE80::C203:12FF:FE0C:1, FastEthernet0/0
R   2003:0:0:1::/64 [120/4]
     via FE80::C203:12FF:FE0C:1, FastEthernet0/0

No comments:

Post a Comment