Posted: Sat Aug 18, 2018 20:15 Post subject: Assign WAN to LAN port
I am running a Netgear Nighthawk R7000 router with firmware DD-WRT v3.0-r36070M kongac (05/31/18). The WAN port has stopped working so I would like to convert one of the LAN ports to handle WAN connectivity, but have not been able to successfully effect the change.
I went into Setup>VLANs, unchecked port 1 on vlan1 and checked vlan2 for port 1 (see the attached screenshot). The port shows as green/connected, but the router does not connect to my cable modem and pull an IP address. Then I tried unchecking auto-negotiate, gigabit, full speed, and full duplex as they are not checked for the default WAN port to no avail. I also checked the nvram and noticed that the vlan1ports and vlan2ports settings did not reflect the updates in the GUI. I tried setting them (vlan1ports=2 3 4 5* and vlan2ports=0 1 5u) also with no impact.
I was finally able to get this working on lan4 (I expect the same steps would work on any port, but while verifying port numbering [I read an article that indicated the number ordering may be reversed depending on the router model], I made the switch and have not gone back).
The solution was setting the vlan ports in both the GUI and the CLI:
Log in to the router's control panel (website), Setup>VLANs, uncheck port 4 on vlan1 and check port 4 on vlan2 (see the attached screenshot), Save, and Apply Settings
SSH/telnet into the router and run the following commands:
nvram set vlan1ports="1 2 3 5"
nvram set vlan2ports="0 4 5u"
nvram commit
reboot
After which I had to reboot my cable modem, wait for it to come back online, and then reboot the router again before it would pull an IP address from my ISP.
If you are going to do that then would it be wise to have no vlan tagging on the wan port at all. I'm asking because I want to know results. I'm doing this because I have it connected to a gateway. Any reply would be great.
I think what you suggest makes sense so that the UI indicates the actual configuration in place. However, when I played around with unchecking the WAN port (as well as disabling the WAN port altogether and removing it from vlan2 in nvram), I lost internet connectivity.