Raspberry 3 B post-install IP issue

After successful installation and connecting a monitor to check it booting, see below, I should be able to ssh root@192.168.1.1 given that the router is on 192.168.178.1 not inferening. However, ping and ssh to 192.168.1.1 fail. Thank you for your comments.

The default configuration expects that the OpenWrt device is the router. In your case, you need to reconfigure OpenWrt to act as a DHCP client to the main router.

For example, you can plug a computer directly to the RPi, get an IP address, connect to it, then change the configuration.

For example, you can plug a computer directly to the RPi, get an IP address, connect to it, then change the configuration.

Not quite sure how to do this. I tried to break it down.

  1. you can plug a computer directly to the RPi:
    I connect the RPi and Laptop via a LAN cable?

  2. get an IP address
    Since both have just one LAN port and are connected to each other, how to get an IP address for the RPi?

  3. connect to it
    ssh from Laptop to RPI understood.

  4. then change the configuration.
    Which is the command to start DHCP?

Thanks.

According to this guide (https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi#how_to_connect_via_ethernet), the device comes configured with a static IP address of 192.168.1.1. You can configure your laptop as 192.168.1.2 and network mask 255.255.255.0, then connect it using an ethernet cable.

If you want to configure it as a DHCP client, just execute:

uci set network.lan.proto=dhcp
uci commit
/etc/init.d/network restart

It should acquire an IP address from the main router then.

You can configure your laptop as 192.168.1.2 and network mask 255.255.255.0

I read the guide but do not manage to configure the laptop. Here are the detailed questions:

  1. when configuring the laptop, is it still connected to the main LAN or off the hook?

  2. the IP address and submask are set under Linux are set using e.g. nmcli? It would be good to have an example.

Thanks.

You do not need to have the laptop connected to any network to configure a static address.

I have never used NetworkManager, I do not know how to configure a static address with it, but I guess there are tons of guides available online.

https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html#id-1.2.5.6.12

I ended up using:

sudo nm-connection-editor
sudo nmcli connection show

and it worked. Next, it got stuck on

root@OpenWrt:~# uci set network.lan.proto=dhcp
root@OpenWrt:~# uci commit
root@OpenWrt:~# /etc/init.d/network restart
'radio0' is disabled

but that did not matter after a reboot and LAN connected to the cable router (not supported by OpenWrt).

Now, I would like to:

  1. install a firewall
  2. hook computers through an USB-LAN adapter
  3. connect to WiFi via an USB-WLAN adapter

Any advice on how to accomplish all of it? Thanks.

1 Like

Firewall documentation

Package table > kmod-usb + ethernet

Package table > kmod-usb + wireless

2 Likes

Excellent, documentation is in place. Thank you! :slightly_smiling_face:

1 Like

Whilst it acts as a DHCP client, it causes all other devices in the network to loose their connections. How can this be avoided and how come? The devices are not downstream of the OpenWrt Raspberry Pi.

Thanks.

https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#disabling_dhcp_role

2 Likes

Just for the records: all this work is based on an install from here.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.