DHCP gives an IP when the DHCP relay is not in the subnet

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DHCP gives an IP when the DHCP relay is not in the subnet

Mik J
Hello,

Is it possible that the dhcp offers an IP but the dhcp relay is not in the subnet ?

I have a vlan 192.168.1.0/24 and 3 dhcp relay. Each dhcp relay will use a loopback to relay the dhcp request 10.1.1.1 or 10.1.1.2 or 10.1.1.3. The client machines will receive an IP in 192.168.1.0/24

Is it possible ?

NB: if there's a DHCP relay in 10.1.1.4, I don't want to offer an IP in 192.168.1.0/24

Do you have a link or keywords that would help to find the typical configuration for that

Thank you


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP gives an IP when the DHCP relay is not in the subnet

Eugene Grosbein
06.01.2017 0:36, Mik J wrote:

> Hello,
>
> Is it possible that the dhcp offers an IP but the dhcp relay is not in the subnet ?
>
> I have a vlan 192.168.1.0/24 and 3 dhcp relay. Each dhcp relay will use a loopback to relay the dhcp request 10.1.1.1 or 10.1.1.2 or 10.1.1.3. The client machines will receive an IP in 192.168.1.0/24
>
> Is it possible ?
>
> NB: if there's a DHCP relay in 10.1.1.4, I don't want to offer an IP in 192.168.1.0/24
>
> Do you have a link or keywords that would help to find the typical configuration for that
>
> Thank you

I have same configuration and this works for me:

shared-network HotSpot {

   # DHCP relay addresses
   subnet 10.1.1.0 netmask 255.255.255.252 { deny unknown-clients; }
   subnet 10.2.1.1 netmask 255.255.255.255 {}

   # DHCP clients
    subnet 192.168.6.0 netmask 255.255.255.0 {
      option routers 192.168.6.1;
      option broadcast-address 192.168.6.255;
    }
}


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP gives an IP when the DHCP relay is not in the subnet

perl-list
In reply to this post by Mik J
Without the bit about not giving an IP (or an IP from a different subnet) if the relay is 10.1.1.4, you could do it something like this:

shared-network SomeNetwork {
  subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    pool {
      range 192.168.1.2 192.168.1.254;
    }
  }
  subnet 10.1.1.0 netmask 255.255.255.0 {
  }
}

which alerts the DHCP server that requests from 10.1.1.0/24 are in the same physical network as 192.168.1.0/24 and so it will pick a pool address from 192.168.1.2 - 192.168.1.254

as for how to not answer when 10.1.1.4 relays (or answer with a different subnet's IP), that is beyond my knowledge.


From: "Mik J" <[hidden email]>
To: [hidden email]
Sent: Thursday, January 5, 2017 12:36:58 PM
Subject: DHCP gives an IP when the DHCP relay is not in the subnet
Hello,

Is it possible that the dhcp offers an IP but the dhcp relay is not in the subnet ?

I have a vlan 192.168.1.0/24 and 3 dhcp relay. Each dhcp relay will use a loopback to relay the dhcp request 10.1.1.1 or 10.1.1.2 or 10.1.1.3. The client machines will receive an IP in 192.168.1.0/24

Is it possible ?

NB: if there's a DHCP relay in 10.1.1.4, I don't want to offer an IP in 192.168.1.0/24

Do you have a link or keywords that would help to find the typical configuration for that

Thank you


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP gives an IP when the DHCP relay is not in the subnet

Bill Shirley-2
Set up a class:
class "DHCP_relay_4" {
    match if (packet(24,4)) = 0a:01:01:04;        # 10.1.1.4
}

Then add to the pool definition:
pool {
  deny members of "
DHCP_relay_4";
  range 192.168.1.2 192.168.1.254;
}


Bill

On 1/5/2017 1:42 PM, perl-list wrote:
Without the bit about not giving an IP (or an IP from a different subnet) if the relay is 10.1.1.4, you could do it something like this:

shared-network SomeNetwork {
  subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    pool {
      range 192.168.1.2 192.168.1.254;
    }
  }
  subnet 10.1.1.0 netmask 255.255.255.0 {
  }
}

which alerts the DHCP server that requests from 10.1.1.0/24 are in the same physical network as 192.168.1.0/24 and so it will pick a pool address from 192.168.1.2 - 192.168.1.254

as for how to not answer when 10.1.1.4 relays (or answer with a different subnet's IP), that is beyond my knowledge.


From: "Mik J" [hidden email]
To: [hidden email]
Sent: Thursday, January 5, 2017 12:36:58 PM
Subject: DHCP gives an IP when the DHCP relay is not in the subnet
Hello,

Is it possible that the dhcp offers an IP but the dhcp relay is not in the subnet ?

I have a vlan 192.168.1.0/24 and 3 dhcp relay. Each dhcp relay will use a loopback to relay the dhcp request 10.1.1.1 or 10.1.1.2 or 10.1.1.3. The client machines will receive an IP in 192.168.1.0/24

Is it possible ?

NB: if there's a DHCP relay in 10.1.1.4, I don't want to offer an IP in 192.168.1.0/24

Do you have a link or keywords that would help to find the typical configuration for that

Thank you


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users