Route Redistribution
Problem
You appetite to redistribute IPv6 routes amid acquisition protocols.
Solution
First, we will appearance an archetype of redistributing from OSPF into RIPv6:
Router1#configure terminal
Enter agreement commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 router rip RIP_PROC
Router1(config-rtr)#redistribute ospf 1 metric 5
Router1(config-rtr)#exit
Router1(config)#end
Router1#
And actuality is an archetype assuming redistribution of RIPv6 into OSPF:
Router1#configure terminal
Enter agreement commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#redistribute rip RIP_PROC
Router1(config-rtr)#exit
Router1(config)#end
Router1#
You can acquaint a absence avenue with OSPF by application the default-information arise command:
Router1#configure terminal
Enter agreement commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#default-information arise consistently
Router1(config-rtr)#exit
Router1(config)#end
Router1#
Discussion
Both of these examples appearance a basal agreement for redistributing from one acquisition agreement into another. In a moment we will appearance some added adult examples, but these examples appearance the basal requirements. In the aboriginal example, we redistribute OSPF routes into RIP:
Router1(config)#ipv6 router rip RIP_PROC
Router1(config-rtr)#redistribute ospf 1 metric 5
Note that, in this example, we accept somewhat arbitrarily set a absence metric for RIP to use for all of these redistributed routes. This is because, by default, RIP will attack to use the absolute avenue metric from OSPF. If we attending at the OSPF acquisition table on this router, you can see that abounding of the routes that we appetite to use in the RIP ancillary of the arrangement accept metrics that are greater than 15:
Router1#show ipv6 avenue ospf
IPv6 Acquisition Table - 16 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
O AAAA:F::AA:1/128 [110/1]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::9:0/112 [110/2]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::A:0/112 [110/151]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::B:0/112 [110/163]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::C:0/112 [110/20]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::D:0/112 [110/893]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
OI AAAA:99::E:0/112 [110/2]
via FE80::20E:D7FF:FED6:1060, FastEthernet0/0
Router1#
If we don't accommodate the metric keyword aback redistributing, again none of these routes arise on a after RIP router because their metrics are all too large:
Router9#show ipv6 avenue rip
IPv6 Acquisition 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 AAAA:F::AA:1/128 [120/2]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::9:0/112 [120/3]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::E:0/112 [120/3]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
Router9#
However, if we aloof set all of these alien routes to accept the aforementioned absence metric of 5, again we see all of the OSPF routes:
Router9#show ipv6 avenue rip
IPv6 Acquisition Table - 14 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 AAAA:F::AA:1/128 [120/2]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::9:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::A:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::B:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::C:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::D:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::E:0/112 [120/6]
via FE80::20E:D7FF:FED6:4D80, Ethernet0
Router9#
In the additional example, we do a simple redistribution of RIP into OSPF:
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#redistribute rip RIP_PROC
Here we can use the absence agreement and get advantageous results. On a after OSPF router, you can see that we now accept alien OSPF routes:
Router2#show ipv6 avenue ospf
IPv6 Acquisition Table - 22 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 AAAA:FE::/64 [110/20]
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
O AAAA:2222::2/128 [110/1]
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
Router2#
As we ahead saw in Chapter 8 aback talking about IPv4 OSPF, the absence for redistributed routes in OSPF is blazon 2 external. This blazon of avenue is consistently advised worse than any centralized route, and worse than any alien avenue of blazon 1. The metric for an OSPF blazon 2 alien avenue is the aforementioned everywhere in the network. We could accept to redistribute all RIP routes into OSPF by artlessly allegorical the metric-type keyword on the redistribute command:
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#redistribute rip RIP_PROC metric-type 1
Now the after OSPF router shows this avenue as follows:
Router2#show ipv6 avenue ospf
IPv6 Acquisition Table - 22 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
OE1 AAAA:FE::/64 [110/21]
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
O AAAA:2222::2/128 [110/1]
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
Router2#
When application avenue redistribution, we about like to use avenue tags for the alien routes. This is artlessly an approximate cardinal associated with the acquisition prefix that gets agitated with the avenue throughout the free system. Avenue tags accept several applications, but the best accepted one is to artlessly baptize the free arrangement abuttals router area this alien avenue originated. If you accept addition router affiliated to the aforementioned alien network, again you can use this avenue tag advice to ensure that you don't redistribute the aforementioned avenue aback into the aboriginal network.
You can specify a tag on the redistribute command aback redistributing into OSPF:
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#redistribute rip RIP_PROC metric-type 1 tag 123
This will affect all routes advancing from this RIP process. The tag is arresting in the after acquisition table:
Router2#show ipv6 avenue ospf
IPv6 Acquisition Table - 22 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
OE1 AAAA:FE::/64 [110/21], tag 123
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
O AAAA:2222::2/128 [110/1]
via FE80::20E:D7FF:FED6:4D80, FastEthernet0/0
Router2#
Specifying a avenue tag in RIPv6 is a little bit added complicated because it requires a route-map:
Router1(config)#route-map OSPF-2-RIP admittance 10
Router1(config-route-map)#set tag 555
Router1(config-route-map)#exit
Router1(config)#ipv6 router rip RIP_PROC
Router1(config-rtr)#redistribute ospf 1 metric 5 route-map OSPF-2-RIP
Now the redistributed OSPF routes all arise in the acquisition table of a after RIP accessory with this tag:
Router9#show ipv6 avenue rip
IPv6 Acquisition Table - 14 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 AAAA:F::AA:1/128 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::9:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::A:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::B:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::C:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::D:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::E:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
Router9#
With route-maps you can additionally assemble added complicated examples. Application the bout command in the route-map, you could, for example, set altered tag ethics for altered avenue prefixes:
Router1(config)#ipv6 prefix-list special-prefixes admittance AAAA:99::A:0/112
Router1(config)#ipv6 prefix-list special-prefixes admittance AAAA:99::B:0/112
Router1(config)#ipv6 prefix-list ANY-IPv6 admittance ::/0 le 128
Router1(config)#route-map OSPF-2-RIP admittance 5
Router1(config-route-map)#match ipv6 abode prefix-list special-prefixes
Router1(config-route-map)#set tag 321
Router1(config-route-map)#exit
Router1(config)#route-map OSPF-2-RIP admittance 10
Router1(config-route-map)#match ipv6 abode prefix-list ANY-IPv6
Router1(config-route-map)#set tag 555
Router1(config-route-map)#exit
Router1(config)#ipv6 router rip RIP_PROC
Router1(config-rtr)#redistribute ospf 1 metric 5 route-map OSPF-2-RIP
Now our after RIP router has two altered tag values:
Router9#show ipv6 avenue rip
IPv6 Acquisition Table - 14 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 AAAA:F::AA:1/128 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::9:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::A:0/112 [120/6], tag 321
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::B:0/112 [120/6], tag 321
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::C:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::D:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
R AAAA:99::E:0/112 [120/6], tag 555
via FE80::20E:D7FF:FED6:4D80, Ethernet0
Router9#
The final archetype in the Solution area of this compound shows how to acquaint a absence avenue with OSPF. Recall that in IPv4, a absence avenue is accounting as 0.0.0.0/0that is, an abode of all zeroes with a prefix-length of zero. In IPv6 the absence avenue follows the aforementioned formula, it is an abode of all zeroes and a prefix-length of zero. Since the IPv6 acclamation rules acquiesce us to alter the longest cord of zeroes with two colons, "::", it follows that an IPv6 abode consisting of alone zeroes can be accounting as ::/0.
We can inject a absence avenue into OSPF by application the default-originate command, aloof as we ahead saw in OSPFv2 for IPv4:
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#default-information arise consistently
Then, on a after router, we see that this absence avenue is, by default, an alien avenue of blazon 2:
Router2#show ipv6 avenue ospf
IPv6 Acquisition Table - 15 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 ::/0 [110/1], tag 1
via FE80::20E:D7FF:FED6:1060, Serial0/0
OI AAAA:99::9:0/112 [110/65]
via FE80::20E:D7FF:FED6:1060, Serial0/0
R2011#
There are several advantageous options on the default-information arise command. If you appetite to acquaint this avenue with some added metric, or as a blazon 1 alien route, you artlessly add the metric and metric-type keywords to the command as follows:
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#default-information arise consistently metric 15 metric-type 1
And, by advertence the absence avenue with a route-map, you can force this router to alone acquaint itself as a accurate absence if it sees assertive added routes in its acquisition table:
Router1(config)#ipv6 prefix-list OUTSIDE-WORLD seq 5 admittance AAAA:99::0/112
Router1(config)#route-map DEFAULT-VALID admittance 10
Router1(config-route-map)#match ipv6 abode prefix-list OUTSIDE-WORLD
Router1(config-route-map)#exit
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#default-information arise route-map DEFAULT-VALID
Router1(config-rtr)#exit
Here we accept authentic a route-map that uses a prefix-list to bout on a accurate alien arrangement prefix. If this prefix is present in the acquisition table, again we apperceive that this router's aperture to the alfresco apple is working, and it is safe to acquaint a absence route.