422 CHAPTER 31: ROUTING POLICY CONFIGURATION
n
The apply ip-address next-hop command do not apply to redistributed IPv4 
routes.
Displaying and 
Maintaining the 
Routing Policy
Routing Policy 
Configuration 
Example
Applying Routing Policy
When Redistributing
IPv4 Routes
Network Requirements
■ Switch B exchanges routing information with Switch A via OSPF, with Switch C 
via IS-IS.
■ On Switch B, configure route redistribution from IS-IS to OSPF and apply a 
routing policy to set attributes of redistributed routes, setting the cost of route 
172.17.1.0/24 to 100, tag of route 172.17.2.0/24 to 20.
Set a next hop for IPv4 routes  apply ip-address next-hop 
ip-address 
Optional
Not set by default 
Redistribute routes to a 
specified ISIS level 
apply isis { level-1 | level-1-2 | 
level-2 } 
Optional
Not configured by default 
Set a local preference for BGP 
routes 
apply local-preference 
preference 
Optional
Not set by default 
Set an origin attribute for BGP 
routes 
apply origin { igp | egp 
as-number | incomplete } 
Optional
Not set by default 
Set a preference for the 
matched routing protocol 
apply preference preference Optional
Not set by default 
Set a preferred value for BGP 
routes 
apply preferred-value 
preferred-value 
Optional
Not set by default 
Set a tag value for RIP, OSPF 
or IS-IS routes 
apply tag value Optional
Not set by default
To do…  Use the command…  Remarks 
To do…  Use the command…  Remarks 
Display BGP AS path ACL 
information 
display ip as-path [ as-path-number ]  Available in any 
view 
Display BGP community list 
information 
display ip community-list 
[ basic-community-list-number | 
adv-community-list-number ]
Display BGP extended 
community list information 
display ip extcommunity-list 
[ ext-comm-list-number ]
Display IPv4 prefix list 
statistics 
display ip ip-prefix [ ip-prefix-name ]
Display routing policy 
information 
display route-policy 
[ route-policy-name ]
Clear IPv4 prefix list statistics  reset ip ip-prefix [ ip-prefix-name ]  Available in user 
view