<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Set up a class:<br>
<font color="#993300"><tt>class "DHCP_relay_4" {</tt><tt><br>
</tt><tt> match if (packet(24,4)) = 0a:01:01:04; #
10.1.1.4</tt><tt><br>
</tt></font><font color="#993300"><tt>}</tt><tt><br>
</tt></font><br>
Then add to the pool definition:<br>
<font color="#993300"><tt>pool {</tt><tt><br>
</tt><tt> deny members of "</tt></font><font color="#993300"><tt><font
color="#993300"><tt>DHCP_relay_4</tt></font>";</tt><tt><br>
</tt><tt> range 192.168.1.2 192.168.1.254;</tt><tt><br>
</tt><tt>}</tt><tt><br>
</tt></font><br>
<br>
Bill<br>
<br>
<div class="moz-cite-prefix">On 1/5/2017 1:42 PM, perl-list wrote:<br>
</div>
<blockquote
cite="mid:1496702077.447084.1483641728859.JavaMail.zimbra@network1.net"
type="cite">
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000">
<div>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:</div>
<div><br data-mce-bogus="1">
</div>
<div>shared-network SomeNetwork {</div>
<div> subnet 192.168.1.0 netmask 255.255.255.0 {</div>
<div> option routers 192.168.1.1;</div>
<div> option subnet-mask 255.255.255.0;</div>
<div> pool {</div>
<div> range 192.168.1.2 192.168.1.254;</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"> }</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"> }</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"> subnet 10.1.1.0 netmask 255.255.255.0
{</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"> }<br>
}</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"><br data-mce-bogus="1">
</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;">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</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"><br data-mce-bogus="1">
</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;">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.</div>
<div style="font-family: Andale Mono; font-size: 10pt; color:
#000000;" data-mce-style="font-family: Andale Mono; font-size:
10pt; color: #000000;"><br>
<hr id="zwchr" data-marker="__DIVIDER__">
<div data-marker="__HEADERS__">
<blockquote style="border-left: 2px solid #1010FF;
margin-left: 5px; padding-left: 5px; color: #000;
font-weight: normal; font-style: normal; text-decoration:
none; font-family: Helvetica,Arial,sans-serif; font-size:
12pt;" data-mce-style="border-left: 2px solid #1010FF;
margin-left: 5px; padding-left: 5px; color: #000;
font-weight: normal; font-style: normal; text-decoration:
none; font-family: Helvetica,Arial,sans-serif; font-size:
12pt;"><b>From: </b>"Mik J" <a class="moz-txt-link-rfc2396E" href="mailto:mikydevel@yahoo.fr"><mikydevel@yahoo.fr></a><br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<b>Sent: </b>Thursday, January 5, 2017 12:36:58 PM<br>
<b>Subject: </b>DHCP gives an IP when the DHCP relay is
not in the subnet<br>
</blockquote>
</div>
<div data-marker="__QUOTED_TEXT__">
<blockquote style="border-left: 2px solid #1010FF;
margin-left: 5px; padding-left: 5px; color: #000;
font-weight: normal; font-style: normal; text-decoration:
none; font-family: Helvetica,Arial,sans-serif; font-size:
12pt;" data-mce-style="border-left: 2px solid #1010FF;
margin-left: 5px; padding-left: 5px; color: #000;
font-weight: normal; font-style: normal; text-decoration:
none; font-family: Helvetica,Arial,sans-serif; font-size:
12pt;">
<div style="color: #000; background-color: #fff;
font-family: Helvetica Neue, Helvetica, Arial, Lucida
Grande, sans-serif; font-size: 16px;"
data-mce-style="color: #000; background-color: #fff;
font-family: Helvetica Neue, Helvetica, Arial, Lucida
Grande, sans-serif; font-size: 16px;">
<div id="yui_3_16_0_ym19_1_1483636642168_4686">Hello,</div>
<div id="yui_3_16_0_ym19_1_1483636642168_4860"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5000">Is
it possible that the dhcp offers an IP but the dhcp
relay is not in the subnet ?</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_4922"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_4923">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</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_4974"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5002">Is
it possible ?</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5004"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5006">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</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5015"><br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_5007">Do
you have a link or keywords that would help to find
the typical configuration for that</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thank you<br>
</div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1483636642168_4954"><br>
</div>
</div>
<br>
_______________________________________________<br>
dhcp-users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></blockquote>
</div>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
</blockquote>
<br>
</body>
</html>