[Dnsmasq-discuss] DHCP Relay, assign address from other vlan, with no dhcp listening on it
spiderx at spiderx.dp.ua
Mon Sep 12 15:15:09 BST 2011
On Mon, Sep 12, 2011 at 3:09 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
> SpiderX wrote:
>>> I think what's happening is that the relay adds its 172.... address to
>>> the relayed DHCP packet
>> Thanks for reply, Simon.
>> Are you talking about giaddr field?
> That's the one.
>>If no, then there is no any other
>> 172... in the packet:
>> IP: 172.16.33.50 (1c:bd:b9:9b:68:5c) > 172.16.33.252 (0:1e:67:2:ad:6a)
>> OP: 1 (BOOTPREQUEST)
>> HTYPE: 1 (Ethernet)
>> HLEN: 6
>> HOPS: 1
>> XID: 830b9708
>> SECS: 0
>> FLAGS: 0
>> CIADDR: 0.0.0.0
>> YIADDR: 0.0.0.0
>> SIADDR: 0.0.0.0
>> GIADDR: 172.16.33.50
>> CHADDR: 48:5b:39:36:a2:73:00:00:00:00:00:00:00:00:00:00
>> SNAME: .
>> FNAME: .
>> OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
>> OPTION: 50 ( 4) Request IP address 172.16.33.121
>> OPTION: 12 ( 6) Host name laptop
>> OPTION: 55 ( 13) Parameter Request List 1 (Subnet mask)
>> 28 (Broadcast address)
>> 2 (Time offset)
>> 3 (Routers)
>> 15 (Domainname)
>> 6 (DNS server)
>> 119 (Domain Search)
>> 12 (Host name)
>> 44 (NetBIOS name server)
>> 47 (NetBIOS scope)
>> 26 (Interface MTU)
>> 121 (Classless Static Route)
>> 42 (NTP servers)
>> OPTION: 82 ( 18) Relay Agent Information
>> Circuit-ID 00:04:00:02:00:10
>> Remote-ID 00:06:1c:bd:b9:9b:68:5c
> So, you need persuade your relay to add a sub-option 5 (subnet select)
> to the relay agent information, along with the circuit-id and remote-id.
> The subnet-select option holds the 10....... network address and tells
> dnsmasq it should allocate addresses there, even thought the giaddr is
> on 172....
I have read RFC5107.
In RFC5107 is talking about situation when DHCPREQUEST packets have to
arrive on DHCP Server with sub-option 5.
As said in RFC5107: "RENEW DHCPREQUEST - a DHCPREQUEST message sent by
a client in RENEWING state."
What I need is that dnsmasq assigns ip address (create DHCPOFFER
packet) based on remote-id or/and circuit-id, and not on sub-option 5
which will arrive only in RENEWING state.
Is there any chance that dnsmasq will do this?
The reason why I'm asking about this, that DHCP Relay Agent in my l2
switch doesn't support RFC5107, but it supports RFC3046 in its part:
"Note that DHCP relay agents are not required to monitor unicast DHCP
messages sent directly between the client and server (i.e., those
that aren't sent via a relay agent). However, some relay agents MAY
chose to do such monitoring and add relay agent options.
Consequently, servers SHOULD be prepared to handle relay agent
options in unicast messages, but MUST NOT expect them to always be
My l2 switch adds Relay Agent Information to clients unicast dhcp
messages, so support RFC5107 for such l2 switch is pointless.
More information about the Dnsmasq-discuss