<br><font size=2 face="sans-serif">Hello Simon,</font>
<br><font size=2 face="sans-serif">Thanks fo such a quick answer!</font>
<br><font size=2 face="sans-serif">Yes I detected that a bit later and
the tag is set now.</font>
<br><font size=2 face="Courier New">dhcp-range=net:ignacio,10.10.35.60,10.10.35.65</font>
<br><font size=2 face="Courier New">dhcp-circuitid=ignacio,b9:06:00:00:01:01:01:03,
dhcp-remoteid=ignacio,00:06:00:80:63:60:e1:64</font>
<br>
<br><font size=2 face="sans-serif">BUT IT STILL DOESNT WORK. the tag is
set but i detected sort of a loop of discovers, NAKs and ACKs so that client
does never get its IP</font>
<br><font size=2 face="sans-serif"> Please find enclosed log output
(dnsmasq shows loop.txt)</font>
<br><font size=2 face="sans-serif">Every "</font><font size=2 face="Courier New">dnsmasq:
etiquetas: ignacio, eth0</font><font size=2 face="sans-serif">" tag
is set (Spanish log, sorry)<br>
</font>
<br><font size=2 face="sans-serif">Please find enclosed capture file showing
the loop (dhcp loop from wireshark at the server side):</font>
<br><font size=2 face="sans-serif">Relay: .251</font>
<br><font size=2 face="sans-serif">server: .200</font>
<br>
<br><font size=2 face="sans-serif">Please take into account I have a layer2
network (client----L2switch acting as dhcp relay op82---dhcp server)</font>
<br>
<br><font size=2 face="sans-serif">I feel the problem is dnsmasq receives
two requests at almost the same time (the broadcasted one which is Naked
and the unicasted one Acked)</font>
<br><font size=2 face="sans-serif">Of course the NACk message restarts
the process at the client side</font>
<br>
<br><font size=2 face="sans-serif">Two questions:</font>
<br><font size=2 face="sans-serif">- Do you have any dnsmasq config solution
for that (what´s the reason for the first request to be NAKed?)? I have
experience with Hanewin and works ok in this topology without 'external
help'</font>
<br><font size=2 face="sans-serif"> I
got one solution using iptables -A INPUT -i eth0 -p udp -s 0.0.0.0/32 -d
255.255.255.255/32 --dport 67 -j DROP (i do filter any broadcasted request
or discover)</font>
<br><font size=2 face="sans-serif">- </font><font size=2 face="Courier New">does
dnsmasq.conf do an AND with dhcp-circuitid</font><font size=2 face="sans-serif">
</font><font size=2 face="Courier New">dhcp-remoteid values?, I mean, should
I have more than one switch could dnsmasq sort the first port of the first
switch and the first port at the second switch?</font>
<br>
<br><font size=2 face="Courier New">Shoul you miss any info please let
me know</font>
<br><font size=2 face="Courier New">Thanks a lot for your help</font>
<br><font size=2 face="Courier New">Ignacio</font>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Simon Kelley <simon@thekelleys.org.uk></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">Ignacio.Bravo@belden.com</font>
<tr>
<td valign=top><font size=1 color=#5f5f5f face="sans-serif">Cc:</font>
<td><font size=1 face="sans-serif">dnsmasq-discuss@lists.thekelleys.org.uk</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">13/02/2010 10:30</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Dnsmasq-discuss] IP address based
on switch port number (option 82)</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Ignacio.Bravo@belden.com wrote:<br>
> <br>
> Hello List,<br>
> I try without success to assign always the same IP (or range) per
switch <br>
> port (no matter the mac address, only matters the port at which the
<br>
> client is connected)<br>
> To do this I use switches with dhcp relay option 82 activated. So
<br>
> telling, any discover getting to dnsmasq includes circuit-id and remote-id<br>
> I dont understand the usage of dhcp-circuitid and dhcp-remoteid <br>
> commands, may you please post me an example?<br>
> I tried the following at dnsmasq.conf:<br>
> dhcp-range=net:ignacio,192.168.7.1,192.168.7.4,255.255.255.0<br>
> dhcp-circuitid=ignacio,b9:06:00:00:01:0y1:01:05, <br>
> dhcp-remoteid=ignacio,00:06:00:80:63:60:e1:64<br>
> <br>
> Would this suffice? I suppose not as it does not work. (Hex values
got <br>
> from wireshark so they should be ok)<br>
<br>
You're certainly on the right lines. As few things to check:<br>
<br>
Don't use very old dnsmasq releases, there have been bugs in the <br>
cricuit-id matching code, so you need 2.44 or later.<br>
<br>
turn on dhcp logging with --log-dhcp that will tell you if the tag is <br>
being set.<br>
<br>
I suspect that you might be matching too much data: your hex looks very
<br>
much like it includes the sub-option and length bytes as the first two.
<br>
dnsmasq understands the sub-option format and will not need to see that.<br>
<br>
Could you post a packet capture here, or send direct to me?<br>
<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<br>
> <br>
> Any help is appreciatted!<br>
> Thanks<br>
> Ignacio<br>
> <br>
> DISCLAIMER: Privileged and/or Confidential information may be contained
<br>
> in this message. If you are not the addressee of this message, you
may <br>
> not copy, use or deliver this message to anyone. In such event, you
<br>
> should destroy the message and kindly notify the sender by reply e-mail.
<br>
> It is understood that opinions or conclusions that do not relate to
the <br>
> official business of the company are neither given nor endorsed by
the <br>
> company. Thank You.<br>
> <br>
> <br>
> ------------------------------------------------------------------------<br>
> <br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> Dnsmasq-discuss@lists.thekelleys.org.uk<br>
> </font></tt><a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss"><tt><font size=2>http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>
<br><p>DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
</p>