Assign WAN Port to Switch

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
hugo4756
DD-WRT Novice


Joined: 06 Nov 2010
Posts: 4

PostPosted: Fri Jan 13, 2012 13:35    Post subject: Assign WAN Port to Switch Reply with quote
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?
Sponsor
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Mon Jan 23, 2012 20:30    Post subject: Reply with quote
Please restore Factory Defaults. Execute "dmesg" and "nvram show | sort". Zip the results and upload here.
_________________
DD-WRT Forum - Atheros Recommended Build
hugo4756
DD-WRT Novice


Joined: 06 Nov 2010
Posts: 4

PostPosted: Tue Jan 24, 2012 20:14    Post subject: Reply with quote
dmesg and nvram after 30-30-30 reset.

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.
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Tue Jan 24, 2012 23:02    Post subject: Reply with quote
TL-WR1043ND nvram defaults:
Code:
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

Code:
VLAN 0:
        info: ???
        ports: ???
VLAN 1:
        info: VLAN 1: Ports: '12345t', members=003e, untag=001e, fid=0
        ports: 1 2 3 4 5t
VLAN 2:
        info: VLAN 2: Ports: '05t', members=0021, untag=0001, fid=0
        ports: 0 5t
VLAN 3:
        info: VLAN 3: Ports: '25', members=0024, untag=0024, fid=0
        ports: 2 5
VLAN 4:
        info: VLAN 4: Ports: '35', members=0028, untag=0028, fid=0
        ports: 3 5
VLAN 5:
        info: VLAN 5: Ports: '45', members=0030, untag=0030, fid=0
        ports: 4 5

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

Reboot and execute "ifconfig".

Switched Ports - DD-WRT Wiki

_________________
DD-WRT Forum - Atheros Recommended Build
hugo4756
DD-WRT Novice


Joined: 06 Nov 2010
Posts: 4

PostPosted: Fri Feb 03, 2012 15:55    Post subject: Reply with quote
After

    "WAN Connection Type" Disable
    "Assign WAN Port to Switch"


the nvram settings are:
wan_default=vlan2
wan_ifname=
wan_ifname2=vlan2
wan_ifnames=

then i committed your nvram settings and after the reboot i had this result:
Code:

root@DD-WRT:~# ip a
1: lo: <LOOPBACK,MULTICAST,UP,LOWER_UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: imq0: <NOARP> mtu 16000 qdisc noop qlen 11000
    link/void
3: imq1: <NOARP> mtu 16000 qdisc noop qlen 11000
    link/void
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether f8:d1:11:2f:14:4e brd ff:ff:ff:ff:ff:ff
5: vlan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether f8:d1:11:2f:14:4e brd ff:ff:ff:ff:ff:ff
6: vlan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
    link/ether f8:d1:11:2f:14:4f brd ff:ff:ff:ff:ff:ff
8: br0: <BROADCAST,MULTICAST,UP,LOWER_UP100> mtu 1500 qdisc noqueue
    link/ether f8:d1:11:2f:14:4e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global br0
    inet 169.254.255.1/16 brd 169.254.255.255 scope global br0:0
9: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 32
    link/ether f8:d1:11:2f:14:4e brd ff:ff:ff:ff:ff:ff
10: mon.ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 32
    link/[803] f8:d1:11:2f:14:4e brd ff:ff:ff:ff:ff:ff
11: bond0: <BROADCAST,MULTICAST400> mtu 1500 qdisc noop
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
12: etherip0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
    link/ether a2:be:a7:ef:c2:bf brd ff:ff:ff:ff:ff:ff


and the WAN port still did not work.
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Sat Feb 04, 2012 1:57    Post subject: Re: Assign WAN Port to Switch Reply with quote
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?

DD-WRT Forum :: View topic - solution: TP-Link 1043ND / dead WAN port
Reconfigure VLANs for 802.1q Compatibility - DD-WRT Wiki

_________________
DD-WRT Forum - Atheros Recommended Build
drewzy52
DD-WRT Novice


Joined: 02 Feb 2012
Posts: 1

PostPosted: Sun Feb 05, 2012 1:24    Post subject: Assign WAN to LAN Reply with quote
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.
buddee
DD-WRT Guru


Joined: 06 Feb 2010
Posts: 7386
Location: Little Rock

PostPosted: Sun Feb 05, 2012 2:29    Post subject: Re: Assign WAN to LAN Reply with quote
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.


How is this related to this thread?

_________________
Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ

Having problems with port forwarding? Check out Port Forward Troubleshooting for more info.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7158

PostPosted: Sun Feb 05, 2012 3:21    Post subject: Re: Assign WAN Port to Switch Reply with quote
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.

_________________
I'm on a whiskey diet, lost 3 days already
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Sun Feb 05, 2012 8:18    Post subject: Re: Assign WAN Port to Switch Reply with quote
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.

_________________
DD-WRT Forum - Atheros Recommended Build
K1mer0
DD-WRT Novice


Joined: 14 Mar 2012
Posts: 7

PostPosted: Thu Mar 15, 2012 18:24    Post subject: Reply with quote
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"

Code:
stopservice lan
startservice lan

or
Code:
ifdown vlan1
ifup vlan1

sorry my ignorance...i´m still new on dd-wrt..
petar258
DD-WRT Novice


Joined: 08 Jul 2010
Posts: 2

PostPosted: Tue Mar 20, 2012 22:13    Post subject: Reply with quote
#swconfig dev rtl8366rb vlan 1 show
VLAN 1:
info: VLAN 1: Ports: '012345t', members=003f, untag=001f, fid=0
fid: 0
ports: 0 1 2 3 4 5t
deltatux
DD-WRT User


Joined: 22 Jan 2011
Posts: 72

PostPosted: Thu May 10, 2012 1:06    Post subject: Re: Assign WAN Port to Switch Reply with quote
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.

deltatux
ptruman
DD-WRT User


Joined: 14 May 2008
Posts: 155

PostPosted: Thu May 10, 2012 8:31    Post subject: Reply with quote
I'll try that later.

I have two of these boxes, one is not connected to an ISP (it's just a router) and that (along with broken CIFS) was annoying me!
ptruman
DD-WRT User


Joined: 14 May 2008
Posts: 155

PostPosted: Thu May 10, 2012 8:53    Post subject: Reply with quote
Ok, on 18777, this works if I do the following :

swconfig dev rtl8366rb vlan 1 set ports '0 1 2 3 4 5t'
stopservice lan
startservice lan

Smile

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 Smile
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC 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