LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-13-2016, 08:13 AM   #1
niquo
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Rep: Reputation: Disabled
isc-dcp-server behavior when receiving duplicate requests


Hi everyone,

I hope you can help me understanding how to handle the following problem.

MY OBJECTIVE
I have a network with several segments and one DHCP server. Each segment has a network element that I want to get a static IP.
I identify the segments where the network elements are by using DHCP option 82 (remote-id + circuit-id) and I provide a static IP address.

IMPLEMENTATION for test
SERVER A is running isc-dhcp-server on a Debian OS.
SWITCH A is configured with server A as DHCP relay server. Option 82 is added with circuit-id and remote-id.
CLIENT - A DHCP client

FLOW DESCRIPTION
Once I power on the client (connected to SWITCH A) following message flow is visible:
In other words:
1 - Client sends broadcast DHCP discover.
2 - Switch forwards the DHCP DISCOVER broadcast and,
3 - Sends a DHCP DISCOVER unicast to server A with option 82 remote-id and circuit-id
4 - Server A ignores the broadcast from point 2 (no lease for that request since there is no match)
5 - Server A responds to the unicast DHCP DISCOVER from point 3 with a DHCP OFFER.
6 - Switch A forwards the DHCP Offer to the client
7 - Client sends a broadcast DHCP REQUEST
8 - Switch A forwards the broadcast to server A and,
9 - Switch sends a DHCP requets unicast to Server A.
10 - The server will answer with NACK to the broadcast DHCP Request (since there is no circuit-id in the DHCP request that matches the lease)
11 - Server will answer with an ACK to the unicast

I attached a wireshark capture where:
DHCP server: 10.1.52.1 and 192.168.255.112 (relay server)
Switch : 10.1.52.80

Now, the behavior at the client will vary depending on the DHCP client implementation:
a) Windows client - a new DHCP discover is sent right after receiving the NACK. The ACK response is discarded. A DHCP Discover, request, NACK, ACK loop happens and the client never uses the received IP address.
b) OpenWRT Access Point - same as previous
c) Debian OS client with dhclient : The DHCP DISCOVER is sent at a higher timing than fro Windows or the openwrt. Hence, the ACK response is accepted and the client uses the received IP address.
d) HP Access Point - same as c)


QUESTIONS
1 - Is there a way to configure isc-dhcp-server to validate the DHCP Request using the MAC address instead of the circuit-id? I would avoid the NACK response.
2 - Is there a way to configure isc-dhcp-server to avoid sending NACK (Not-authoritative doesn't work here because the lease is from this server).
3 - Is there a way to configure isc-dhcp-server to answer only unicasts and no broadcasts?


I tried, as a workaround at server A, to DROP brodcast answers for ports 67 and 68 but since isc-dhcp-server uses raw sockets the iptables are bypassed. I solved my problem by removing isc-dhcp-server and usnig dnsmasq since this one can be blocked by iptables but I would prefer to use isc-dhcp-server rather than dnsmasq.

Your help is appreciated!

Best regards
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	21
Size:	35.5 KB
ID:	22434  

Last edited by niquo; 07-13-2016 at 08:24 AM.
 
Old 07-14-2016, 02:03 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Why not just run a separate DHCP instance for each network segment?

Edit: I guess not easy to do without multiple NICs. Maybe have a tap interface and a VPN to the switch for each segment, assuming its smart enough to forward broadcasts to the right VPN.

Last edited by smallpond; 07-14-2016 at 03:29 PM.
 
Old 07-15-2016, 02:51 AM   #3
niquo
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your response @smallpond.
The issue is more complicated. I tried in my post to simplify it at most and I might have passed the wrong idea.

My DHCP server has only one interface connected to a ring network of several switches. I have to identify where the network elements are and I do that by using option 82.
That is why I try to find a solution at isc-dhcp-server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange ARP behavior : A linux server responds to all ARP requests Hdvd21 Linux - Networking 4 10-24-2013 05:02 AM
postfix configuration to stop daemon from receiving smtp mail requests port 25 fantalimon Linux - Software 5 11-10-2011 04:56 PM
[SOLVED] dnsmasq on Fedora 15 install not receiving DHCP requests Yalla-One Fedora 2 09-23-2011 09:34 AM
VMWare Clients Not Receiving Server Requests? SlowCoder Linux - Server 1 08-01-2007 08:15 PM
DHCP Requests and Discovers not receiving Response xmnemonic Linux - Networking 1 01-10-2004 09:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration