Can I use LAN port as both WAN and LAN

georgesir

Reputable
Nov 3, 2014
1
0
4,510
Dear Tom's Hardware community,

I have an ASUS N66U router running Tomato firmware. I have a Ethernet cable running from the wan port into a switch and a Ethernet cable running from the switch into an adsl modem. It connects to the internet perfectly if you connect to it via wireless. I would like the internet to be shared to the switch as well, which means the WAN port needs to act as a LAN as well. Is this possible?

The reason for only using one cable is the router is quite a distance away from the adsl modem, and I would need to run a new cable or get a switch right by the wireless router. (I have attached a Graphical representation of the problem.)

Any help would be greatly appreciated!


http://s9.postimg.org/5v645c72n/Network_Problem_at_home.jpg
 
Solution
If your switch was a manged switch and since you have tomato loaded you could use vlans.

You can technically do what you want because you have tomato but it is a extremely non standard thing to do. You are going to be best off using static ip addresses to keep thing stable.

Step1 is to get very familiar with the IPTABLES command. This is what makes the routing,firewall and nat work in a many of the routers. It is a nasty mess to deal with even in simple configurations and you need a very non standard one on top of that.

What you want to do is define a secondary ip address on the same interface the wan ip is on. What you have done is in effect put 2 vlans on the same network cables without vlan tags. You are in effect putting...
I have no idea how to help you. I will say that you have quite a unusual setup. Most people will set the modem to the WAN port, and the switch to the any of the Ethernet ports on the router. The setup I described would share the internet as you want. Also you should be able to reconfigure your network by just moving a few wires. Is there some strange reason your doing it the way you are?
 
If your switch was a manged switch and since you have tomato loaded you could use vlans.

You can technically do what you want because you have tomato but it is a extremely non standard thing to do. You are going to be best off using static ip addresses to keep thing stable.

Step1 is to get very familiar with the IPTABLES command. This is what makes the routing,firewall and nat work in a many of the routers. It is a nasty mess to deal with even in simple configurations and you need a very non standard one on top of that.

What you want to do is define a secondary ip address on the same interface the wan ip is on. What you have done is in effect put 2 vlans on the same network cables without vlan tags. You are in effect putting both the lan and the wan on the same cable.

The only reason this even works is because the end devices are too stupid to look for the other subnet but they could be on either network.

So you CAN do this but i would not recommend you do since it is going to be hard to troubleshoot if thing get messed up.

Another not good idea is to split the pairs in your cable which would give you 2 100m connections. You can buy pair splitter pretty cheap...again this too is not a optimal plan.
 
Solution