[Dnsmasq-discuss] DHCP server on Bridge

John Pearson johnpearson555 at gmail.com
Sun Aug 30 18:44:12 BST 2015


Thanks, I tried your exact settings. Same result as before, traffic is
being moved but devices connected to eth1 don't have their DNS Server set
as 192.168.1.1. I can see in the dnsmasq logs that it is providing dhcp to
devices but dns server is not being set.

Any other suggestions or things I should change ? Perhaps iptables/ebtables
?

On Sun, Aug 30, 2015 at 4:25 AM, 五月 <allfox at live.cn> wrote:

> Greetings,
>
> I did have Dnsmasq on a bridge in the past. It works.
>
> Could you try editing your /etc/network/interfaces to:
>
> iface eth0 inet manual
> iface eth1 inet manual
> allow-hotplug br0
> iface br0 inet static
>    bridge_ports eth0 eth1
>    address 192.168.1.1
>    netmask 255.255.255.0
>    gateway 192.168.1.1
>
>
> For /etc/dnsmasq.conf:
>
> dhcp-range=lan,192.168.1.5,192.168.1.500,255.255.255.0,5m
>
> Firstly, you couldn't have an address like 192.168.1.500, because IP only
> ranges from 1 to 255. And 1 is used by your gateway machine, 255 is for
> broardcast.
>
> And I think 5 min is too short for DHCP lease.
>
> Try edit this line to
> dhcp-range=192.168.1.2,192.168.1.254,12h
>
> I see you set a tag named "lan", I don't know this option, maybe someone
> else could help.
>
> You don't need to mannually tell Dnsmasq those dhcp-options. By default,
> they're all pointing to the Dnsmasq machine.
>
>
> ------------------------------
> Date: Sat, 29 Aug 2015 10:03:59 -0700
> From: johnpearson555 at gmail.com
> To: dnsmasq-discuss at lists.thekelleys.org.uk
> Subject: [Dnsmasq-discuss] DHCP server on Bridge
>
>
> Hi all, I am trying to have Dnsmasq on a bridge ( br0 ) and also have it
> serve as the DHCP server. Traffic is going through the bridge but devices
> connected to eth1 don't have DHCP and DNS settings traversing. How to setup
> dnsmasq on a bridge so that it is transparent but still acts as a dhcp
> server and sets dns settings to all devices connected to eth1 ?
>
> Here is my current setup :
>
> # etc/network/interfaces
>
> iface eth0 inet manual
> iface eth1 inet manual
>
> iface br0 inet static
>    bridge_ports eth0 eth1
>    address 192.168.1.1
>
>
>
> #dnsmasq.conf
>
> domain-needed
> bogus-priv
>
> no-resolv
> no-poll
>
> listen-address=127.0.0.1
> listen-address=192.168.1.1
> interface=br0
>
> bind-interfaces
>
> dhcp-range=lan,192.168.1.5,192.168.1.500,255.255.255.0,5m
>
> # broadcast address (28)
> dhcp-option=lan,28,192.168.1.255
>
> # gateway address (3)
> dhcp-option=lan,3,192.168.1.1
>
> # DNS server (6)
> dhcp-option=lan,6,192.168.1.1
>
> dhcp-authoritative
>
> server=8.8.8.8 server=8.8.4.4
>
>
> _______________________________________________ Dnsmasq-discuss mailing
> list Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150830/89bbf3c2/attachment.html>


More information about the Dnsmasq-discuss mailing list