Command Reference Protocol-independent Configuration Commands
match ip next-hop {access-list-number [access-list-number... | access-list-name...] |access-list-name
[access-list-number...|access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}
no match ip next-hop [access-list-number [access-list-number... | access-list-name...]
|access-list-name [access-list-number...|access-list-name] | prefix-list prefix-list-name
[prefix-list-name...]]
Number of the access list
prefix-list prefix-list-name
Specify the prefix list to match.
Route map configuration mode.
Multiple access list numbers or names may follow match ip next-hop.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.
In the example below, the OSPF routing protocol redistributes the RIP routes. As long as the next hop
address of the RIP route matches the access list 10 or 20, the OSPF allows for redistribution.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network 192.168.12.0 0.0.0.255 area 0
Ruijie(config-router)# exit
Ruijie(config)# access-list 10 permit host 192.168.10.1
Ruijie(config)# access-list 20 permit host 172.16.20.1
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip next-hop 10 20
Match the IP address in the access list.
Match the next-hop interface of the route.
Match the route source address in the access list.