01-18-2017 07:38 AM - edited 03-08-2019 08:57 AM
Hello, I have a Cisco 3750 with several servers connected locally, all on the same VLAN. The 3750 is connected to a wider network with various other servcies including other DHCP servers running. I would like the 3750 to act as the DHCP server for all the devices in the VLAN, but only for that VLAN. Is it possible to restrict the scope of the DHCP address allocation to that VLAN only. We have other DHCP servers running elsewhere in the network and I would like to try and avoid DHCP confusion.
01-18-2017 07:47 AM
Typically a VLAN is a logical representation of a network. Say if you have vlan 192 representing network 192.168.1.0/24, in that case you can easily define network pool restricted to 192
config t
ip dhcp-exclude address 192.168.1.1
ip dhcp pool 192
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
//With above command switch will only be dhcp server for vlan 192 machines
01-18-2017 07:55 AM
Hello,
once you configure something like the example below, make sure none of your other DHCP servers give out addresses from the same range:
ip dhcp excluded-address 192.168.10.1
!
ip dhcp pool Vlan10
network 192.168.10.0 255.255.255.0
domain-name yourdomain.com
dns-server 8.8.8.8 8.8.8.4
default-router 192.168.10.1
lease 3
interface FastEthernet0/0
switchport access vlan 10
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