On a Cisco 3850 acting as network core, I have a global routing table with a single default next hop :
S* 0.0.0.0/0 [1/0] via 188.8.131.52
On that 3850 I have 2 interface vlans like :
interface Vlan1 ip address 10.1.1.1 255.255.255.0 ! interface Vlan2 ip address 184.108.40.206 255.255.255.0
VLAN2 is using the default route to access the WAN.
I want VLAN1 to use a different default route (10.1.1.254) to access another WAN.
I tried to set up PBR with ip default next-hop to do so.
According to Cisco.com, "the set ip default next-hop command verifies the existence of the destination IP address in the routing table, and…
- if the destination IP address exists, the command does not policy route the packet, but forwards the packet based on the routing table.
- if the destination IP address does not exist, the command policy routes the packet by sending it to the specified next hop.
The configuration was this :
access-list 100 permit ip 10.1.0.0 0.0.0.255 any ! route-map VLAN1-Traffic permit 10 match ip address 100 set ip default next-hop 10.1.1.254 ! interface vlan 1 ip policy route-map VLAN1-Traffic
In theory, if VLAN1 tried to reach VLAN2, it should be able to do so by using the routing table (connected routes). For any other IP address, it should be routed using PBR to the next-hop of 10.1.1.254.
However, when I applied that configuration on my 3850, connectivity between VLAN1 and VLAN2 was lost, as if only the PBR route was applied.
When I deleted that route-map, connectivity was restored.
Is there anything I'm missing regarding that issue?