Cisco Router IOS XR Spécifications Page 377

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 446
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 376
Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy on Cisco IOS XR Software
RC-363
Cisco IOS XR Routing Configuration Guide
router /jointfilesconvert/455219/bgp 2
address-family ipv4 unicast
network 172.16.0.5/27 route-policy NetworkControl
Redistribute
The redistribute attach point allows routes from other sources to be advertised by BGP. The policy
attached at this point is able to set any of the valid BGP attributes on the routes that are being
redistributed. Likewise, selection operators allow a user to control what route sources are being
redistributed and which routes from those sources.
The following example shows how to redistribute all routes from OSPF instance 12 into BGP. If OSPF
were carrying a default route, it is dropped. Routes carrying a tag of 10 have their local preference set
to 300 and the community value of 2:666 and no-advertise attached. All other routes have their local
preference set to 200 and a community value of 2:100 set.
route-policy sample_redistribute
if destination in (0.0.0.0/0) then
drop
endif
if tag eq 10 then
set local-preference 300
set community (2:666, no-advertise)
else
set local-preference 200
set community (2:100)
endif
end-policy
router /jointfilesconvert/455219/bgp 2
address-family ipv4 unicast
redistribute ospf 12 route-policy sample_redistribute
.
.
Show BGP
The show /jointfilesconvert/455219/bgp attach point allows the user to display selected BGP routes that pass the given policy. Any
routes that are not dropped by the attached policy are displayed in a manner similar to the output of the
show /jointfilesconvert/455219/bgp command.
In the following example, the show /jointfilesconvert/455219/bgp route-policy command is used to display any BGP routes
carrying a MED of 5:
route-policy sample-display
if med eq 5 then
pass
endif
end-policy
!
show /jointfilesconvert/455219/bgp route-policy sample-display
A show /jointfilesconvert/455219/bgp policy route-policy command also exists, which runs all routes in the RIB past the named
policy as if the RIB were an outbound BGP policy. This command then displays what each route looked
like before it was modified and after it was modified, as shown in the following example:
RP/0/RP0/CPU0:router# show rpl route-policy test2
route-policy test2
if (destination in (10.0.0.0/8 ge 8 le 32)) then
set med 333
Vue de la page 376
1 2 ... 372 373 374 375 376 377 378 379 380 381 382 ... 445 446

Commentaires sur ces manuels

Pas de commentaire