LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-08-2015, 09:23 AM   #1
gigz021
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
isc-dhcp-relay


Hi guys,

New member and first time poster. I was wondering if anyone can help me configuring a dhcp relay agent. I have tried everything and Googled high and low before I came here, so I tried my best to figure it out myself.

So short story, I am a total newbie as I only ever worked on Windows Server.

My configuration is very simple and consists of client <--> (eth0)Router(eth1) <--> Server. Using Ubuntu 14.04 LTS.


Router
------
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.128
network 192.168.1.128
broadcast 192.168.1.127

auto eth1
iface eth1 inet static
address 192.168.1.129
netmask 255.255.255.240
network 192.168.1.240
broadcast 192.168.1.239

/etc/sysctl.conf
net.ipv4.ip_forward=1

/etc/default/isc-dhcp-relay

SERVERS="192.168.1.130"
INTERFACES="eth0"

Server
------
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.130
netmask 255.255.255.240
network 192.168.1.240
broadcast 192.168.1.239

/etc/dhcp/dhcpd.conf
ddns-update-style none;
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;

option subnet-mask 255.255.255.128;
option broadcast-address 192.168.1.127;
option routers 192.168.1.1;

subnet 192.168.1.0 netmask 255.255.255.128 {
range 192.168.1.2 192.168.1.126;
}

subnet 192.168.1.128 netmask 255.255.255.240 {
}

Now the problem. I ensured the dhcp-relay is running on the router

sudo service isc-dhcp-relay status
isc-dhcp-relay start/running, process 4107

Great!

But when I try to obtain an IP address from the client - Nothing!

But, if I issue this command on the router dhcrelay -d 192.168.1.130

Internet Systems Consortium DHCP Relay Agent 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:0c:29:32:ca:5d
Sending on LPF/eth1/00:0c:29:32:ca:5d
Listening on LPF/eth0/00:0c:29:32:ca:53
Sending on LPF/eth0/00:0c:29:32:ca:53
Sending on Socket/fallback
Forwarded BOOTREQUEST for 00:0c:29:37:88:c5 to 192.168.1.130
Forwarded BOOTREPLY for 00:0c:29:37:88:c5 to 192.168.1.2
Forwarded BOOTREPLY for 00:0c:29:37:88:c5 to 192.168.1.2

Bang, right away a glorious IP address. Now if I exit out of the terminal, again the client will not obtain an IP address. It's only when I run dhcrelay -d 192.168.1.130 and let the terminal window sit there will the dhcp-relay work properly.

I am seriously confused, what am I doing wrong and why can't I run dhcp relay as a service?

Last edited by gigz021; 05-08-2015 at 09:24 AM.
 
Old 05-08-2015, 10:28 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Your network statements in your config files are wrong.

Code:
192.168.1.1/25   network = 192.168.1.0
192.168.1.130/28 network = 192.168.1.128
The second interface the network you have configured is outside the assigned ip address.
Not saying this is the problem but it could be.
And the network statement is deprecated.
 
  


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
How do I perform maintenance on a master DNS/DHCP (BIND9/ISC-DHCP) Ubuntu server? Sniperm4n Linux - Server 2 09-09-2013 01:19 PM
Convert Linux ISC DHCP to Windows Netsh DHCP ravmohun Linux - Server 3 03-01-2012 04:29 AM
A question about ISC-DHCP 22978316 Linux - Server 1 05-02-2009 07:14 AM
Migrate DHCP from Microsoft to ISC DHCP on Linux rsmccain Linux - Networking 4 10-27-2006 07:47 PM
Dhcp Isc Help x86br Linux - Networking 6 04-19-2003 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:58 PM.

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