I have a Pi3B+ (running Buster) that connects to my WLAN nicely via normal
~ $ ip -4 addr show | grep global inet 169.254.60.134/16 brd 169.254.255.255 scope global noprefixroute eth0 inet 10.0.0.14/24 brd 10.0.0.255 scope global noprefixroute wlan0
eth0 to be able to talk to a device that comes pre-configured to:
dhcp: off ip: 192.168.1.25 subnet: 255.255.255.0 gateway: 0.0.0.0
Ideally, I would directly plug in the device and be able to talk with it, but the device need not any internet access; just device-to-pi communication.
Is the right way to do this installing
isc-dhcp-server? Can I set this up statically somehow?
I did try installing
isc-dhcp-server following some similar-but-not-quite-the-same-use-case resources, but I ended up with the pi unable to "see" the internet (which I would like it to still be able to do via
FWIW, if I set the device to have DHCP on and connect to a router on the same network as hosts the pi's WLAN, all works perfectly (which is probably obvious, but just to demonstrate that all the pieces basically work).
I started trying to set up a static IP, but wasn't having any luck... I'm sure it's my error.
So far in
/etc/dhcpd.conf I've tried:
interface eth0 static ip_address=192.168.1.1/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=192.168.1.1 static domain_name_servers=184.108.40.206 220.127.116.11
interface eth0 static ip_address=192.168.1.1/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=0.0.0.0 static domain_name_servers=18.104.22.168 22.214.171.124
...with no luck. Can you see what I'm getting wrong?
Following up with more information:
interface eth0 static ip_address=192.168.1.1/24
Then here's what @ingo asked for:
~ $ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:6a:60:12 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::c06d:1f08:cc48:4736/64 scope link valid_lft forever preferred_lft forever 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:3f:35:47 brd ff:ff:ff:ff:ff:ff inet 10.0.0.14/24 brd 10.0.0.255 scope global noprefixroute wlan0 valid_lft forever preferred_lft forever inet6 fe80::2ab4:1087:6f56:d4ad/64 scope link valid_lft forever preferred_lft forever ~ $ ip route default via 10.0.0.1 dev wlan0 proto dhcp src 10.0.0.14 metric 303 10.0.0.0/24 dev wlan0 proto dhcp scope link src 10.0.0.14 metric 303 192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.1 metric 202 ~ $ cat /proc/sys/net/ipv4/ip_forward 0
I'm thinking that seems good, but I still can't ping .25 from. the .1 pi. (This was an unrelated problem. See my answer for mistakes I made.)