Friday, February 21, 2020

How to configure IPv6 Redistribution RIPNG OSPFv3

Redistribution for IPv6 is pretty much the same as for IPv4, the same rules apply. I want to show you an example of IPv6 redistribution between RIPNG and OSPFv3. Here’s the topology that we will use:
ipv6 redistribution ripng ospfv3
In the middle we have router R2 that will perform the redistribution between RIPNG and OSPFv3. R1 and R3 have a loopback interface that will be advertised.
R1(config)#ipv6 unicast-routing 
R1(config)#interface loopback 0
R1(config-if)#ipv6 address 2001::1/128
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 enable
R2(config)#ipv6 unicast-routing 
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 enable 
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ipv6 enable
R3(config)#ipv6 unicast-routing 
R3(config)#interface loopback 0
R3(config-if)#ipv6 address 2001::3/128
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ipv6 enable
This is what we’ll start with. I’m using the loopbacks to have something to advertise in RIPNG or OSPFv3. On the FastEthernet interfaces I only need a link-local IPv6 address.
R2(config)#ipv6 router rip RIPNG
R2(config-rtr)#exit 
R2(config)#interface fastEthernet 0/0
R2(config-if)#ipv6 rip RIPNG enable
R1(config)#ipv6 router rip RIPNG
R1(config-rtr)#exit
R1(config)#interface loopback 0
R1(config-if)#ipv6 rip RIPNG enable 
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ipv6 rip RIPNG enable 
I’m configuring RIPNG on R2 and R1 to get things going.
R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 3.3.3.3
R3(config-rtr)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ipv6 ospf 1 area 0
R3(config-if)#interface loopback 0
R3(config-if)#ipv6 ospf 1 area 0  
R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 2.2.2.2
R2(config-rtr)#exit 
R2(config)#interface fastEthernet 1/0
R2(config-if)#ipv6 ospf 1 area 0
And this is what we need on R3 and R2 to get OSPFv3 working.
R2(config)#ipv6 router ospf 1
R2(config-rtr)#redistribute rip RIPNG
R2(config-rtr)#exit
R2(config)#ipv6 router rip RIPNG
R2(config-rtr)#redistribute ospf 1 metric 1
We use the redistribute command to exchange routing information between OSPFv3 and RIPNG. This is all you have to do to redistribute everything.
R1#show ipv6 route rip
IPv6 Routing Table - 4 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   2001::3/128 [120/2]
     via FE80::CE04:19FF:FE67:0, FastEthernet0/0
R3#show ipv6 route ospf 
IPv6 Routing Table - 4 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  2001::1/128 [110/20]
     via FE80::CE04:19FF:FE67:10, FastEthernet0/0
We can verify our configuration by looking at the routing tables. If you want you can be a bit more specific with redistribution using route-maps:
R2(config)#ipv6 router rip RIPNG
R2(config-rtr)#redistribute ospf 1 route-map ONLYTHESE
R2(config-rtr)#exit

R2(config)#ipv6 prefix-list MYPREFIXES permit 2001::3/128

R2(config)#route-map ONLYTHESE permit 10
R2(config-route-map)#match ipv6 address prefix-list MYPREFIXES
Using a route-map and a prefix-list like in the example above I can select only the prefixes that I want redistributed. This is a better solution than just redistributing everything.
hostname R2
!
ipv6 unicast-routing
!
interface fastEthernet 0/0
 ipv6 enable 
 ipv6 rip RIPNG enable
!
interface fastEthernet 1/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router rip RIPNG
 redistribute ospf 1 metric 1
 redistribute ospf 1 route-map ONLYTHESE
!
ipv6 prefix-list MYPREFIXES permit 2001::3/128
!
route-map ONLYTHESE permit 10
 match ipv6 address prefix-list MYPREFIXES
!
ipv6 router ospf 1
 router-id 2.2.2.2
 redistribute rip RIPNG
!
end
hostname R3
!
ipv6 unicast-routing
!
interface loopback 0
 ipv6 address 2001::3/128
 ipv6 ospf 1 area 0  
!
interface fastEthernet 0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 3.3.3.3
!
end
hostname R1
!
ipv6 unicast-routing
!
interface loopback 0
 ipv6 address 2001::1/128
 ipv6 rip RIPNG enable 
!
interface fastEthernet 0/0
 ipv6 enable
 ipv6 rip RIPNG enable 
!
ipv6 router rip RIPNG
!
end
I hope this example is useful to you, if you have any questions feel free to leave a comment!

No comments:

Post a Comment