We have Cisco nexus 9396PX and we run PBR on it. We want to send all traffic trough this route but it sends those traffic which is not learned in another routing protocol like BGP.

In IOS we can use "set ip next-hop default" but in this type of device this command is not available.

Do you have any experience about this case?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Commented Nov 19, 2022 at 22:57

2 Answers 2


Here is the documentation on the Nexus 9000 series for IP Routing, and specifically for Policy Based Routing.


Some of the commands are slightly different from IOS but mostly similar. Make sure your switch is updated before you try to use the commands, if the NX-OS release is too old, it may not support the features you need. You may also have to enable the feature for ip routing.


ip route <gateway> should work. If it doesn't please add the running config to your question, so we can pinpoint the problem. Make sure you add enough context so we can understand the intentions.

Note that longer-prefix routes generally take precedence over the default route. If you don't want that you'd need to remove those routes.

PBR is a special form of routing where you route by source address or protocol/L4 port instead of the normal destination address.

  • I need to route based on Source but in this device I cannot route all traffic from specific IP source and route those Ranges which is not in routing table only. (like default gateway) Commented Aug 30, 2022 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.