Reset Network Interface

After Changes to the network interface configuration, you have to restart the network interface using this (assuming the interface is called “eth0”). Alternative if you get error message (“ifdown: unknown interface wlan0”) for wlan0 WiFi interface reset doesn’t work? We’ve found using Raspberry Pi OS Buster the above commands no longer cause the WiFi interace […]

Read More

Configuring WiFi

Manually Configuring WiFi The file /etc/wpa_supplicant/wpa_supplicant.conf will be created/modified when setting up WiFi (it is referenced from the /etc/network/interfaces file that is no longer to be edited). You can find details of what it needs to contain here. An example network to add to the bottom of the file: After making changes reset the interface – see […]

Read More

Routing Table

Display current routing table route -n Discover which interface will be used for a specific IP address ip route get 8.8.8.8 Setting wlan interfaces to be high priority for routing than eth0, if present sudo nano /etc/dhcpcd.conf Add these lines to the end (or add "metric" to the existing interface definitions if you've already specified […]

Read More

Multiple Network Adaptors

Using eth0 and wlan0 This can be problematic with Raspbian.  We have found out the hard way that using DHCP on both adaptors results in eth0 working fine but the gateway IP address assigned by wlan0 DHCP being completely ignored and when using wlan0 to send packets the Linux OS sends ARP requests assuming that any destination IP address […]

Read More

Check interface connection and trigger reconnect

If WiFi is lost raspbian doesn't seem to currently reconnect if an access point is available again.  You need to setup a script to check it and cause it to be reset if it has dropped out.  See here. C Code To Check Connection Status & Trigger Reconnect Of Dropped WiFi Interface #define TCPIP_INTERFACE_RESET_SECONDS_TIME (5 * 60) //If interface is […]

Read More

Networking Commands

List Network Adaptors Is Network Interface Connected Indicates the interface operational state, possible values are: “unknown”, “notpresent”, “down”, “lowerlayerdown”, “testing”,”dormant”, “up”.”no such file or directory” You can test for “up”. Will give a result of 0, 1 or a ‘no such file or directory’ error message. NOTE – we have seen this commant return a […]

Read More

Adding A 2nd Fixed IP Address To The Ethernet Port

For example, say you want the RPi Ethernet port to use DHCP, but to also have a fixed IP address so you can connect to it using a direct cable connection from a laptop. sudo nano /etc/network/interfaces Use this for the eth0 adaptor: auto eth0 allow-hotplug eth0 iface eth0 inet dhcp auto eth0:1 iface eth0:1 […]

Read More

RPi As Wifi Access Point

Compatible USB WiFi Adaptors You need a wifi dongle that supports "managed" mode. Guides www.pi-point.co.uk Fixing the onboard WiFi to be wlan0 Will be needed if you will be plugging in USB WiFi dongles.  See here: https://raspberry-projects.com/pi/pi-operating-systems/raspbian/network-settings/multiple-network-adaptors

Read More

Configuring Network Adaptors

Editing Network Adaptor Settings Restarting After Changes After changes to the network interface configuration, you have to restart the network interface using this (assuming the interface is called “eth0”). sudo ip link set eth0 down && sudo ip link set eth0 up Assigning A Manual IP Address For recent versions of Raspbian /etc/network/interfaces should no longer be […]

Read More