Linksys E900 lan to wan convertion

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


Joined: 25 May 2017
Posts: 3

PostPosted: Thu May 25, 2017 4:41    Post subject: Linksys E900 lan to wan convertion Reply with quote
Hi,
I have a linksys E900. Recently due to power surge the WAN port is not working. Rest of the Lan port is working. I have installed dd-wrt on the same.

Is it possible to convert one of the LAN port as WAN port ?? If yes can you please provide the steps.

I tried the below link but of no use.
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=933798

Also tried but no use. http://www.dd-wrt.com/wiki/index.php/Switched_Ports

Can anyone help regarding this ??

Thanks,
uday
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu May 25, 2017 7:24    Post subject: Reply with quote
What is your original port set-up?

nvram show | grep vlan.*ports
udaykumar84
DD-WRT Novice


Joined: 25 May 2017
Posts: 3

PostPosted: Thu May 25, 2017 8:33    Post subject: Reply with quote
Hi,
PFB the details after the factory reset:

root@DD-WRT:~# nvram show | grep vlan.*ports
vlan2ports=0 5
vlan0ports=1 2 3 4 5*
vlan1ports=1 2 3 4 5*
size: 19896 bytes (45640 left)
root@DD-WRT:~#
root@DD-WRT:~#
root@DD-WRT:~#
root@DD-WRT:~# nvram show | grep port.*vlans
port5vlans=0 1 16
port3vlans=0
port1vlans=0
port4vlans=0
port2vlans=0
port0vlans=1
size: 19896 bytes (45640 left)
root@DD-WRT:~#
root@DD-WRT:~# nvram show | grep vlan.*hwname
vlan2hwname=et0
vlan1hwname=et0
size: 19896 bytes (45640 left)
vlan0hwname=et0


Thanks,
uday
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu May 25, 2017 10:35    Post subject: Reply with quote
nvram set vlan2ports="1 5"
nvram set vlan0ports="2 3 4 5*"
nvram set vlan1ports="2 3 4 5*"
nvram commit
reboot

Your wan is now on port 1 or 4
I don't know why you have both vlan 1 and 0.
udaykumar84
DD-WRT Novice


Joined: 25 May 2017
Posts: 3

PostPosted: Fri May 26, 2017 3:35    Post subject: Reply with quote
Hi,
Thanks for the info Smile .

After going through this link i got the full view how its configured.
http://www.dd-wrt.com/wiki/index.php/Default_Configuration_Overview


I tried the configuration given by you and its working. I am able to see the PPPoE request sent on the newly configured Wan port.

I too am not sure why vlan 1 and 0 are present.

Thanks,
uday
prakashp
DD-WRT Novice


Joined: 26 Apr 2018
Posts: 4

PostPosted: Thu Apr 26, 2018 15:40    Post subject: Moving LAN port to WAN port Reply with quote
Per Yngve Berg wrote:
nvram set vlan2ports="1 5"
nvram set vlan0ports="2 3 4 5*"
nvram set vlan1ports="2 3 4 5*"
nvram commit
reboot

Your wan is now on port 1 or 4
I don't know why you have both vlan 1 and 0.


Hi,

Recently I'm facing same problem. My router's WAN port has gone bad may be due to power surge. However, the LAN ports and WiFi work. So, I thought I can easily configure one of the LAN port to behave as WAN port but its not happening. My routers configuration(when rest to default) is as below

root@SkyNet:~# nvram show | grep vlan.*ports
vlan2ports=4 5
vlan0ports=1 2 3 4 5*
vlan1ports=0 1 2 3 5*
size: 22746 bytes (42790 left)
root@SkyNet:~# nvram show | grep port.*vlans
port5vlans=0 1 16
port3vlans=0
port1vlans=0
port4vlans=0
port2vlans=0
port0vlans=1
size: 22746 bytes (42790 left)
root@SkyNet:~# nvram show | grep vlan.*hwname
vlan2hwname=et0
vlan1hwname=et0
size: 22746 bytes (42790 left)
vlan0hwname=et0
root@SkyNet:~#


Would you please suggest a setting to move one of the LAN port to WAN port.

Thanks,
-Prakash
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Thu Apr 26, 2018 17:48    Post subject: Re: Moving LAN port to WAN port Reply with quote
prakashp wrote:
I thought I can easily configure one of the LAN port to behave as WAN port but its not happening. My routers configuration(when rest to default) is as below
    root@SkyNet:~# nvram show | grep vlan.*ports
    vlan2ports=4 5
    vlan0ports=1 2 3 4 5*
    vlan1ports=0 1 2 3 5*
    size: 22746 bytes (42790 left)
    root@SkyNet:~# nvram show | grep port.*vlans
    port5vlans=0 1 16
    port3vlans=0
    port1vlans=0
    port4vlans=0
    port2vlans=0
    port0vlans=1
    size: 22746 bytes (42790 left)
    root@SkyNet:~# nvram show | grep vlan.*hwname
    vlan2hwname=et0
    vlan1hwname=et0
    size: 22746 bytes (42790 left)
    vlan0hwname=et0
Is this an E900? Or what model/version/build is it? Those don't look like defaults; did you reset with the GUI, button, or `erase nvram`? From telnet/ssh, do a `strings /dev/mtd0|grep vlan` to check the defaults.

Based on what I know (little) on this stuff, you just need to move one of the vlan1 ports (lan) into vlan2 (wan). Either 0 or 3, depending on which physical port you want, and whether the physical:virtual port mapping is direct or reversed. E.g.:
    vlan2ports=3 4 5
    vlan1ports=0 1 2 5*
And I guess make vlan0ports same as vlan1ports, or don't touch it...?

_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
prakashp
DD-WRT Novice


Joined: 26 Apr 2018
Posts: 4

PostPosted: Thu Apr 26, 2018 18:55    Post subject: Moving LAN port to WAN port Reply with quote
Hi,

Thanks for the reply. Yes its a E900, may be a different variant. I have done the reset using reset button. I have installed "dd-wrt.v24-21061_NEWD-2_K2.6_mini-e900.bin" initially and then did and upgrade to "dd-wrt.v24-21061_NEWD-2_K2.6_big-nv64k.bin". I have tried your suggestion of moving one port from vlan1 to valn2 but it did not work. I don't see PPPoE getting IP from ISP. When I manually click on connect under GUI status menu, the router goes for reboot. May be there is something else is happening or its a time for me to buy new router Sad


Router Model: Linksys E900
Firmware Version: DD-WRT v24-sp2 (03/25/13) big - build 21061
Kernel Version: Linux 2.6.24.111 #14332 Mon Mar 25 04:15:31 CET 2013 mips
CPU Model: Broadcom BCMD144 chip rev 1


root@DD-WRT:~# nvram show | grep model
boot_hw_model=E900
size: 22475 bytes (43061 left)
root@DD-WRT:~# nvram show | grep BOARD
DD_BOARD=Linksys E900
size: 22475 bytes (43061 left)
root@DD-WRT:~#


root@DD-WRT:~# nvram show | grep vlan
vlan2ports=4 5
vlan0ports=1 2 3 4 5*
vlan0_bridged=1
port5vlans=0 1 16
port3vlans=0
port1vlans=0
wl0_vlan_prio_mode=off
vlan2hwname=et0
wan_ifname2=vlan1
pppoe_wan_ifname=vlan2
lan_ifnames=vlan0 eth1 eth2 eth3
wan_default=vlan1
wan_ifnames=vlan1
vlan1hwname=et0
vlan1ports=0 1 2 3 5*
port4vlans=0
vlans=0
port2vlans=0
port0vlans=1
wan_ifname=vlan1
landevs=vlan1 wl0
dtag_vlan8=0
vlan0hwname=et0
size: 22475 bytes (43061 left)


Thanks,
-Prakash
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu Apr 26, 2018 19:29    Post subject: Reply with quote
Get a descent build. The 21061 is very buggy.

ftp://ftp.dd-wrt.com/betas/2018/03-05-2018-r35244/broadcom_K3X/dd-wrt.v24-35244_NEWD-2_K3.x_mega-nv64k.bin
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Thu Apr 26, 2018 19:44    Post subject: Re: Moving LAN port to WAN port Reply with quote
prakashp wrote:
I have tried your suggestion of moving one port from vlan1 to valn2 but it did not work.
Did you also try changing vlan0? To be clear, after making changes (with nvram set), you're using `nvram commit` and `reboot`, and testing both the first and last LAN ports (in case the numbering is reversed)?
prakashp wrote:
root@DD-WRT:~# nvram show | grep vlan
What does this show: strings /dev/mtd0|grep vlan
_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
prakashp
DD-WRT Novice


Joined: 26 Apr 2018
Posts: 4

PostPosted: Thu Apr 26, 2018 21:35    Post subject: Re: Moving LAN port to WAN port Reply with quote
jwh7 wrote:
prakashp wrote:
I have tried your suggestion of moving one port from vlan1 to valn2 but it did not work.
Did you also try changing vlan0? To be clear, after making changes (with nvram set), you're using `nvram commit` and `reboot`, and testing both the first and last LAN ports (in case the numbering is reversed)?


Yes, I also tried changing vlan0 and did make changes with "nvram set" command and then "nvram commit" followed by reboot. It did not work.

prakashp wrote:
root@DD-WRT:~# nvram show | grep vlan
What does this show: strings /dev/mtd0|grep vlan

It did not show anything.



After trying the above, I just did an upgrade to "dd-wrt.v24-35770_NEWD-2_K2.6_big-nv64k.bin" thinking its latest and more stable, but after upgrade I'm unable to access router setup page. Even the router IP 192.168.1.1 does not ping. Its pinging for short duration while booting


C:\Users\ppujari>ping -t -w 2 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
General failure.
General failure.
General failure.
General failure.
Reply from 192.168.1.1: bytes=32 time=304ms TTL=100
Reply from 192.168.1.1: bytes=32 time=2ms TTL=100
Reply from 192.168.1.1: bytes=32 time=2ms TTL=100
Reply from 192.168.1.1: bytes=32 time=2ms TTL=100
Reply from 192.168.1.1: bytes=32 time=2ms TTL=100
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
General failure.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.


I think I might have screwed up the router firmware. Confused
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Fri Apr 27, 2018 3:26    Post subject: Re: Moving LAN port to WAN port Reply with quote
prakashp wrote:
After trying the above, I just did an upgrade to "dd-wrt.v24-35770_NEWD-2_K2.6_big-nv64k.bin" thinking its latest and more stable, but after upgrade I'm unable to access router setup page. Even the router IP 192.168.1.1 does not ping.
Latest builds have had lots of issues (esp after 35531), that's why Per said to try 35244.
_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Fri Apr 27, 2018 17:32    Post subject: Reply with quote
For recovery:

https://www.dd-wrt.com/phpBB2/viewtopic.php?p=960081

You should be able to TFTP while it answers to ping.
BR07H3R
DD-WRT User


Joined: 24 Dec 2017
Posts: 135

PostPosted: Fri Apr 27, 2018 17:39    Post subject: Re: Moving LAN port to WAN port Reply with quote
jwh7 wrote:
prakashp wrote:
After trying the above, I just did an upgrade to "dd-wrt.v24-35770_NEWD-2_K2.6_big-nv64k.bin" thinking its latest and more stable, but after upgrade I'm unable to access router setup page. Even the router IP 192.168.1.1 does not ping.
Latest builds have had lots of issues (esp after 35531), that's why Per said to try 35244.


+1
.. I have an wrt610nv2 aka(e3000).
This build has zero issues
prakashp
DD-WRT Novice


Joined: 26 Apr 2018
Posts: 4

PostPosted: Sun Apr 29, 2018 10:10    Post subject: Reply with quote
Per Yngve Berg wrote:
For recovery:

https://www.dd-wrt.com/phpBB2/viewtopic.php?p=960081

You should be able to TFTP while it answers to ping.


Finally I brought up my router literally back from the grave Very Happy Very Happy . Thank you guys for your great help.

The settings suggested by jwh7, worked after upgrading router firmware to "dd-wrt.v24-35244_NEWD-2_K3.x_mega-nv64k.bin".


nvram set vlan2ports="3 4 5"
nvram set vlan1ports="0 1 2 5*"
nvram commit
reboot

Initially I performed an upgrade to "dd-wrt.v24-35244_NEWD-2_K2.6_mini-e900.bin" through TFTP and then to "dd-wrt.v24-35244_NEWD-2_K3.x_mega-nv64k.bin" using GUI.



I will just elaborate the stops I followed to recover my bricked router so that it might be helpful for someone like me Smile.

First of all I, had to open my E900 router to get the console (serial) access, as it does not have an external serial port access. To do that I have used
"USB TO UART TTL 5V 3.3V FT232RL Serial Adapter Module For Arduino" (uploaded the pictures). And Connected according to the pin configuration described in

https://domonkos.tomcsanyi.net/?p=398

The adaptor actually has 6 pins but the router PCB has only 5 holes. So, what I did was, just folded the 6th Ground pin and connected the adaptor to the board and then to PC using USB. I have uploaded the pictures about the same.

Once I got the console, I was happy Smile that still my router was alive and something can still be done.

Performed an upgrade from TFTP by following steps suggested in

https://www.dd-wrt.com/wiki/index.php/TFTP_flash

I did these TFTP upgrades many times before connecting the console and all were showing as success but in actual, it was not. It was always throwing following error.

### Start=436363944 E=2143281295 Delta=1706917351 ###
Entry at 0x807ae1e0
CMD: [boot -raw -z -addr=0x80001000 -max=0x1851e20 -fs=memory :0x807ae1e0]
Loader:raw Filesys:memory Dev:eth0 File::0x807ae1e0 Options:(null)
Loading: PANIC: out of memory!

It looks like the regular TFTP upgrade will not work for E900.

https://wiki.openwrt.org/doc/techref/bootloader/cfe

After this I performed following steps which worked finally Smile Very Happy

1. Reboot the router and while booting continuously press CTRL+C to enter into CFE prompt.
2. Once you are in CFE prompt, use command "upgrade code.bin", this will wait for the TFTP upload to start.

CFE> upgrade code.bin
CMD: [upgrade code.bin]
CMD: [flash -ctheader :$flash1.trx]
Reading :: _tftpd_open¸): retries=0¯5
_tftpd_open(): retries=1/5
_tftpd_open(): retries=2/5
_tftpd_open(): retries=3/5

3. Start upgrading the firmware from TFTP such as suggested in
https://www.dd-wrt.com/wiki/index.php/TFTP_flash

4. This time it has successfully upgrade without any error on the console.

5. Performed reboot and that's it, router come alive.



ConnectingAdaptor2.png
 Description:
 Filesize:  1.01 MB
 Viewed:  4298 Time(s)

ConnectingAdaptor2.png



usb_urat.png
 Description:
usb_urat
 Filesize:  629.73 KB
 Viewed:  4298 Time(s)

usb_urat.png



SerialPorts.png
 Description:
SerialPorts of E900
 Filesize:  519.01 KB
 Viewed:  4298 Time(s)

SerialPorts.png


Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom 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 can attach files in this forum
You can download files in this forum