First time setup openwrt on Raspberry Pi model 4B

I stumbled around and was able to install openwrt and Luci.
Current:
Onboard ethernet port is static as 192.168.8.199.
I have a USB>Ethernet adapter.

I want one ethernet port to be DHCP client (WAN)
I want one ethernet port to be DHCP server (LAN)
I want on board Wi-Fi to be bridge-LAN DHCP server (WLAN)

Regards, Chuck

1 Like

The default configuration has lan as a DHCP server. You can simply create a wifi AP and attach it to LAN to have wireless devices on the LAN.

Install USB Ethernet drivers matching the chip in your adapter. After the driver recognizes the hardware, an "eth1" port should appear in the list of physical ports (go to the lan interface, click physical tab, pull down the box). If you add eth1 to the lan it will work like a lan port. This is a good way to test that your drivers are working. Then remove it from lan.

Now having an extra Ethernet port, add a wan network. Name it exactly 'wan' (not 'WAN'). Protocol is DHCP client. Physical device is eth1. Plug that into your modem or other existing network. It should now be possible to route to the Internet from lan.

2 Likes

Better use wulfy's image.
It has preinstalled the Luci, usb2eth drivers and most things will mostly work out of the box, like lan+wlan.

2 Likes

Hi, trendy:
I followed your link.
I found no description of what "wulfy's image" does.
It feels like you are suggesting that I leave this foggy room to enter a pitch-black room.
:slight_smile:
Chuck

Wulfy just put together a premade image that has lots of things people would usually want out of the box. Such as drivers for USB ethernet devices. You install that instead of official snapshots and then it's more easy to get started.

2 Likes

Installed TPLink UE300 module.
Network>Interfaces>LAN>Edit ?
added eth1 to LAN port
SAVE
Save: Failed to confirm apply within 90s, waiting for rollback…
Fail!

I have lost access to the RPi4. :frowning:

Is this "Wulfy's image" for a Raspberry Pi or what?
I find no description.

The title of the topic is RPi4, that's self explaining.

Maybe you should take smaller steps since you are new here. Is there a particular reason you need to move the lan from eth0?

Are you running wulfy build or generic snapshot? If you really did change lan from eth0 to eth1 you should be able to reconnect by plugging your PC into the USB adapter. Needed to make sure LAN is a bridge (it is by default) and both eth0 and eth1 are checked.

I would love to take smaller steps.
I want my LAN on eth0 (and bridged with the onboard wlan0 Wi-Fi, as a DHCP server).
I want my WAN on eth1 (which DHCPC connects to my ISP modem).

I am trying to configure:
1087 Raspberry Pi Foundation Raspberry Pi 4 B snapshot raspberry_pi View/Edit data
I do not know what 'wulfy' is. I find no documentation.
"Needed to make sure LAN is a bridge (it is by default) and both eth0 and eth1 are checked."
Huh? 'both eth0 and eth1 are checked.' Where checked?

1st time openwrt,
Chuck

In Luci pull down Network and click Interfaces. Find the line for LAN and click the Edit button. Click Physical Settings tab. Confirm the check box Bridge Interfaces is checked. At the bottom pull down the interface selector and check both eth0 and eth1.

Or you can go straight to setting up a wan network. On Network--Interfaces click Add New Interface at the bottom left. Type wan into the name box. Choose Protocol DHCP Client. Do not check Bridge. Pull down the interface selector and chose eth1.

If the USB to Ethernet drivers are not properly installed or the adapter is not plugged in, you won't see a choice for eth1. Do not try to add it manually. Find the problem with the adapter drivers.

1 Like

RPI4 is still snapshot only there is no luci until you install it manually

and hopefully also the USB driver.

1 Like

mk24/dlakelan: Got it. Thanks.
I have eth0 and wlan0 (bridged, I think). It accepts 'ssh' and 'http' access on eth0 and wlan0.

  • Both are static 192.168.8.202
  • wlan0 is 5 GHz channel 36, 5180 MHz. I found a command to change VHT80 to HT20)
  • The only device I have with 5 GHz Wi-Fi is my cellphone.
    eth1 gets 192.168.8.137 from my home router, but no response with 'ssh' nor 'http:'
    This seems correct as a basic router should ignore all packets initiating from the outside. ?

So, I think now I should set my LAN (eth0,wlan0) to 192.168.1.1

  • (static and different from my home router).
    Set eth0/wlan0 to proto=DHCP .vs. static(?)
    Set a DHCP address range (ex. 192.168.1.129 > 192.168.1.192)
    Though I don't know how, yet.

My home LAN is 192.168.8.0/24, router is 192.168.8.1

Chuck

mk24: Thanks.
Yes. Once I got eth0 to static 192.168.8.202
(outside my home router's DHCP address range).
I was able to use 'opkg' to install 'LuCI' and
the driver for my TPLink UE300 gigabit USB 3.0 to ethernet adapter.
([SOLVED] Raspberry Pi 4 and TP-Link UE300 USB Ethernet dongle)
I think I used
uci set wireless.radio0.htmode='HT20'
to switch from 'VHT80' to 'HT20' so that my cellphone would see the 'AP' on wlan0.

Chuck

To route from lan to wan they have to have different subnet IP ranges. Change the OpenWrt lan to something other than 192.168.8.x.

Hi, mk24: Thanks.
Yes, but I inserted a standard residential router in-the-middle on 192.168.14.1.
So, to change the IP address of LAN/eth0/wlan0, I would:
Network>Interfaces>LAN>Edit>General Settings> IPv4 address: 192.168.7.1 > Save ?
Next, to enable DHCP Server in eth0/wlan0 I would:
Network>Interfaces>LAN>Edit >DHCP Server > Save ?

Chuck

Hi, trendy:
I have 2 PBX IAX2 (port 4569) trunks from different VoIP servers and
2 SIP (port 5060) accounts with different servers.
Which 'wulfy' do you recommend:
rpi-4_snapshot_2.3.637-2_r15199_extra
rpi-4_snapshot_2.3.637-2_r15199_extra_neil1_nft_qos
rpi-4_snapshot_2.3.637-3_r15199_std
?
Chuck

The std, the others are experimental ones.