I hope somebody can help me. For me it is hard to describe and everything doesn't make sense but I try to describe as best as I can.
I bought 3 OpenWrt compatible switches (I like open source, security updates and the same UI everywhere):
(1) ZyXEL GS1900-24E (to have many ports)
(2) ZyXEL GS1900-10HP (for PoE)
(3) ZyXEL XGS1250-12 (having something with 10GBe)
As router I have another OpenWrt device (Raspberry 4, also tried with OPNsense but same behavior).
I just installed latest OpenWrt version, and changed the preconfigured interface "lan" (-> Network -> Interfaces) to:
IPv4 address: 192.168.182.12 (for other switches another IP)
IPv4 netmask: 255.255.255.0
IPv4 gateway: 192.168.182.1 (main OpenWrt router)
For (1) and (2) everything has the expected behavior as a switch. But all devices under (3) don't get any IP address nor internet.
Here are some examples:
Router -> (3) -> (2)
-> (1)
==> no devices under (3) / (2) / (1) get internet/IP.
Router -> (2) -> (3) -> (1)
==> no devices directly under (3) get internet/IP. But devices under (2) / (1) are fine.
No matter whether I am connected to Router / (1) / (2), I can always reach LuCI of (3).
If am connected to (3), I would need to set up a static IP, to reach LuCI of (3).
I mean, it looks like the Switch can do the switching but DHCP maybe not working or something? I have no clue.
1 & 2 are rtl838x based (and relatively mature), 3 is rtl93xx based for which support is rather basic and rough, it's not exactly smooth sailing on this hardware (for completeness' sake, rtl839x is somewhere inbetween).
When the router is directly connected to switch 3 what is the status of the switch ports in the switch's web interface (or console) - are they up or down? Does every port of the switch behave the same way?
Also, at the very bottom of the TOH page there's this callout
" * The network needs to be initialised by the bootloader through the rtk network on command. Otherwise the network won't work."
Is this command included in your uboot boot script?
When the router is directly connected to switch 3 what is the status of the switch ports in the switch's web interface (or console) - are they up or down? Does every port of the switch behave the same way?
On the "Status" page under "Port status", if the ethernet cable is connected I see the "1GBe" (instead of "no link") which is also green and shows some KiB. I tested all (except SFP port) and all have same behavior.
Also, at the very bottom of the TOH page there's this callout
" * The network needs to be initialised by the bootloader through the rtk network on command. Otherwise the network won't work."
Is this command included in your uboot boot script?
Is there a way to double check that afterwards?
I did that during the installation procedure (I would expect, if that step does not work, I could not even install OpenWrt via sysupgrade):
screen /dev/ttyUSB0 115200 #=115200, 8N1
fw_setenv bootcmd 'rtk network on; boota' # <---- here I did
reboot now
ssh root@192.168.1.1
sysupgrade -n /tmp/openwrt-23.05.3-realtek-rtl930x-zyxel_xgs1250-12-squashfs-sysupgrade.bin
Are you sure?
Why is the manual not mentioning it?
Unfortunately, I don't have my serial cable with me, so I cant go into uboot at the moment.
Is there another way to find it out via ssh (nothing found via Google)?
I tried to install the latest snapshot version. Unfortunately no lan's work anymore (also no light). How can I install latest stable if I cant connect to my laptop?
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:
cat /etc/config/wireless
cat: can't open '/etc/config/wireless': No such file or directory
cat /etc/config/dhcp
cat: can't open '/etc/config/dhcp': No such file or directory
cat /etc/config/firewall
config defaults
option syn_flood 1
option input REJECT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
option forward ACCEPT
config zone
option name wan
list network 'wan'
list network 'wan6'
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 ping
config rule
option name Allow-Ping
option src wan
option proto icmp
option icmp_type echo-request
option family ipv4
option target ACCEPT
config rule
option name Allow-IGMP
option src wan
option proto igmp
option family ipv4
option target ACCEPT
# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option dest_port 546
option family ipv6
option target ACCEPT
config rule
option name Allow-MLD
option src wan
option proto icmp
option src_ip fe80::/10
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family ipv6
option target ACCEPT
# Allow essential incoming IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Input
option src wan
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
list icmp_type router-solicitation
list icmp_type neighbour-solicitation
list icmp_type router-advertisement
list icmp_type neighbour-advertisement
option limit 1000/sec
option family ipv6
option target ACCEPT
# Allow essential forwarded IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Forward
option src wan
option dest *
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
option limit 1000/sec
option family ipv6
option target ACCEPT
config rule
option name Allow-IPSec-ESP
option src wan
option dest lan
option proto esp
option target ACCEPT
config rule
option name Allow-ISAKMP
option src wan
option dest lan
option dest_port 500
option proto udp
option target ACCEPT
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# port redirect of remapped ssh port (22001) on wan
#config redirect
# option src wan
# option src_dport 22001
# option dest lan
# option dest_port 22
# option proto tcp
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp