Troubleshooting Network Issues on a Raspberry Pi with pfSense

image_print

Troubleshooting Network Issues on a Raspberry Pi with pfSense

Recently, I encountered a network connectivity issue with my Raspberry Pi running Raspberry Pi OS Bookworm, where the device was not receiving an IP address from my pfSense router’s DHCP server. After some investigation and adjustments, I was able to resolve the problem successfully. Here’s a detailed blog post to help others facing similar challenges.

Initial Symptoms

The issue was that my Raspberry Pi, connected via a wired Ethernet connection, was not receiving an IP address from my pfSense DHCP server. The default DHCP client, dhcpcd, was active and causing conflicts. Although NetworkManager was installed, it was not active, leading to further issues.

Diagnosing the Issue

Step 1: Check Network Interface Status

I began by checking the network interface status using:

nmcli device status

The output revealed that eth0 was connected but not receiving an IP address.

Step 2: Verify IP Assignment

To verify whether the Raspberry Pi was assigned an IP address, I used:

ip a show eth0

The result showed an IP address (192.168.0.224) and a valid lease from the pfSense DHCP server.

Step 3: Confirm the Default Gateway

Next, I checked the default gateway configuration:

ip route

The default route correctly pointed to the pfSense router at 192.168.0.1.

Changing DHCP Client to NetworkManager

The default DHCP client on Raspberry Pi OS Bookworm is dhcpcd, which can cause conflicts. To switch to NetworkManager, I used:

sudo raspi-config

I navigated to Advanced Options > Network Config > NetworkManager, selected it, and rebooted the Raspberry Pi. This change resolved the DHCP conflict and allowed the device to obtain an IP address correctly.

Testing Network Connectivity

Ping Test

I ran a basic connectivity test:

ping 8.8.8.8
ping google.com

Both tests were successful, indicating no connectivity issues.

Resolving the Issue

The issue was resolved by disabling dhcpcd and enabling NetworkManager using sudo raspi-config. No further DNS changes were required as the default settings pointed correctly to the pfSense router.

Conclusion

After switching to NetworkManager using sudo raspi-config, my Raspberry Pi successfully received a DHCP lease from the pfSense router, and the network connectivity was fully restored. If you’re experiencing similar issues, following these steps can help identify and resolve the problem effectively.

Feel free to share your own network troubleshooting experiences or reach out for further assistance!

You may also like...