View previous topic :: View next topic |
Author |
Message |
Kresp Tux's lil' helper
Joined: 17 Oct 2016 Posts: 77
|
Posted: Wed Apr 19, 2017 1:25 pm Post subject: DHCP with dnsmasq and interface bridging |
|
|
I'm replacing my OpenWRT home router with Gentoo machine.
I'm trying to set up DHCP with dnsmasq for local LAN, and DNS service it provides seems to work fine, but DHCP server is ignored by clients.
daemon.log on server has one DHCP-related line:
Code: | dnsmasq-dhcp[26810]: DHCP, IP range 192.168.100.100 -- 192.168.100.200, lease time 2d |
Whenever I refresh dhcp lease with dhcpcd --release && dhcpcd , it falls back to link-local though:
Code: | dev: loaded udev
DUID 00:01:*cut*
enp30s0: IAID 6a:*cut*
enp30s0: soliciting an IPv6 router
enp30s0: soliciting a DHCP lease
enp30s0: probing for an IPv4LL address
enp30s0: using IPv4LL address 169.254.101.237
enp30s0: adding route to 169.254.0.0/16
enp30s0: adding default route
forked to background, child pid 20256
|
dnsmasq.conf goes like this:
Code: | interface=enp4s0
dhcp-range=enp4s0,192.168.100.100,192.168.100.200,255.255.255.0,48h
|
I tried removing mentions of enp4s0 interface, it made no difference.
Is there some DHCP debugging tool similar to dig/nslookup for DNS?
Another, related, question is how do I group few NICs together so that every machine that gets DHCP lease on any of those, becomes part of the same subnet and can talk to each other normally? Do I create network bridge for those interfaces or should it be done with an iptables rule? |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Apr 19, 2017 2:11 pm Post subject: |
|
|
Quote: | Another, related, question is how do I group few NICs together so that every machine that gets DHCP lease on any of those, becomes part of the same subnet and can talk to each other normally? Do I create network bridge for those interfaces or should it be done with an iptables rule? |
If you want the clients attached to the NICs to be in the same IP subnet, you need a layer 2 connection. Create a bridge over the NICs. You will get an additional interface "br0", which you can use to connect your Gentoo machine to the bridge. Your DHCP server should listen and answer requests on br0. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|