It is easy to add ports to a router by using a switch. Switches generally run on MAC address alone and leave the IP address assignment to the router and thus the DHCP server will assign units attached to the switch their own IP addresses.
I did an experiment where I left the WAN port of a WRT54G router open and connected one of the LAN ports to the modem / router combination. This seemed to act like a switch with all the IPCONFIG parameters that I read looked like my laptop was connected to the modem / router transparently. However after an amount of time the internet connection would quit working. I suspect that is due to some WRT54G routing function resetting things in the switch department. It might be that I did not disable DHCP on the secondary router. I get the impression reading reference 5 that this is the case. I followed the recommendations of reference 5 I disabled the DHCP and switched the box out of gateway mode into router mode and the LAN ports have been reliably acting like a network switch for several hours now.
PS: When I tried running this way for days on end it ended up quitting on me. Surprise there are still things I do not know.
Research Links
- How To Add Ports To A Router
- Wikipedia: Network Switch
- How to Connect Two Router
- Google: connect router to another router lan port
- Expand the Range of your Wireless Network with another Router
- A Guide to Understanding DHCP
History and ARP
It is helpful to know history. History is evolution. Evolution is how things are built up. The layer stack as built up is the present day structure of things.
The Address Resolution Protocol (ARP) is a communications protocol used for discovering the link layer address associated with a given Internet layer address.
The first switches were hubs. They put the data to all the other ports connected to the hub. That means if a download hogged the channel no other devices were going to be able to communicate at the same time. At some point they got past this limitation by using ARP tables to connect only the source with the destination and leaving the rest of the ports unmolested. ARP table entries can be set by the very first setting or by the very last setting. There is no specification covering this so it is a source of variability in network behavior. An example of this would be if for some reason you ended up with 2 devices with identical IP addresses. It is possible that you could get each device alternately working and not working because the device with settings may do network connection tasks slower than the unconnected device. When the unconnected device next attempts connection it might break the first devices connection. Those are conditions for a flip flopping back and forth between devices. If the ARP is set at the beginning and left then the second device of identical IP address will not ever start working.
Why in the above article #3 must the second router be set to 192.168.2.1 as opposed to its default setting of 192.168.1.1? This is because of NAT – Network Address Translation. In the case where you might try to use 192.168.1.1 and 192.168.1.2 with NAT enabled on both routers. Now you have a jumbled mess because the first router is mapping into 192.168.1.x space and then the second router is too.
Turning the WAN port into just another LAN port
- Open up the Web Interface to your DD-WRT Device
- Set WAN 'Connection Type' to Disabled.
- Down the Basic Setup page, the option WAN Port appears. Check the box 'Assign WAN Port to Switch'.
- Save/Reboot
- The WAN port is now the same as the other LAN ports.
It was suggested here that setting the Operating Mode = Router as shown below would turn off NAT. A friend with much more experience suggested that technically they are not using the term "router" correctly. I set Operating Mode=Router and it seems to work. Let's see for how long. Given that a gateway would be likely to have NAT the fact that router mode shuts down NAT sort of makes sense in spite of their misuse of the word router.
0 Comments