LinuxQuestions.org
Visit Jeremy's Blog.
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 06-19-2013, 05:34 PM   #1
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Rep: Reputation: 5
Trouble setting up DNSMASQ


Hey all! Trying to learn how to set up dnsmasq, since it will effectively do everything I know about isc-dhcp, bind9 and tftp-hpa in one program, but I can't seem to get it to hand out a simple dhcp address even to a computer directly connected to it! Mind helping a fella out and looking over my configs?

/etc/hosts

# IP address Hostname Alias
127.0.0.1 localhost sdserver.sddomain.local
192.168.1.150 sdserver.sddomain.local sdserver
192.168.1.151 sdlaptop.sddomain.local sdlaptop
192.168.1.152 maiadesktop.sddomain.local maiadesktop
192.168.1.153 bretdesktop.sddomain.local bretdesktop
192.168.1.154 dadiphone.sddomain.local dadiphone
192.168.1.155 momiphone.sddomain.local momiphone
192.168.1.156 xbox360.sddomain.local xbox360
192.168.1.157 ubuntu.sddomain.local ubuntu

/etc/resolv.conf

# localhost
nameserver 127.0.0.1

# Google nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4

# Comcast nameservers
nameserver 75.75.75.75
nameserver 76.76.76.76

# OpenDNS nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220

/etc/dnsmasq.conf

domain-needed
bogus-priv
interface=br0
interface=eth0
expand-hosts
domain=sddomain.local
dhcp-range=192.168.1.150,192.168.1.200,12h
dhcp-host=74:2f:68:56:ed:25,sdlaptop,192.168.1.151,infinite
dhcp-host=00:1a:a0:bb:c7:7a,maiadesktop,192.168.1.152,infinite
dhcp-host=00:1a:a0:be:45:29,bretdesktop,192.168.1.153,infinite
dhcp-host=c8:6f:1d:be:bd:08,dadiphone,192.168.1.154,infinite
dhcp-host=8c:58:77:3f:69:bd,momiphone,192.168.1.155,infinite
dhcp-host=7c:ed:8d:54:0d:30,xbox360,192.168.1.156,infinite
dhcp-host=52:54:00:b4:37:f5,ubuntu,192.168.1.157,infinite
dhcp-option=3,192.168.1.1
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
dhcp-authoritative
cache-size=150

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
BRIDGE=br0
TYPE=Ethernet
IPV6INIT=no
IPV6_AUTOCONF=no

/etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
BOOTPROTO=static
TYPE=Bridge
ONBOOT=yes
DELAY=0
IPV6INIT=no
IPV6_AUTOCONF=no
IPADDR=192.168.1.150
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
 
Old 06-21-2013, 02:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
please run dnsmasq in debug mode (-d) and see what it says. I'd wonder why you're binding to br0 and eth0 though, maybe that could be causing some conflict? I think you should probably just use "bind-interfaces" and let it listen everywhere possible.

Last edited by acid_kewpie; 06-21-2013 at 02:37 AM.
 
Old 06-21-2013, 02:52 AM   #3
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Original Poster
Rep: Reputation: 5
Thanks for the great idea! The reason I'm using bridging is because I have set up virtual machines on KVM and bridge-utils for the interface. I would run the debug, but I got frustrated with the configuration and removed dnsmasq... I've got experience with bind, isc-dhcp & tftp so I installed them instead. Any ideas on how I could sort out using bridging? I'm new to KVM and so I'm going on howtos to get it up and running. Oh, and thanks for the response, much appreciated buddy!
 
Old 06-21-2013, 03:36 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what about using bridging? a simple bridge to the outside world to hook the VM's on to is usually my preferred layout, so so simple... but oddly not something libvirt (used to?) do. I just hacked it in myself in Linux land, and it works fine I find.
 
Old 06-21-2013, 04:11 AM   #5
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124

Original Poster
Rep: Reputation: 5
Thanks for the info, Chris(?)... and it's nice to see I'm not the only person up late with the Linux bug! Yes, using KVM with bridge-utils is how most howtos I have found say to do it, though I'm having trouble understanding how to use it with other things outside of VMs. Mind elaborating on how you would implement you simple bridging? I'd love to be in the know!
-Steve
*********************
"Busy putting the 'sh' in 'IT'"
 
  


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
Trouble with rsyslog config to filter dnsmasq-log-spam Yalla-One Linux - Server 2 01-04-2013 12:35 AM
setting up a private network, using dnsmasq, I have small problem lhorace Linux - Newbie 4 10-11-2010 08:10 AM
setting up a private network, using dnsmasq, I have small problem lhorace Linux - Server 1 10-12-2009 03:17 AM
Need help setting up a dial on demand dnsmasq dhcp server with a decent firewall i nekkutta Slackware 0 03-22-2008 01:19 PM
Trouble setting up Daniel8802 Mandriva 14 09-06-2005 09:04 PM

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

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