[RESOLVED !!!] Multi Homed DHCP - VLANs, Hosting Remote Subnets - Working With DHCP Relay Agent

Prabhpal S. Mavi prabhpal at digital-infotech.net
Tue Mar 19 12:15:06 UTC 2013


Hi Dear All,

We were having requirement where "isc-dhcp-server" have to issue ip
address for multiple remote subnets. Since they are remote subnets, my
DHCP server it self do not belong (connected) to those subnet either by
physical or logical interface (sub interface etc..). Saying other way,
NONE of the interface of my DHCP server has direct connectivity to those
subnets.

Our server belongs following networks using sub interfaces (LANs){
192.168.10.1
192.168.20.1
192.168.30.1
192.168.40.1
192.168.50.1
}

But business requirement was saying i have to issue ip address for remote
subnets as well such as {

192.168.11.0
192.168.21.0
192.168.31.0
192.168.41.0
192.168.51.0
}

emphasizing, please note, none of the interface of my server is in these
networks (11,21,31,41,51), i have to issue these ip address for the remote
clients, DHCP request come through a Cisco Router acting as "Relay-Agent"
(DHCP Helper) remotely. Saying other way, some remote client will request
for the DHCP ip address from my server using Cisco Router configured as
"dhcp-helper"


STEP 1.) Configure your interface for DHCP to listen

INTERFACES="vlan10 vlan20 vlan30 vlan40 vlan50"; - If you are not using
VLANs, do the following.
INTERFACES="eth1.10 eth1.20 eth1.30 eth1.40 eth1.50";

ddns-update-style none;
authoritative;
log-facility local7;

STEP 2.) Empty Subnet Declaration For Configured Interfaces, EMPTY ONLY,
if you do not want to issue IP for these networks wehre your DHCP is
connected, else declare the pool & options. But i do not want any ip from
this range.

subnet 192.168.10.0 netmask 255.255.255.0 {
}
subnet 192.168.20.0 netmask 255.255.255.0 {
}
subnet 192.168.30.0 netmask 255.255.255.0 {
}
subnet 192.168.40.0 netmask 255.255.255.0 {
}
subnet 192.168.50.0 netmask 255.255.255.0 {
}
subnet 41.211.31.0 netmask 255.255.255.0 {
}
subnet 172.25.1.0 netmask 255.255.255.252 {
}

STEP 3.)

Subnet Declaration For REMOTE Networks - These clients are far away, my
server cannot be the part of these networks. i am going to receive DHCP
request from REMOTE Cisco router configured as DHCP-helper.

subnet 192.168.11.0 netmask 255.255.255.0 {
 option routers 192.168.11.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.11.255;
 option domain-name-servers 41.211.0.41;
 option domain-name "teledataict.net";
 default-lease-time 1800;
 max-lease-time 2700;
 range 192.168.11.100 192.168.11.200;
}
subnet 192.168.21.0 netmask 255.255.255.0 {
 option routers 192.168.21.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.21.255;
 option domain-name-servers 41.211.0.41;
 option domain-name "teledataict.net";
 default-lease-time 1800;
 max-lease-time 2700;
 range 192.168.21.100 192.168.21.200;
}
subnet 192.168.31.0 netmask 255.255.255.0 {
 option routers 192.168.31.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.31.255;
 option domain-name-servers 41.211.0.41;
 option domain-name "teledataict.net";
 default-lease-time 1800;
 max-lease-time 2700;
 range 192.168.31.100 192.168.31.200;
}
subnet 192.168.41.0 netmask 255.255.255.0 {
 option routers 192.168.41.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.41.255;
 option domain-name-servers 41.211.0.41;
 option domain-name "teledataict.net";
 default-lease-time 1800;
 max-lease-time 2700;
 range 192.168.41.100 192.168.41.200;
}
subnet 192.168.51.0 netmask 255.255.255.0 {
 option routers 192.168.51.1;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.51.255;
 option domain-name-servers 41.211.0.41;
 option domain-name "teledataict.net";
 default-lease-time 1800;
 max-lease-time 2700;
 range 192.168.51.100 192.168.51.200;
}


STEP 4.) restart dhcp daemon | check logs | Testing

Note: This config is copy & past from working server.

Grate Thanks to Simon Hobson
Grate Thanks to Christian Kratzer


Thanks / Regards







More information about the dhcp-users mailing list