Hello, I installed OpenWRT on Raspberry Pi 4 B, and configuring WireGurard client on it. I'm following instructions (very bad one, bat its the only that I found) from here - https://habr.com/ru/articles/694710/.
Steps: I configured WiFi. Added WAN int and binded it to eth0.
Problem: when I change LAN int - remove bridge lan-eth0 (to make free eth0 to be used only in WAN), and change it to interface wireless, in my case it is - phy0-ap0, after restart I loose connectivity to device. Checking via console I can see that phy0-ap0 does not have any IP assigned. I manually add via console using ifconfig custom IP to int phy0-ap0, and then I'm able to connect. After login I can see this error on int phy0-ap0 - Error: Unknown error (device_claim_failed); please see screenshots attached. When I restart int phy0-ap0 inside GUI all returns to normal - it gets ip assigned and DHCP is working, I can connect via GUI and SSH, internet access is working. But after any reboot of device I loose connectivity and I have the same problem again. What could be the issue here? Thank you.
Update: Inteface wg0 is already configured, but was down because eth0 cable was not connected.
Here is the full picture:
This is configured setup for the moment on all interfaces on OpenWRT:
root@OpenWrt:~# ifconfig
eth0 Link encap:Ethernet HWaddr D8:3A:DD:66:57:AC
inet addr:192.168.7.12 Bcast:192.168.7.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6264 errors:0 dropped:0 overruns:0 frame:0
TX packets:4716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:731805 (714.6 KiB) TX bytes:673446 (657.6 KiB)
phy0-ap0 Link encap:Ethernet HWaddr DA:3A:DD:66:57:AC
This IP is assigned by using ifconfig -- >> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 - on the interface to which I connected now IP 192.168.4.1 with DHCP ON
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10049 errors:0 dropped:0 overruns:0 frame:0
TX packets:9259 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:993744 (970.4 KiB) TX bytes:2719291 (2.5 MiB)
Currently, this is the OpenWRT release I'm trying to work on:
root@OpenWrt:/etc# cat openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='23.05.0'
DISTRIB_REVISION='r23497-6637af95aa'
DISTRIB_TARGET='bcm27xx/bcm2711'
DISTRIB_ARCH='aarch64_cortex-a72'
DISTRIB_DESCRIPTION='OpenWrt 23.05.0 r23497-6637af95aa'
DISTRIB_TAINTS=''
root@OpenWrt:/etc#
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
A question: I removed eth0 from br-lan, it was still binded, now removed.
But I can not add to bridge interface phy0-ap0: its not listed (guessed that's how it should be earlier, but it does not work) - >>
Apparently, it looks like these two advices worked out! After reboot I receive correct IP address assignment on interface phy0-ap0 (wireless) , and internet access is working -) Now I can proceed to second stage of configuring WireGuard interfaces between my Raspberry and my VDS server.
Remove eth0 from here:
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
and
Make wan lowercase:
config interface 'WAN'
option proto 'dhcp'
option device 'eth0'
option hostname '*