LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-15-2017, 08:11 PM   #1
VolumetricSteve
Member
 
Registered: Mar 2011
Posts: 90

Rep: Reputation: 7
dead simple - dchp with dnsmasq and no dns


I have two ethernet ports, one I'd like to use for internet access (living in 192.168.0.x, getting dhcp from the house's router, normal stuff) and the other ethernet port I'd like to use to host dhcp to one device, my UPS battery. From this one port, I have a cable going directly to the UPS in question.

I'm trying to keep one from stepping on the toes of the other. For my UPS-dedicated port, I'm trying to get that dhcp server to be 172.16.0.1 and the UPS should grab 172.16.0.2

For some reason, I'm unable to start the dnsmasq service with my desired options. My error is:

dnsmasq: junk found in command line






Here's my version info:
Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify

dnsmasq.conf:
interface=enp10s0
bind-interfaces
dhcp-range=172.16.0.1,172.16.0.10,12h
port=0



If there's anything else I could provide to make this easier to troubleshoot, let me know.

I've looked at a few guides and they all seem to indicate that my dnsmasq.conf should work, simple though it may be. I should emphasize that I have no need for DNS, since this is one device being connected directly to my system.
 
Old 04-15-2017, 10:36 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
The DHCP range should be more like 172.16.0.2,172.16.0.10,12h, and you'll need to assign 172.16.0.1 (static address) to the enp10s0 interface as well.
 
Old 04-15-2017, 10:41 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
If you really have only one dedicated host (UPS) attached to this interface then I don't see the need for dnsmasq at all. Why not just assign 172.16.0.1/30 to this interface and 172.16.0.2/30 to the UPS statically?
 
1 members found this post helpful.
Old 04-15-2017, 11:14 PM   #4
VolumetricSteve
Member
 
Registered: Mar 2011
Posts: 90

Original Poster
Rep: Reputation: 7
"The DHCP range should be more like 172.16.0.2,172.16.0.10,12h, and you'll need to assign 172.16.0.1 (static address) to the enp10s0 interface as well."

Changing the range is no problem. How do you suggest I statically assign that address to enp10s0? Do I do it within dnsmasq?

"If you really have only one dedicated host (UPS) attached to this interface then I don't see the need for dnsmasq at all. Why not just assign 172.16.0.1/30 to this interface and 172.16.0.2/30 to the UPS statically?"

That's the very first thing I tried, but my UPS's management card is really weird and seems to be happiest when being given a DHCP address, I'm still figuring out it's behavior, but in the mean time I wanted DHCP working just to get things working for the time being.


Thanks for the help
 
Old 04-15-2017, 11:24 PM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Which distro? For Debian-based you make the appropriate configuration in /etc/network/interfaces.
 
Old 04-16-2017, 11:40 AM   #6
VolumetricSteve
Member
 
Registered: Mar 2011
Posts: 90

Original Poster
Rep: Reputation: 7
Crux - it's like gentoo..sort of...but more like slackware I guess

The package manager builds things from source - it's one of those

my network settings seem to be in /etc/rc.d/net
 
Old 04-17-2017, 01:38 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
my network settings seem to be in /etc/rc.d/net
Ok, make your static IP configuration there then.

https://crux.nu/Main/Handbook3-1-Configuration
 
Old 04-18-2017, 08:23 AM   #8
VolumetricSteve
Member
 
Registered: Mar 2011
Posts: 90

Original Poster
Rep: Reputation: 7
I've been working with the Crux IRC group, it seems like I have that ironed out, Either the device I'm connecting to is configured incorrectly or I've got dnsmasq messed up somehow. Out of curiosity, how'd you find the 3.1 handbook? 3.3 should be the one the main page links to, but it's been wrong before.

to rule out dnsmasq, I'm going to see if it can give an ip address to some other device - I'll try a few.

Thanks for your help so far.
 
Old 04-18-2017, 04:32 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I've been working with the Crux IRC group, it seems like I have that ironed out, Either the device I'm connecting to is configured incorrectly or I've got dnsmasq messed up somehow. Out of curiosity, how'd you find the 3.1 handbook? 3.3 should be the one the main page links to, but it's been wrong before.
With a quick online search using Google. You should at least be able to check how the interface is configured with
Code:
/sbin/ifconfig
and maybe share /etc/rc.d/net if you're not sure about the configuration.
 
Old 08-24-2018, 08:04 PM   #10
daluu
LQ Newbie
 
Registered: Aug 2018
Posts: 2

Rep: Reputation: Disabled
Quote:
For some reason, I'm unable to start the dnsmasq service with my desired options. My error is:

dnsmasq: junk found in command line
Curious, how are you starting up dnsmasq?

I came across this error message too, turns out it seems to be some bug with the command line parameter for specifying config file:

dnsmasq -C /pathTo/file.conf

works fine but

dnsmasq --conf-file /pathTo/file.conf

returns that error
 
Old 08-24-2018, 08:10 PM   #11
daluu
LQ Newbie
 
Registered: Aug 2018
Posts: 2

Rep: Reputation: Disabled
nevermind, that was my bad, just noticed the long form requires you to provide "=" and no space between the parameter and the file path for my usage.
 
  


Reply



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
static ip versus dchp dns regarding security ron7000 Linux - Networking 2 11-11-2014 02:34 PM
Managed DNS server lists and dnsmasq DNS cache nitrousoxide82 Linux - Networking 1 02-21-2014 10:34 PM
simple DNS server (dnsmasq) with Windows hosts? Umanga Linux - Server 3 07-29-2011 08:17 AM
[SOLVED] DCHP Server or dnsmasq?? tr1pl3x Linux - Newbie 1 07-16-2010 12:25 AM
Ip, Dns & Dchp ??? gigglesnorter Linux - Networking 1 04-20-2004 03:56 PM

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

All times are GMT -5. The time now is 10:58 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