Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes but he told me to just plug the wan cable into the lan port (of a router) and that would give me access to the internet. Why wouldn't this work wireless as well?
I can't see how what you say will work. Imagine a machine on the WAN side of your router with an address 192.168.0.10 and one on the LAN side with an address 192.168.0.50, both with a net-mask of 255.255.255.0.
If you try to send a packet from .50 to .10, .50 is going to look in it's routing table and determine that .10 is local, so will try to resolve .10 to a hardware address. However, .10 is one hop away on the other side of the router. The only way it can get that packet to .10 is to send it via the router.
The reverse direction is even worse, because if you forced the packet to go via the router (from .10 to .50) by manually altering the routing table, the router is just going to drop it because it doesn't do routing, just NAT.
Not to mention the confusion the router is going to suffer having both it's WAN and LAN ports in 192.168.0.0/24
Most consumer routers have 4 LAN ports and one WAN port, so you can use the router as a switch by just using the LAN ports and not connecting anything to the WAN port.
Turning off DHCP doesn't turn a router into a switch.
Perhaps the OP can answer my earlier question so we can determine if they need a router or a switch, and also let us know what routers (manufacturer and model) they have.
You cannot give IP adresses from the same subnet on the wan and lan side of a router, it just wont work and routers will most probably refuse that configuration (at least they should). Also the computers will never send their packages to the router (default gateway) if the destination address is in the same subnet.
I used lots of routers as 'simple switch' for particular reasons (for example if you want to use the wifi on the router but not the routing/nat functionality itself).
To do this simply switch off DHCP on that router and give the router a IP address outside off your subnet (remember that address otherwise you might have to reset your router everytime you want to make changes to the wifi settings).
If you still wanna give the router a IP address inside you current subnet just make sure it's not the same as any other devices (like your default-gateway) and outside the dhcp range.
This is nice if you have a router with wifi that you don't use anymore and don't want to spend uneccessary money on a access point.
PS : forgot to add this ... if you use a router in such a way you simply cannot use the WAN port!!! Only the LAN ports will work as expected!!!
You cannot give IP adresses from the same subnet on the wan and lan side of a router, it just wont work and routers will most probably refuse that configuration (at least they should). Also the computers will never send their packages to the router (default gateway) if the destination address is in the same subnet.
I used lots of routers as 'simple switch' for particular reasons (for example if you want to use the wifi on the router but not the routing/nat functionality itself).
To do this simply switch off DHCP on that router and give the router a IP address outside off your subnet (remember that address otherwise you might have to reset your router everytime you want to make changes to the wifi settings).
If you still wanna give the router a IP address inside you current subnet just make sure it's not the same as any other devices (like your default-gateway) and outside the dhcp range.
This is nice if you have a router with wifi that you don't use anymore and don't want to spend uneccessary money on a access point.
PS : forgot to add this ... if you use a router in such a way you simply cannot use the WAN port!!! Only the LAN ports will work as expected!!!
What if you've got an ISP who gives you 5 public IPs?
In that case, you STILL need a gateway (the router), but you dont want NAT, as each IP will be publicly available. Such setups like PPPoE would use this.
I have at home a simple old linksys router which does exactly this. Turn the NAT off and it simple advertises the IP's on the lan ports, of course it expects public IPs and gets a little confused when it sees you using 192 ranges...
What if you've got an ISP who gives you 5 public IPs?
In that case, you STILL need a gateway (the router), but you dont want NAT, as each IP will be publicly available. Such setups like PPPoE would use this.
I have at home a simple old linksys router which does exactly this. Turn the NAT off and it simple advertises the IP's on the lan ports, of course it expects public IPs and gets a little confused when it sees you using 192 ranges...
Personally I would discourage this type of use because you might run into several problems.
If you have for example a network printer you will be in hell to get the configuration right if you are unexperienced.
If by any chance you have a network printer and it is set on DHCP just tell me the IP and load some paper ... I have some junk to print
If you have a NAS with some nice music on it I might want that IP address also
NAT is in some way a form of extra security. None of your machines will be exposed to the internet 'directly', it's some sort of cheap/basic incomming firewall (don't feel super safe now, I said 'cheap/basic').
Another problem you might get : if you share stuff between your computers and they receive dynamic IP's from your ISP you might wanna pray that the IPs they receive are on the same subnet of you wont be able to access your 'local' shares and if you will be able to it will be thru the default-gateway which means your data is going to the ISP and back to you ... hmmm that's not so nice.
That setup is behind another firewall, a proper one
My point was alot of people in this thread claimed it doesn't exist (a router without NAT).... it does, even in cheap SOHO routers, if you have the right one.
Thanks. Do you know how to tell if a router has the option to turn this off? I cant tell by looking at the specs of routers on sale.
A lot of manufacturers or retailers make the user manual of new products available on line. The user manual of any product would tell you the features of that product and how to implement them.
You can use Google to search for the product brand and model.
Example: Google search phrase
Quote:
linksys wrt54g manual
Result: several web sites that appear to have the user manual in pdf format.
In order to avoid virus infected pdf files I only went to the cisco web site and clicked a few links to get to the user manual for the wrt54gs router.
Note that I believe that you originally wanted someone to post a quick shopping list of routers known to provide this function. I am sorry that nobody did that. Evidently few if any of us have done this. I guess that we would all just buy a switch.
Last edited by stress_junkie; 12-29-2010 at 12:15 PM.
A lot of manufacturers or retailers make the user manual of new products available on line. The user manual of any product would tell you the features of that product and how to implement them.
You can use Google to search for the product brand and model.
Example: Google search phrase
Result: several web sites that appear to have the user manual in pdf format.
In order to avoid virus infected pdf files I only went to the cisco web site and clicked a few links to get to the user manual for the wrt54gs router.
Note that I believe that you originally wanted someone to post a quick shopping list of routers known to provide this function. I am sorry that nobody did that. Evidently few if any of us have done this. I guess that we would all just buy a switch.
So you are saying "look at each product manual"? That's not so hard to type. I don't quite understand why you had to make a big condescending production out of it. Nonetheless, you answered one of my questions. My first question was, "what is the optional nat feature called". If it had a name it could save me and anyone who reads this post lots of trouble. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.