dnsmasq, 2 Ethernet - Raspberry Pi Forums


i've scoured raspberry pi, debian, ubuntu, , every other forum can find, , i'm stumped.

here's setup: have 1 rpi acting master node cluster. pi connects home network using usb-ethernet adapter, , has static ip in 192.168 range. no problems there. pi's onboard ethernet connects switch, connects 4 slave nodes, set dhcp (with goal master node assign specific ips each node based on naming convention, 10.0.0.11 first slave, 10.0.0.12 second, etc.) ignoring new naming scheme in stretch, eth0 connected internet/home , eth1 connected slave nodes.

want slave nodes able talk each other, internet, want master node act dhcpserver , dns other nodes, rest of home network (192.168) can see master node.

every guide/question/help can find seems still use /etc/network/interfaces, , it's understanding it's been deprecated dhcpcd. if hasn't can't figure out how interfaces relates dhcpcd , dnsmasq.

can point me in right direction?

thank you.

i not professional...

know, can separate definitions/settings in dnsmasq.

code: select all

######################################## #/etc/dnsmasq.conf ... # interface selection interface=eth0 interface=eth1  # dhcp dhcp-range=eth0, 192.168.1.100, 192.168.1.200, 24h dhcp-range=eth1, 10.0.0.100, 10.0.0.200, 24h  # dns (enabled) port=53 dns-loop-detect  # optional tftp (enabled) enable-tftp tftp-lowercase tftp-root=/srv/tftp_for_eth0/, eth0 tftp-root=/srv/tftp_for_eth1/, eth1 
act nat, have tell kernel forward network traffic

code: select all

######################################## # /etc/sysctl.conf ... net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 
, firewall modifies headers act nat - traffic 1 network looks requested rpi , not network behind.

code: select all

sudo iptables -t nat -a postrouting -o eth0 -j masquerade sudo dpkg-reconfigure iptables-persistent 
, give rpi static ip addresses both sides (without use of /etc/network/interfaces)

code: select all

######################################## # /etc/dhcpcd.conf ... interface eth0 static ip_address=192.168.1.10/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1  interface eth1 static ip_address=10.0.0.10/24 
hope complete , correct.

btw: can force rspbian stretch use/keep old network interface naming style, adding " net.ifnames=0" end of /boot/cmdline.txt content


raspberrypi



Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'