Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

Policy-based routing based on two conditions

Right now, I have a route-map that has a basic ACL that identifies some traffic based on source address and sets a next hop. Now I have to allow those source address to have access to one of my WAN links and only one before setting the next hop. I want to base the destination on an AS number rather than a defined list of definations. What is the best way to do that?

I looked at the set ip default next-hop, but that only applies to replacing the default route

Everyone's tags (2)
Cisco Employee

Re: Policy-based routing based on two conditions


Just want to make sure I get your requirements. You current PBR is based on IP source and set next hop to IP A; now you need change traffic that match source and destination, and set next hop to IP B, the rest to IP A?

Lei Tian
Sent from Cisco Technical Support iPhone App

Community Member

Re: Policy-based routing based on two conditions

My traffic for this subnet was always set to IP B. I have a direct WAN link to a partner now that they need access to also, but I still want their general internet traffic to go IP B. The Partner WAN wan link is a BGP connection, so I would liketo define traffic by BGP attribute or something rather than specific destintion routes because they may add new networks in the fiture.

Community Member

Re: Policy-based routing based on two conditions

Is your partner advertising complete routes to you? If yes, then retain your PBR and add another sequence of the same PBR to permit any without manipulating the next hop and make sure to block "default route" if ever your partner is advertising one. Then configure the "default route" to point into your other WAN link.

Access List SUBNETS

permit subnet 1

permit subnet 2

permit subnet 3


route-map PBR permit 10

match ip add SUBNETS

set next-hop [WAN Link IP]


route-map PBR permit 20


interface [LAN Interface]

ip policy route-map PBR in


BGP routes all point to Partner WAN Link IP

Default route pointing to WAN Link IP

CreatePlease to create content