06-07-2022 07:26 AM
I currently have a 3560-CX switch for a small network. I'm lab'ing up a configuration in preparation for an install and I've run into a unique issue. The switch is acting as a DHCP server for four VLANs but is not the gateway for any of these networks. The switch will issue out the IP address and mask but it won't give out the gateway unless the gateway IP address is on the device. Example:
vlan1
ip dhcp pool vlan1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
vlan2
ip dhcp pool vlan2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
vlan3
ip dhcp pool vlan3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
vlan4
ip dhcp pool vlan4
network 192.168.4.0 255.255.255.0
default-router 192.168.4.1
interface vlan1
ip address 192.168.1.253
interface vlan2
ip address 192.168.2.253
interface vlan3
ip address 192.168.3.253
interface vlan4
ip address 192.168.4.1
Devices on VLAN 4 will get the IP,SM, and the gateway but the others will only receive the IP and SM. At this time the gateway is not attached to this switch. I'm just prepping it so that it can be plug and play. Your assistance would be helpful.
Solved! Go to Solution.
06-07-2022 08:09 AM
Fixed my issue. I needed to exclude the Default-Router IP address from being issued out from that DHCP pool range. In essence the GW IP address was being issued out as an available address in which the device couldn't have both the gateway IP address and the IP address for the GW configured on the same device. The fix:
ip dhcp exclude-address 192.168.1.1
ip dhcp exclude-address 192.168.2.1
ip dhcp exclude-address 192.168.3.1
ip dhcp exclude-address 192.168.4.1
06-07-2022 08:07 AM
Hello
The default gateway of you dhcp pools need too be the ip address of the L3 svi on the switch
interface vlan1
ip address 192.168.1.253
vlan1
ip dhcp pool vlan1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1default-router 192.168.1.253
etc...
06-07-2022 08:09 AM
Fixed my issue. I needed to exclude the Default-Router IP address from being issued out from that DHCP pool range. In essence the GW IP address was being issued out as an available address in which the device couldn't have both the gateway IP address and the IP address for the GW configured on the same device. The fix:
ip dhcp exclude-address 192.168.1.1
ip dhcp exclude-address 192.168.2.1
ip dhcp exclude-address 192.168.3.1
ip dhcp exclude-address 192.168.4.1
06-07-2022 08:38 AM
thanks a lot for sharing solution
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide