I hope some can help me. I installed
dhcpcd (to be able to use WiFi) on a custom Debian build for a Raspberry (so I can have a 64 bit OS). It seems to work all fine. The WiFi link is getting established as it should and the ethernet link works too. but it seems like dhcpcd doesn't add the default gateway. Disabling gets me default gateway for eth0 but wlan0 won't work then. I tried my best to reverse engineer Raspbian but at this point I'm stuck.
I haven't touched the
/etc/dhcpcd.conf and even removing/renaming (
because the file doesn't exist on Raspbian from what I can tell turns out it exists and ext2explore just couldn't properly read the SD card. Though the files are identical, after I checked it on a live system) didn't make any difference.
ip r gives me this output:
root@raspi# ip r default dev eth0 proto kernel scope link metric 202 default dev wlan0 proto kernel scope link metric 303 10.128.2.0/24 dev eth0 proto kernel scope link src 10.128.2.151 10.128.2.0/24 dev wlan0 proto kernel scope link src 10.128.2.161 10.128.2.1 dev eth0 proto dhcp scope link src 10.128.2.151 metric 1024 10.128.2.1 dev wlan0 proto dhcp scope link src 10.128.2.161 metric 1024 169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.228.181 metric 202 169.254.0.0/16 dev wlan0 proto kernel scope link src 169.254.229.219 metric 303
route -n this:
root@raspi# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 202 0 0 eth0 0.0.0.0 0.0.0.0 0.0.0.0 U 303 0 0 wlan0 10.128.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.128.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 10.128.2.1 0.0.0.0 255.255.255.255 UH 1024 0 0 eth0 10.128.2.1 0.0.0.0 255.255.255.255 UH 1024 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 202 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 303 0 0 wlan0
For reference, this is the
# A sample configuration for dhcpcd. # See dhcpcd.conf(5) for details. # Allow users of this group to interact with dhcpcd via the control socket. #controlgroup wheel # Inform the DHCP server of our hostname for DDNS. hostname # Use the hardware address of the interface for the Client ID. clientid # or # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. # Some non-RFC compliant DHCP servers do not reply with this set. # In this case, comment out duid and enable clientid above. #duid # Persist interface configuration when dhcpcd exits. persistent # Rapid commit support. # Safe to enable by default because it requires the equivalent option set # on the server to actually work. option rapid_commit # A list of options to request from the DHCP server. option domain_name_servers, domain_name, domain_search, host_name option classless_static_routes # Most distributions have NTP support. option ntp_servers # Respect the network MTU. This is applied to DHCP routes. option interface_mtu # A ServerID is required by RFC2131. require dhcp_server_identifier # Generate Stable Private IPv6 Addresses instead of hardware based ones slaac private # Example static IP configuration: #interface eth0 #static ip_address=192.168.0.10/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 #static routers=192.168.0.1 #static domain_name_servers=192.168.0.1 126.96.36.199 fd51:42f8:caae:d92e::1 # It is possible to fall back to a static IP if DHCP fails: # define static profile #profile static_eth0 #static ip_address=192.168.1.23/24 #static routers=192.168.1.1 #static domain_name_servers=192.168.1.1 # fallback to static profile on eth0 #interface eth0 #fallback static_eth0
If you need more information, please let me know and I'll be happy to supply them.
Also adding the default gateway manually makes it work, but that's the job of the DHCP.
I found these questions, but they either use a static configuration, which is not what I want, have other unrelated issues, or are unsolved.
- Default gateway gone after restart
- Wifi works, ssh can connect, but cannot connect out to the internet, cannot ping internal machines
- Default gateway is missing
Also the image itself has been created with a slightly customized version of: https://github.com/drtyhlpr/rpi23-gen-image