[Dnsmasq-discuss] IP address based on switch port number (option 82)

Simon Kelley simon at thekelleys.org.uk
Sat Feb 13 09:30:13 GMT 2010


Ignacio.Bravo at belden.com wrote:
> 
> Hello List,
> I try without success to assign always the same IP (or range) per switch 
> port (no matter the mac address, only matters the port at which the 
> client is connected)
> To do this I use switches with dhcp relay option 82 activated. So 
> telling, any discover getting to dnsmasq includes circuit-id and remote-id
> I dont understand the usage of dhcp-circuitid and dhcp-remoteid 
> commands, may you please post me an example?
> I tried the following at dnsmasq.conf:
> dhcp-range=net:ignacio,192.168.7.1,192.168.7.4,255.255.255.0
> dhcp-circuitid=ignacio,b9:06:00:00:01:0y1:01:05, 
> dhcp-remoteid=ignacio,00:06:00:80:63:60:e1:64
> 
> Would this suffice? I suppose not as it does not work. (Hex values got 
> from wireshark so they should be ok)

You're certainly on the right lines. As few things to check:

Don't use very old dnsmasq releases, there have been bugs in the 
cricuit-id matching code, so you need 2.44 or later.

turn on dhcp logging with --log-dhcp that will tell you if the tag is 
being set.

I suspect that you might be matching too much data: your hex looks very 
much like it includes the sub-option and length bytes as the first two. 
dnsmasq understands the sub-option format and will not need to see that.

Could you post a packet capture here, or send direct to me?


Cheers,

Simon.

> 
> Any help is appreciatted!
> Thanks
> Ignacio
> 
> 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.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




More information about the Dnsmasq-discuss mailing list