cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
568
Views
10
Helpful
5
Replies

Change Default Gateway for Certain VLAN

Mokhalil82
Level 4
Level 4

Hi

 

I have a test subnet on vlan 100 and I want it to use a different default gateway instead of following the default route. 

I have a 3560G with IPBase. Tried PBR but it does not accept the Policy command in the vlan interface so after research it seems it is not supported.

IIs there any other way of doing this

 

Thanks

2 Accepted Solutions

Accepted Solutions

Bilal Nawaz
VIP Alumni
VIP Alumni

PBR does work on 3560's - im not sure but you might need the ipservices and change the SDM template to prefer routing. Current can be show by "show sdm prefer" command.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

View solution in original post

Jon Marshall
Hall of Fame
Hall of Fame

Not really no.

The other way would be to use VRF-Lite but that also requires an IP Services license on your switch.

The only thing you can really do is place the default gateway in the same IP subnet and then change the default gateway on the hosts.

Edit - sorry if I wasn't clear. As Bilal says PBR is supported but as I mentioned above you need the IP Services license.

Jon

View solution in original post

5 Replies 5

Bilal Nawaz
VIP Alumni
VIP Alumni

PBR does work on 3560's - im not sure but you might need the ipservices and change the SDM template to prefer routing. Current can be show by "show sdm prefer" command.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Jon Marshall
Hall of Fame
Hall of Fame

Not really no.

The other way would be to use VRF-Lite but that also requires an IP Services license on your switch.

The only thing you can really do is place the default gateway in the same IP subnet and then change the default gateway on the hosts.

Edit - sorry if I wasn't clear. As Bilal says PBR is supported but as I mentioned above you need the IP Services license.

Jon

Thanks guys

Please ignore the static route comment i made and removed

no, the static route will only instruct the router to send destination packets to that subnet to next hop IP 192.168.10.10. We want to match the source. Unless the 192.168.10 network is where you want to route to, then this will be the prefered route over the default, in which case yes, it will work, but for everything, not just vlan 100.

Maybe you could do a NAT with another device. Dont think NAT is supported on the 3560.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

As Bilal says no you can't because you need to route based on source IP and routing using the IP routing table is always done on destination IP.

The gateway is in the same IP subnet so you could manually change the host's gateway or if the firewall supports DHCP allocate the IPs from there.

Alternatively you could upgrade your license to IP Services but if this is temporary it may not be worth it.

Again, as Bilal says, NAT is not supported on those switches with any license.

Jon

Review Cisco Networking for a $25 gift card