,
Share with your friends 

Dhcp server for Vlans

1 ratings Views 214 
Author: mohammed_7145bfbc (mohammed hafeez)  View Profile |  View other solutions by this author

Question / Problem


How to setup Dhcp server for Vlans using linux operating system and dhcp which work for any ip helper , or l3 switches

Solution

I would recomend you to try a dhcp server on flat network before understanding vlans

a vlan would have additonal 4 octect of vlan inforamtion which is recognized by the switches

so below is example of a sample script

for vlan  192.168.1.x , 192.168.2.x , 192.168.3.x

so if you can understand seeing the lines below

You don't require any additional network interface for additional scope. You have to configure IP HELPER address in your L3 as pointing to our DHCP server. Single interface DHCP server will serve N number of subnet ,with help of Brodcast address and BootP protocal.

You can use the below updated configuration file which is working good.
--------------------------
ddns-update-style interim;
ignore client-updates;
default-lease-time 43200;
max-lease-time 43200;
authoritative;


#-----subnet mask-- broadcast-- gateway-#

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.1; #
option routers 192.168.1.100
option domain-name-servers 192.168.1.1 #


# ----------- Server Scope--------------#
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.0 192.168.5.50;
option routers 192.168.5.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.5.255;
option domain-name-servers 192.168.1.1 #
}


# ----------- Server2 Scope--------------#
subnet 192.168.6.0 netmask 255.255.255.0 {
range 192.168.6.0 192.168.6.50;
option routers 192.168.6.100;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.6.255;
option domain-name-servers 192.168.1.1 #
}

pls do let me know still if you have issue.


Applies to

Red Hat Linux ,Linux, Unix, Solaris

Rank It

Login to rank it

Report


Advertisement