I am not aware that anyone among the developer who has that device already. If you got one yourself, then we can help you get it supported. You should go to https://www.biot.com/switches/models and add a description of the device. Important would be a photo of the interior, plus the output of the "show tech-support" command in the OEM shell, which gives the complete PHY and GPIO mapping of the device. Finally, to build an image the layout of the flash as shown in u-boot. With this information it is usually only about half an hour's work to make a .dts.
As is seems there are a lot of devs here, I'd like to ask for your ideas on how to find the reason for my lan1 not being accessible from the device directly connected to it.
Setup:
D-Link DGS-1210-16 rev. G running OpenWrt master r16153
Internet router (192.168.[1-4].1) serving these 4 VLANs connected to lan1
WLAN-AP (Netgear R7800) with 4 SSIDs corresponding to the 4 VLANs) connected to lan5
Desktop computer connected to WLAN-AP on untagged port with PVID 1
Problem:
Everything works as intended, with one exception: I cannot access the DGS-1210-16 from the router. It does not answer pings or SSH login requests, instead runs into timeouts.
Fun facts:
lan1 seems to work because traffic is flowing through it. I can reach the router through lan1, browse the internet and so on. Only packets coming in on lan1 targeted for the switch itself are ignored.
When plugging the router from lan1 to any other port of lan2..lan8 on the DGS-1210-16, the problem disappears. I don't understand that because lan1..lan8 are using the same configuration in my setup (see below).
What should not be the the reason for this:
iptables (firewall, ip6tables and iptables are omitted from my build)
ebtables (not installed)
different configuration of lan1 (which does not work) and lan2..lan8 (which do work)
See below the output of uci show network.
I'd be very thankful for any hint on how to track down the problem.
I stand corrected. I have no experience with the ALLNET switches.
What I do know is that the Netgear GS108Tv3 will allow you to flash any image with a matching U-Boot image header, but will cut off the file at the size given by that header. Which means that it will write only the kernel part of an OpenWrt sysupgrade image, silently dropping the rootfs, and therefore brick the device.
The ZyXEL GS1900-10HP on the other hand, will only accept images with a ZyXEL specific trailer indicating that it is intended for that specific hardware (using a ZyXEL version number with a 4 letter hardware code). It cuts off the file like the Netgear firmware, so it can't write a kernel+rootfs sysupgrade image either. But it cuts the file before validating the trailer. Which means that we have to include the trailer in the kernel part of the image (inside the size covered by the U-Boot header). This should only be done for the initramfs images, thereby preventing the sysupgrade images from being flashed directly from stock firmware.
I'm totally confused on how to actually access the switch after getting the initial image installed! I've started with a GS108Tv3. Uploaded the initramfs image via the OEM Web access. I can see from the serial port access that OpenWrt is running, but I can't seem to access it from any of the Ethernet ports! From what I've read it should be available at 192.168.1.1 from ports 2-8.
After using Borromini's posted UCI defaults above I was successful in connecting to the switch. Perhaps the default should be changed to something similar so that initial login won't be a crap shoot if you don't have serial access!
Currently, the management interface (luci, ssh, etc.) is only available on port 1 and VID 100, so you need to connect your computer to port1 and configure your computer's network card to use (tag all packets with-) VLAN ID 100 (then you can connect to 192.168.1.1).
Certainly not my favourite either, but it works. I'd be very much in favour of changing the defaults as well, but it is a bit more complex to get this 'right', as it's still a switch and not really a router with routing, NAT, and a DHCPd running - somehow I don't think change this in the last minute (for 21.02.0) would be the best idea (personally I'd favour it to be configured for DHCP-client, but then it gets very special, with even more default assumptions that might go wrong…).
How many people are going to know how to set up their computer's network card to tag all packets with a specific VLAN ID? It would make more sense to set up all ports to the same IP address just like most of the OEM firmware does.
I'm not arguing against that at all, on the contrary, but I do see problems in trying to rush a change (keeping in mind that the realtek target looks like being present in openwrt-21.02) - as a bodged attempt may be more problematic than considering the current state a technology preview with known quirks.
This is definitely a bit late, but I still believe it's better to fix it now before the very first release of this target. A number of advanced early adopters have already been bitten by the issue. There is no doubt that it will cause endless confusion for end users trying to flash an official 21.02 image without having console access.
I'll see if I get around to cook up something later today.
We should also fixup default configuration for switches with more than one mac address, storing the full range in "u-boot-env2" like the ZyXEL GS1900 does.
And the PoE package should go in. It's working very well, and is required for the PoE feature. I see no reason to keep that out of 21.02. It will just confuse and annoy users who have to jump through burning hoops for no reason at all.
Seriously, I have been advocating this from the beginning of Realtek switch support. And I will bring it up once more, and then never again:
If you create OpenWrt for a device, make it an OpenWrt device.
This means using the same default config and the same default packages as any other device. Even if it doesn't look like other devices, or was a different device before (as if that was a factor anyway.)
As much sense as it makes to you to have some pre-configuration that moves it closer to the device it once was, it makes your device "based on OpenWrt" rather than "running OpenWrt." Case in point: It is easier to introduce a VLAN than to remove it. It is easier to disable the default dhcp server and firewall than to recreate it if you need it. It is easier to set an interface to DHCP from the default static adress than the other way around (yes, unfortunately this actually happens on some devices/targets.)
I'm trying to add support for the Netgear GS308T and GS310TP, but because of the horrible default network setup I'm having difficulty determining whether the issues I'm having is related to my total misunderstanding of using tagged VLANS or if there is an issue with the actual device! I get link lights on both the switch and the connected device, but can't get a response from ping or any other service! How exactly must the connected device be configured to access the switch?
Important part to note: It will only work on port 1. That's the only port where VLAN 100 is configured.
(another reason this is a bad idea: port 1 is special on the PoE powered devices like the GS108Tv3, and using it for even temporary management might be a problem if you can't easily reconfigured the PSE)