cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2150
Views
5
Helpful
3
Replies

Switch as DHCP Server Not Issuing Default Gateway

robierramsey
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

robierramsey
Level 1
Level 1

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

 

  

View solution in original post

3 Replies 3

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.1
default-router 192.168.1.253

 

 

etc...


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

robierramsey
Level 1
Level 1

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

 

  

thanks a lot for sharing solution

Review Cisco Networking for a $25 gift card