How to confugure device with just one Ethernet port?

I have installed lede-ramips-rt305x-a5-v11-squashfs-sysupgrade.bin on a A5-v11 router. I can access it using failsafe. But how do I configure it to connect to the Internet or be accessible when attached to a DHCP LAN via an IP address on the local network?

If I just attach it to the DHCP network without any configuration then it seems to get an IP address (at least my Fritz!Box DHCP server says so) but when I try to log in I cannot:

$ ssh root@192.168.xxx.xxx
ssh: connect to host 192.168.xxx.xxx port 22: No route to host

The device has only one Ethernet port and the instructions in the Quick Start Guide seem to assume I can access the device at 192.168.1.1 and connect it to the Internet via DHCP at the same time. How am I supposed to do that with only one Ethernet port?

Also, I don't seem to see a /etc/config/network file like I was used to in OpenWrt.

I do see

/etc/board.d/02_network
/etc/board.d/99-default_network

though. Are these documented?

In /etc/config/dhcp it seems like the system assumes two Ethernet ports, LAN and WAN when in fact the device has only one...

config dhcp lan
    option interface    lan
    option start     100
    option limit    150
    option leasetime    12h

config dhcp wan
    option interface    wan
    option ignore    1

/etc/board.json contains:

{
    "model": {
        "id": "a5-v11",
        "name": "A5-V11"
    },
    "led": {
        "power": {
            "name": "POWER",
            "sysfs": "a5-v11:red:power",
            "default": "1"
        }
    },
    "switch": {
        "switch0": {
            "enable": false,
            "reset": true
        }
    },
    "network": {
        "lan": {
            "ifname": "eth0",
            "protocol": "static",
            "macaddr": "2c:67:xx:xx:xx:xx"
        }
    }
}

I just went through this with a HooToo TM02. It was a real pain.

Not clear on everything you are doing, but failsafe is accessing the read only portion of the device.
https://wiki.openwrt.org/doc/howto/generic.failsafe

I have to assume that the default config for this is the same as all the other devices. This means you have a functional wired LAN only at your first boot. You should be able to connect directly to the device's lan via Ethernet cable at 192.168.1.1, but there is no GUI installed. See this post for OpenWrt https://wiki.openwrt.org/doc/howto/firstlogin which says tenet to 23, but I think it should be ssh to 22 on LEDE. Not sure.

If you get this far you need to configure your wireless via cli or edit the config file somehow.

The problem you will have with this device is that it only has 4MB flash and probably will not hold much in packages. exroot or build your own may be needed depending on what you want to do. I loaded the packages I needed to the tmp folder and manually installed them as I did not have a WAN connection and could not connect to the repository

If you downloaded you firmware today, you should immediately download all the packages to a local machine. When the build bots rebuild the firmware you may not be able to get the matching packages tomorrow and may have trouble installing some items. At least you will have them. Deal with how and what later.

All said, you are asking for pain. While LEDE has not put a stake in the ground, devices with 4MB flash are not good choices as the firmware takes up almost all the space. You may have better luck with the release image when it comes out as it hopefully will be able to squeeze in Luci and make config easier.

System sets up two interfaces, how you configure these with single-port device is up to you. I went thru the similar experience with D-Link DIR-505 and ended up doing my own build with image builder, reconfiguring network in uci-defaults script and publishing the community build for the device.

With DIR-505 the port was configured for LAN, looks like it's the same with your device, so you may want to/have to set up static IP on your computer, access router at 192.168.1.1, configure wireless, reconfigure ethernet port to act as WAN port, commit changes and reboot.

DIR-505 also has a slider switch which in my build is used to reconfigure things up so device can act as router, dumb ap or wireless repeater.

Thanks for your helpful tips. @stangri I also own a couple of D-Link DIR-505 and I don't like to have to fiddle around with them after flashing a lot, so I'd be interested in what you have done with

doing my own build with image builder, reconfiguring network in uci-defaults script and publishing the community build for the device

Do you think we could make a better uci-defaults script for 1-port devices that might end up being used as the default one for the official builds?

https://forum.openwrt.org/viewtopic.php?id=66391 -- there're both OpenWrt and LEDE images. You can flash and check out uci-defaults in /rom/ or just unpack it from the image.

Better than what?
If you mean you want the port configured for WAN interface in the official build -- no, I don't think so. With WiFi disabled and administration disabled from WAN (both luci and ssh), how would you manage a single-port device if it was configured for WAN rather than LAN?

I think the default behavior out of the box should be that it fetches an IP address from the network using DHCP and opens a SSH server on that IP address.

Of course, that would require you to already have a second router to do any initial configuration.

Edit: Howeeeeeever ... It would entirely be possible to create a "helper script" that waited for a DHCP address for, let's say, 30 seconds and if DHCP didn't happen by then switched to the default static configuration.

Update in case anyone is still interested in this:

Using Image Builder, have a custom /etc/config/network that sets the interface to dhcp something like this (this is for the Orange Pi Zero):

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'dhcp'
	option ip6assign '60'