DGS-6604
m
set ip next-hop
CLI Reference Guide
553
set ip next-hop
Use this command to set the next-hop to route the packets that pass a match
clause of a route map. Use the no command to remove the setting.
set ip next-hop
IP-ADDRESS
no set ip next-hop [
IP-ADDRESS
]
Default
Not configured
Command Mode
Route-map configuration
Usage Guideline
You can use this command to set the next hop to route the packets that pass a
match clause of a route map.
If other set clauses for policy based routing are used with the command, they will
be evaluated based on the following ordering:
1. set ip next-hop
2. set interface
3. set ip default next-hop
4. set default interface
With this ordering, the set next-hops clauses and the set interface clauses will be
evaluated before look up of the routing table. If route cannot be found for the
packets, the set ip default next-hop and set default interface command will be
evaluated.
Example
In the following example, PBR will change the next-hop setting when the source
ip is 10.1.1.0/24 and vlan is vlan100. We want to set next-hop of this route entry
to 120.1.2.2. The steps as follows:
At first, create an IP basic access list, named
Strict-Control
which permit prefix
10.1.1.0/24.
Secondly, create a route map, named
myPolicy
which define a match rule to
associate ip address prefix-list to the previously created access list,
Strict-
Control
.
Lastly, in Vlan Interface configuration mode set the conditionally redistributed to
previously created route-map,
myPolicy
.
Syntax Description
IP-ADDRESS
Specify the next hop to route the packet. The next hop must be an adjacent
router.