Wednesday, October 9, 2013

IPv6 Routing Example #1





R1
interface Loopback0
ipv6 address 2001::1/128
 ipv6 ospf 1 area 0

interface Loopback1
ipv6 address 2001:DB8::1/128
 ipv6 ospf 1 area 0

interface FastEthernet0/0
 ipv6 address 2001:192:12::1/64
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0

ipv6 router ospf 1
 router-id 1.1.1.1

R2

interface Loopback0
ipv6 address 2001::2/128
 ipv6 ospf 1 area 0

interface Loopback1
ipv6 address 2001:DB8::2/128
 ipv6 ospf 1 area 0

interface FastEthernet0/0
ipv6 address 2001:192:12::2/64
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0

interface FastEthernet0/1
ipv6 address 2001:192:23::2/64
 ipv6 rip RIPng enable

ipv6 router ospf 1
 router-id 2.2.2.2
redistribute rip RIPng include-connected

ipv6 router rip RIPng
 redistribute ospf 1 include-connected

R3

interface Loopback0
 ipv6 address 2001::3/128
 ipv6 rip RIPng enable

interface Loopback1
ipv6 address 2001:DB8::3/128
 ipv6 rip RIPng enable

interface FastEthernet0/0
ipv6 address 2001:192:23::3/64
 ipv6 rip RIPng enable

interface FastEthernet0/1
ipv6 address 2001:192:34::3/64

ipv6 router rip RIPng
 redistribute bgp 300

router bgp 300
bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 2001:192:34::4 remote-as 400
address-family ipv6
  neighbor 2001:192:34::4 activate
  redistribute rip RIPng include-connected

R4
interface Loopback0
ipv6 address 2001::4/128

R4#sh run int lo1
interface Loopback1
 no ip address
 ipv6 address 2001:DB8::4/128

interface FastEthernet0/0
ipv6 address 2001:192:34::4/64

router bgp 400
bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2001:192:34::3 remote-as 300
address-family ipv6
  neighbor 2001:192:34::3 activate
  network 2001::4/128
  network 2001:DB8::4/128


Tasks

Filter the prefix 2001:DB8::1/128 from being installed in R2 routing table

ipv6 prefix-list MSSK seq 5 deny 2001:DB8::1/128
ipv6 prefix-list MSSK seq 10 permit ::/0 le 128
 
ipv6 router ospf 1
distribute-list prefix-list MSSK in FastEthernet0/0
 
R2#sh ipv6 route ospf 
IPv6 Routing Table - 12 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
O   2001::1/128 [110/10]
     via FE80::C000:74FF:FEF5:0, FastEthernet0/0
 
Assign a metric of 5 to the prefix 2001::1/128 when propagated to the RIP domain
 
ipv6 prefix-list METRIC seq 5 permit 2001::1/128
 
route-map MAP permit 10
 match ipv6 address prefix-list METRIC
 set metric 5
route-map MAP permit 20
 
 
R2(config-route-map)#ipv6 router rip RIPng
R2(config-rtr)#redistribute ospf 1 route-map MAP include-connected
 
R3#sh ipv6 route rip 
IPv6 Routing Table - 13 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001::1/128 [120/6]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001::2/128 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001:192:12::/64 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001:DB8::2/128 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
 
On R3 assign the 2001:DB8::2/128 prefix a weight of 16384
 
R3(config)#ipv6 prefix-list WEIGHT seq 5 permit 2001:DB8::2/128
 
R3(config)#route-map MAP1 permit 10
R3(config-route-map)#match ipv6 address prefix-list WEIGHT
R3(config-route-map)#set weight 16384
R3(config-route-map)#route-map MAP1 permit 20
 
R3(config-route-map)#router bgp 300
R3(config-router)#address-family ipv6 
R3(config-router-af)#redistribute rip RIPng include-connected route-map MAP1
 
R3#sh bgp ipv6 unicast 
BGP table version is 14, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*> 2001::1/128      ::                       6         32768 ?
*> 2001::2/128      ::                       2         32768 ?
*> 2001::3/128      ::                       0         32768 ?
*> 2001::4/128      2001:192:34::4           0             0 400 i
*> 2001:192:12::/64 ::                       2         32768 ?
*> 2001:192:23::/64 ::                       0         32768 ?
*> 2001:DB8::2/128  ::                       2         16384 ?
*> 2001:DB8::3/128  ::                       0         32768 ?
*> 2001:DB8::4/128  2001:192:34::4           0             0 400 i

No comments:

Post a Comment