Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-19-2013, 06:34 PM
|
#1
|
Member
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124
Rep:
|
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
|
|
|
06-21-2013, 03:33 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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 03:37 AM.
|
|
|
06-21-2013, 03:52 AM
|
#3
|
Member
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124
Original Poster
Rep:
|
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!
|
|
|
06-21-2013, 04:36 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
06-21-2013, 05:11 AM
|
#5
|
Member
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 124
Original Poster
Rep:
|
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'"
|
|
|
All times are GMT -5. The time now is 01:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|