Thursday, June 14, 2012

Cisco ASA: How To Change The Default Gateway For Clients When Your ASA Is The DHCP Server

What do you do IF your Cisco ASA is the DHCP server for a network and you need a different default-gateway for your DHCP clients?  In my case, I needed the ASA to be the DHCP server, but I needed a layer 3 switch to be the default gateway for the clients.  You see, I had two vlans on the local network, and I needed the DHCP clients to be able to get to the other vlan.  But, I couldn't have those DHCP clients coming to the ASA first.  I needed them to go to the layer 3 switch (where the vlans resided) in order for the two to talk to each other.  Well, in the ASA DHCP config, you can change the default gateway for the clients to be something different than the ASA itself.  Here is the command you are looking for to make that happen.  Its the 'dhcpd option 3' command.  Here is my example to get this working:

ASA(config)# dhcpd option 3 ip 

This made my layer 3 switch the default-gateway for the clients instead of my ASA.  Works well.