After using routers constantly, I had many friends throw their routers away as They got only one WAN port and that went bad. So no way to connect to ISP media converter or switch or router for internet connectivity!!
For any router WAN port is just like any other ports on the back of their router. Though the wan port is wired differently(internally) but it is really like any other lan ports on the back of the router. In reality anyone can use any of the LAN ports as wan and still use the router as if nothing has happened!!
To use the router we must install Openwrt as the vendor provided router software is configured to use only the WAN port as wan and Router vendor like TP-Link lock their CLI access with passcodes so that users cannot fiddle with their default settings. If can access router CLI(Command line Interface) with a serial port i.e. serial interface access can be had then routers default software can also be USED, but not possible, as they will not tell u their passcode!! So we need to install OPENWRT and do it that way, even with their GUI i.e. LUCI web interface.
After Installing Openwrt with Luci anyone can use anyone of the LAN ports as wan. Here I'm using one friends Tp-link 840n v2 router as example, as this router got A Bad Wan port. Also the First lan port is BAD too ( in the SoC!! -Hardware). So We must use the Three Lan ports only!! Below image shows the Bad wan and 1st. lan port(port adjacent to wan port). We Now set the 2nd lan port as wan and rest are lan ports.
Now Logon to LUCI Web Interface(Starts with 192.168.1.1, First boot!!) of Openwrt and we go to switch settings from Network->Switch menu and setup one extra vlan for the WAN port only as shown below,
Here in above image, Our Newly created VLAN 2 got CPU-tagged, LAN1-off(Bad), LAN2-Untagged(using here in vlan2) and rest off i.e. LAN3-off, LAN4-off, LAN3 & LAN4 are not used in VLAN2
Changed VLAN1 as shown too, CPU-tagged, LAN1-off(Bad), LAN2-off(not using in vlan1), LAN3-untagged, LAN4-untagged, So LAN3 AND LAN4 are used in VLAN1 switch.
Now we go to Netwok-> Interfaces menu and add a 'WAN2' interface tagging wan6 along with this wan2(eth0.2) instead of existing wan port(eth1). Now we also disable wan(eth1) port which is bad!!
In above image we only Change WAN2 interface to tag eth0.2 interface which is VLAN2 that we created earlier, so eth0.1 is the br-lan and eth0.2 now our new WAN PORT.
Now connect your ISP cable modem or fiber media converter or lan switch and configure as per your ISP, mine here connected to upstream with a fixed ip/static ip address.
Please also make sure ipv6 interface now attached with eth0.2 instead of eth1 by default as shown below,
Also make sure firewall adds this new wan to its wan list(it should automatically), check firewall settings in WAN6.
So, Now Network->Interfaces should look like below,
LAN--->br-lan, WAN--->eth1(Stopped), WAN2--->eth0.2(Our new wan), WAN6--->eth0.2(was eth1)
For Wan6 one might need to set "Client ID to send when requesting DHCP" and/or "Override MAC Address" to the MAC Address of your router i.e. The MAC/Hardware address shown in LAN or WAN and in the Back sticker of your router. See Menu Network->Interfaces->Wan6(or edit wan6)->Advanced Settings. You only do this if your wan/wan6 do not work/connect.
Alternatively if you got CLI access i.e. serial or SSH or telnet, you can directly change the /etc/config/network file and be done with it!!
Alternatively if you got CLI access i.e. serial or SSH or telnet, you can directly change the /etc/config/network file and be done with it!!
Warning: If you change or delete this vlan0.2 without proper precaution, you will not be able to access this router as it is getting wan and lan from the same set of ports that the cpu considers same/similar LAN ports. If you change auto configured wan6 to disabled wan port instead of wan2 that we created, then you won't hv any problem connecting your pc/computer to anyone of the good lan ports!!
Note: for a copy of tplink firmware or openwrt for tplink basic routers, please see my previous post.
For Routers Using ecos firmware i.e. tenda with broadcom chip or Tomato for broadcom or for DDWRT you can change the vlan settings from the cli(command line interface) of the router. First need to login to router via putty(Windows) use protocol telnet or ssh, for linux you can use both from the Terminal.
Issue command,
1. nvram show | grep vlan.*ports , will show,
vlan1ports= 0 1 2 3 4 5* (Assuming a 5 port router)
vlan2ports= 4 5 or vlan2ports= 4 5*
Here 5* being CPU Port 0 1 2 3 are LAN Ports and Port 4 is the Wan port.
Now change this to use Lan port 3 as wan,
2. nvram set vlan1ports="0 1 2 5*"
3. nvram set vlan2ports="3 4 5*" or "3 4 5" (depending on router model)
Now make sure everything as u wanted and issue,
4. nvram show | grep vlan.*ports and it should show,
vlan1ports= 0 1 2 5*
vlan2ports= 3 4 5 or 3 4 5* (depending on router model)
Now issue command,
5. nvram commit , returns,
commit...Done or something like that.
now issue
6. reboot, router reboots with new vlan settings, check in gui to make sure if it's what was intended.
Special Note on nvram command : In some routers ecos firmware is stripped down to extreme and grep command not included(tenda f3). In this cases to view the ports one should use command as below,
1. nvram show vlan1ports , output,
CLI> nvram show vlan1ports
vlan1ports=1 2 3 4 5*
2. nvram show vlan2ports
CLI> nvram show vlan2ports
vlan2ports=2 5
or
CLI> nvram show vlan2p
vlan2ports=2 5
or for all ports,
3. nvram show vlan , output is,
CLI> nvram show vlan
vlan2ports=2 5
vlan2hwname=et0
vlan1hwname=et0
vlan1ports=1 2 3 4 5*
Above is given to enable one to understand about how to use nvram commands with some low cost routers!!
thank you, hope you are enjoying
ReplyDeleteDial toll-fre Netgear router support number +(1)888-846-5560 and get the best support for Netgear router configuration, installation and firmware updates etc.
ReplyDeleteGreat Post!!!
ReplyDeleteThanks For Sharing Blog.
We have tried to provide the best user guide for Tp Link Router Login. Therefore we suggest you come to us for router login issues and any other router issues. There are a lot of reasons for which you should come to us. One of such reasons is that the Verizon Router Login is the easiest way to log in. There are many more great things that you will find on our website.
Tp Link Login<
Tplink Login
Tplinklogin
Tp-Link Login
Tplink Router Login