Posted: Fri Jan 13, 2012 13:35 Post subject: Assign WAN Port to Switch
Hi,
i have the TP-Link WR1043ND V 1.8 with build 18024 running.
I want to use the WAN port as switchport and disabled the WAN connection type and selectet "Assign WAN Port to Switch". After that i can ping the router from devices on the LAN and the WAN port but the devices can't ping each other.
To fix this, i used as startup command following command:
Code:
swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
Please restore Factory Defaults. Execute "dmesg" and "nvram show | sort". Zip the results and upload here. _________________ DD-WRT Forum - Atheros Recommended Build
After that i chose "WAN Connection Type" Disable and "Assign WAN Port to Switch" but also no connection to the host on WAN Port. In this state i made a brctl and swconfig.
It looks like that the WAN Port (interface VLAN 2) isn't connected to the bridge br0.
vlans=0
port0vlans=1
port1vlans=0
port2vlans=0
port3vlans=0
port4vlans=0
port5vlans=0 1 16
vlan0hwname=et0
vlan0ports=1 2 3 4 5*
vlan1_bridged=1
vlan1hwname=et0
vlan1ports=0 5
# The above nvram variables don't match with the TL-WR1043ND switch configuration and are ignored by setting "vlans=0".
# On the other hand, they look pretty similar to the switch configuration of WRT54G.
#---------------- 8< ----------------
lan_ifname=br0
lan_ifnames=vlan1 ath0
wan_default=vlan2
wan_ifname=vlan2
wan_ifname2=vlan2
wan_ifnames=vlan2
I think kernel just uses the names "vlan1" and "vlan2" so it works even without defining "vlan2ports". Probably it's hard-coded in the firmware or it just reads the nvram variables "lan_ifname" and "wan_ifname" without reconfiguring the switch with swconfig.
Anyway, here's what I want you to do. Just a pure guess.
"WAN Connection Type" Disable
"Assign WAN Port to Switch"
Now check if these nvram variables were cleared.
wan_default
wan_ifname
wan_ifname2
wan_ifnames
Next,
Code:
nvram set vlans=1
nvram set port1vlans=1
nvram set port2vlans=1
nvram set port3vlans=1
nvram set port4vlans=1
nvram set port5vlans="1 16"
nvram unset vlan0hwname
nvram unset vlan0ports
nvram set vlan1hwname=rtl8366rb
nvram set vlan1ports="0 1 2 3 4 5t"
nvram set wan_default=
nvram set wan_ifname=
nvram set wan_ifname2=
nvram set wan_ifnames=
nvram commit
Posted: Sat Feb 04, 2012 1:57 Post subject: Re: Assign WAN Port to Switch
Thank you. I think BrainSlayer really really forgot to implement reading switch configurtion nvram variables in the kernel and we have to do it by ourselves.
I think the nvram variables that really matter are,
lan_ifname=br0
lan_ifnames=vlan1 ath0
wan_default=vlan2 # backup of wan_ifname
wan_ifname=vlan2
wan_ifname2=vlan2 # backup of wan_ifnames
wan_ifnames=vlan2
If we reconfigure the ethernet switch, I think we should also restart the interfaces.
hugo4756 wrote:
i have the TP-Link WR1043ND V 1.8 with build 18024 running.
I want to use the WAN port as switchport and disabled the WAN connection type and selectet "Assign WAN Port to Switch". After that i can ping the router from devices on the LAN and the WAN port but the devices can't ping each other.
To fix this, i used as startup command following command:
Code:
swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
I agree that executing swconfig is a must and maybe,
Code:
stopservice lan
startservice lan
or
Code:
ifdown vlan1
ifup vlan1
which I'm not sure. My concern is the internal port 0 which is moved from WAN/vlan2 to LAN/vlan1. Can you confirm that swconfig is the only command that you must execute as Startup commands and nothing else?
Posted: Sun Feb 05, 2012 1:24 Post subject: Assign WAN to LAN
I am experiencing this issue as well. I am trying to utilize the TL-1043ND as a WAP. I followed the wiki article here http://www.dd-wrt.com/wiki/index.php/Wireless_Access_Point but when wireless clients connect to the AP, they are unable to obtain network connectivity.
Joined: 06 Feb 2010 Posts: 7401 Location: Little Rock
Posted: Sun Feb 05, 2012 2:29 Post subject: Re: Assign WAN to LAN
drewzy52 wrote:
I am experiencing this issue as well. I am trying to utilize the TL-1043ND as a WAP. I followed the wiki article here http://www.dd-wrt.com/wiki/index.php/Wireless_Access_Point but when wireless clients connect to the AP, they are unable to obtain network connectivity.
Posted: Sun Feb 05, 2012 3:21 Post subject: Re: Assign WAN Port to Switch
fyi2000 wrote:
Thank you. I think BrainSlayer really really forgot to implement reading switch configurtion nvram variables in the kernel and we have to do it by ourselves.
I don't think that the switch driver dd-wrt uses has the ability to reconfigure the switch port settings, seems to me that dd-wrt relies on the port assignments made by the boot loader.
Much can be done here, the 2 different 8366 switches has well documented register usage and Realtek provides a rich API for controlling these switches. _________________ Kernel panic: Aiee, killing interrupt handler!
Posted: Sun Feb 05, 2012 8:18 Post subject: Re: Assign WAN Port to Switch
hugo4756 wrote:
swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
Hello hugo4756,
Can you provide "swconfig dev rtl8366rb vlan 1 show" after reconfiguring vlan 1?
LOM wrote:
I don't think that the switch driver dd-wrt uses has the ability to reconfigure the switch port settings, seems to me that dd-wrt relies on the port assignments made by the boot loader.
I guys, i have the same issue...so to fix the problem i should:
wconfig dev rtl8366rb vlan 1 set ports "0 1 2 3 5t"
swconfig dev rtl8366rb vlan 2 set ports "4 5t"
Posted: Thu May 10, 2012 1:06 Post subject: Re: Assign WAN Port to Switch
hugo4756 wrote:
Hi,
i have the TP-Link WR1043ND V 1.8 with build 18024 running.
I want to use the WAN port as switchport and disabled the WAN connection type and selectet "Assign WAN Port to Switch". After that i can ping the router from devices on the LAN and the WAN port but the devices can't ping each other.
To fix this, i used as startup command following command:
Code:
swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
Is there a better way to fix this problem?
That command works here on my TL-WR1043ND v.1.8 running build 18777.
Thanks, have been searching a way to get the Assign WAN port to Switch working via Linux command for months.
swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
stopservice lan
startservice lan
I've put this in my rc_firewall command, and it's working after a reboot. Without the stop/start service, it doesn't work.
I tested this by doing a ping to a device on a normal port, which worked. Unplugging it and moved it to the WAN port stopped the ping. Running swconfig did not result in ping. Stop/start service = ping