Configuring Policy-Based Routing ip policy load-policy
8-48 Policy Classification Configuration
ip policy load-policy
UsethiscommandtoconfigurePBRnexthopbehavior.
Syntax
ip policy load-policy {[first-available] [round-robin] [ip-hash {sip | dip |
both}]}
no ip policy load-policy
Parameters
Defaults
Ifpingerisnotspecified,noneisconfigured.
Mode
Routercommand,Interfaceconfiguration:Matrix>Router(config‐if(Vlan<vlan_id>))#
Usage
Whenmorethanonenexthopisconfigured(usingthesetnexthopcommandasdescribedin“set
nexthop”onpage 8‐45)theloadpolicyspecifieschoosingonenexthopfromamongthesequence
ofnexthopsinthemapmatchingthecurrentpacket.Anexthopisconsidered
availablebydefault
unlessapingertaskisrunningandhasflaggeditasunavailable.
The“no”formofthiscommandresetsthenexthopbehaviortofirst‐available.
Example
ThisexampleshowshowtosettheloadpolicybehavioronVLAN1to“round‐robin”:
Matrix>Router(config)#interface vlan 1
Matrix>Router(config-if(Vlan 1))#ip policy load-policy round-robin
ip policy pinger
UsethiscommandtoconfigurebehaviorforpingingPBRnexthops.
Syntax
ip policy pinger {off | on [interval interval] [retries retries}
no ip policy pinger
Parameters
first‐available|
round‐robin|ip‐hash
sip|dip|both
Specifiesnexthopselectionbehavioras:
• first‐available(default)‐usesthefirstavailablenexthopfromthe
listofnexthops
• round‐robin‐circulatesamongtheavailablenexthopsinthe list.
• ip‐hashsip|dip|
both‐choosesanexthopbasedonaXORhash
oftheIPsourceaddress,theIPdestinationaddress,orboth.
off Turnspingoffsoallnexthopsareavailablebydefault.
on Startspingingallnext‐hopsintheroutemaplist.