WHR-G300N v.1 switch ports not working

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Author Message
guapoloco
DD-WRT Novice


Joined: 02 Apr 2021
Posts: 4

PostPosted: Fri Apr 02, 2021 4:40    Post subject: WHR-G300N v.1 switch ports not working Reply with quote
Running firmware v.3 r46239
Wireless works, can connect to router, access web UI, but not via wired network.
I can get an IP from DD-Wrt DHCP, but can't ping the router.
The IPs' I'm getting are not at the beginning of the scope, e.g. wireless ends with 111 while the wired one ends with 131.
Checked vlans and this is what I got:
nvram show | grep vlan.*ports | sort
size: 19738 bytes (45798 left)
vlan0ports=1 2 3 4 5*
vlan1ports=0 5
nvram show | grep port.*vlans | sort
size: 19738 bytes (45798 left)
port0vlans=1
port1vlans=0
port2vlans=0
port3vlans=0
port4vlans=0
port5vlans=0 1 16
nvram show | grep vlan.*hwname | sort
size: 19738 bytes (45798 left)
vlan0hwname=et0
vlan1hwname=et0

Looking at the web UI WAN is set to vlan2, but is not listed in the CLI, also vlan0 is not listed under current bridging table in the web UI, vlan1 and ra0, are.
Have tried moving the ports to vlan1, but no success.
Is CLI vlan0=vlan1 in the webUI? What should be the correct settings for the switch ports to be able to access the router?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Fri Apr 02, 2021 13:23    Post subject: Reply with quote
This router is not Broadcom. You are trying to sort it using Broadcom methods. This device uses swconfig. What is the output of 'swconfig list'?

https://wiki.dd-wrt.com/wiki/index.php/WHR-G300N

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=38307

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=45753

Also, output of 'iptables -vnL' may help. Are you sure this isn't a possible configuration or firewall issue?

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
guapoloco
DD-WRT Novice


Joined: 02 Apr 2021
Posts: 4

PostPosted: Fri Apr 02, 2021 21:57    Post subject: Reply with quote
Thank you for replying, I get swconfig not found, that's why I was using nvram, maybe the firmware I'm using is not the correct one? I downloaded from betas->whr-g300n, did download and installs from different years, I think the nvram for the vlan's don't get affected by firmware installs? Here's the output from the iptables -vnL
. My setup is main router running ISP modem in bridge mode ->OpenWrt router->switch linked to another switch(both dumb different floors)->whr-g300n DD-wrt. For the longest time was running fine only wifi, but decided to make use of the ports on the whr-g300n and isolate networks.

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
402 20645 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT udp -- vlan2 * 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
1005 87972 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- vlan2 * 0.0.0.0/0 192.168.2.1 tcp dpt:23
0 0 DROP icmp -- vlan2 * 0.0.0.0/0 0.0.0.0/0
245 7840 DROP 2 -- vlan2 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
16254 1716K DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
157K 125M ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
1912 508K upnp 0 -- * * 0.0.0.0/0 0.0.0.0/0
1912 508K lan2wan 0 -- * * 0.0.0.0/0 0.0.0.0/0
18 4033 ACCEPT 0 -- br0 br0 0.0.0.0/0 0.0.0.0/0
1894 504K ACCEPT 0 -- br0 vlan2 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- * vlan2 192.168.2.0/24 0.0.0.0/0 tcp dpt:1723
0 0 ACCEPT 47 -- * vlan2 192.168.2.0/24 0.0.0.0/0
0 0 TRIGGER 0 -- vlan2 br0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
0 0 TRIGGER 0 -- vlan2 eth2 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- eth2 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- eth2 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 TRIGGER 0 -- vlan2 vlan1 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- vlan1 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- vlan1 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 TRIGGER 0 -- vlan2 ra0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- ra0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- ra0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 TRIGGER 0 -- vlan2 apcli0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- apcli0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- apcli0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 TRIGGER 0 -- vlan2 wds0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- wds0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- wds0 * 0.0.0.0/0 0.0.0.0/0
guapoloco
DD-WRT Novice


Joined: 02 Apr 2021
Posts: 4

PostPosted: Fri Apr 02, 2021 22:09    Post subject: Reply with quote
Running whr-g300n v.1 DD-WRT as gateway: update: all ports but one (the one farthest from the WAN port) are working, meaning I am getting IP from DD-wrt's DHCP, and access router/internet. DD-wrt getting IP from OpenWrt router as WAN IP. Can't access other hosts in the OpenWRT network which was the goal. Is WHR-G300N firmware supposed to have swconfig?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Fri Apr 02, 2021 22:37    Post subject: Reply with quote
I guess it doesn't have swconfig. No idea then specifically how the vlans and switch ports on this one work or are configured, or if it even supports vlans.

There is a possibility as old as this device is, there may be hardware failure present as well.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
guapoloco
DD-WRT Novice


Joined: 02 Apr 2021
Posts: 4

PostPosted: Sat Apr 03, 2021 2:53    Post subject: Reply with quote
Many thanks, this device has been money worthy!
0;root@DD-WRT: ~root@DD-WRT:~# nvram show | grep port.*vlans | sort
size: 21768 bytes (43768 left)
port0vlans=1
port1vlans=1
port2vlans=1
port3vlans=1
port4vlans=1
port5vlans=0 1 16
0;root@DD-WRT: ~root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 21768 bytes (43768 left)
vlan0ports=5*
vlan1ports=0 1 2 3 4 5
after doing
nvram commit
reboot
and ports not working, disconnected the power from the whr-g300n for a few seconds, then waited for it to boot and after a while the ports (besides the one closest to the router mode switch) started working... it was also weird that plugging the ethernet cable to the switch connecting to the openwrt network and then back to the whr-g300n would result in the same "problem" again, but after leaving plugged for a while, it started working again. It's been stable since. Many thanks again.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum