Switch ZyXEL XGS1250-12 no IP's, no internet?

Hi guys,

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 :wink: 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).

The ZyXEL XGS1250-12 is even listed as supported in the table of hardware.

I can't imagine that the switch is kinda useless on OpenWrt. Isn't it just a configuration issue?

Did it work with the factory firmware?

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?

Thank you for your reply @jdwl1o1 !

Did it work with the factory firmware?

Unfortunately I did not try that.

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

Check your uboot variables again. Without a ‘saveenv’ before booting that new bootcmd would only apply for that single boot

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)?

install uboot-envtools, and use fw_printenv.

1 Like

This looks very interesting. But I guess I have a chicken-egg-problem:

opkg update -> no internet

scp uboot-envtools_2023.04-1_mips_24kc.ipk  root@192.168.XXX.XXX:/tmp/
ash: /usr/libexec/sftp-server: not found
scp: Connection closed

Any other idea or only serial cable would work in my case?

Force a scp transfer.

Try scp -O ..., use old pre-SFTP protocol.

Thank you guys! With -O the installation worked and I was able to check:

fw_printenv
bootcmd=rtk network on; boota

So it seems to be included right?

1 Like

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?

serial/boot loader recovery.

before you do the actual recovery, save the log from the failed snapshot boot, it might be useful for investigating why it failed.

I am connected via serial (feels like ssh into openwrt). How can I trigger the boot loader recovery?

By interrupting the boot process before Openwrt boots.

I was somehow able to recover to openwrt latest stable version =)

However, the initial problem still exists.
Any other idea how I can fix the no-IP-assigning-problem?

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:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Sure!

ubus call system board
{
	"kernel": "5.15.167",
	"hostname": "OpenWrt",
	"system": "RTL9302B",
	"model": "Zyxel XGS1250-12 Switch",
	"board_name": "zyxel,xgs1250-12",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.5",
		"revision": "r24106-10cc5fcd00",
		"target": "realtek/rtl930x",
		"description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
	}
}

cat /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fddc:e7d5:ccfd::/48'

config device 'switch'
	option name 'switch'
	option type 'bridge'
	option macaddr ''

config bridge-vlan 'lan_vlan'
	option device 'switch'
	option vlan '1'
	option ports 'lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 lan9 lan10 lan11 lan12'

config device
	option name 'switch.1'
	option macaddr ''

config interface 'lan'
	option device 'switch.1'
	option proto 'static'
	option ipaddr '192.168.XXX.12'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option gateway '192.168.XXX.1'

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

Did you add did you add the .1 to this config?