[SOLVED] Why does a default gateway without a router/modem works in windows but not in linux
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Why does a default gateway without a router/modem works in windows but not in linux
I would be obliged if someone could let me know why does specifying a default gateway in linux makes my internet connection inaccessible,if the box does not have access to any router or modem.
My internet connection is via pppoe and there is no router/modem between pppoe and my box,in short the connection is direct via dial-up (pon dsl-provider).Hence never specified any gateway as it was not needed.
Recently a friend of mine stayed with me for some days.He brought his router with him and we had a good internet connection on both my box and his laptop,regardless of the operating system.It was only after he left that I realized this phenomenon.
On specifying a default gateway in linux without any physical access to router/modem,it connects fine, only problem is that I am not able to access anything that requires internet (i.e. surfing,updating my linux box,etc; )
The same configuration/situation i.e specified default gateway but had no router/modem connected and made the connection via the virtual/software dialer on windows xp, not only allows the connection to be made but I can also access anything that depends on internet connection.
I would like to know why having a default gateway on linux box without any physical connection to a router/modem restricts my internet access but the same is not the case with windows.
P.S: I would encourage people having having a dual boot system to check it out.Please do let me know if you need any more information.
The rules of TCP/IP should not change between OS's.
The combination of IP plus subnet plus gateway determine how to move out of a subnet. You use a gateway to access IP addresses that are out of your subnet.
The other issue is dns.
There might be an instance where some settings are configured by the isp.
Thank you jefro for replying and you are right.
On both windows and linux it works wonderfully without me specifying a gateway as the dns,ip,gateway and other stuff are provided by the isp.It still works if I specify custom ip and dns in both windows and linux.The problem arises only when I specify a gateway in linux box.The problem does not arises when a gateway is specified in windows.I believe that in windows the gateway gets replaced by the isp's gateway but this does not seem to happen in linux.I would like to know the reason why and how can I correct this behavior in linux.
I hope I have made my case clear enough.Please do let me know if you need any more information.
Seems like I was right.I would be grateful if someone could explain to me why does the pppoe configuration via isp differs so greatly in linux when compared to that of windows.
Please refer to the attachments below to see the configurations.
Last edited by devaj; 08-30-2012 at 05:32 AM.
Reason: added information
Apologies for such a long delay in posting the solution.I just want to give back to the community.
I was a complete noob at the time when the question was asked.I have learned a lot about linux sytem internals during the long hiatus and have come to the conclusion that windows is noob proof.
After providing my router ip as the gateway,if I remove my router and use other means to connect to the internet while leaving all the gateway,ipaddr intact, it would still connect and you can surf the web without as much as spilling out an error or warning, even though the gateway is not available (of course the direct method should be supported by the isp,like in my case I can dial pppoe directly or I can have the router do it in order to get an internet conncection).
This is because windows lets the gateway and other settings provided by the isp takes precedence over the gateway that you have provided (only in case where your gateway is not available) assuming this is what the user wants.The user don't even have to remove the gateway and can surf without any problems.
Linux is ruthless,relentless in this matter which is good in some sense.Linux always assumes that the user knows what he is doing.It won't second guess or change anything on it's own.Hence the authentication succeeds on trying to connect directly via ppoe without removing the router ip as gateway, but you won't be able to surf the internet.The gateway doesn't get replaced by the isp gateway and when you try to surf, the packets gets requested via the old gateway, which now does not exist and hence gets dropped.
I have stated the above information via personal experience (I am yet to get a job,so all the testing was done in a home enviornement).I hope I have not made the matter more confusing and would be glad If any of the seniors could let me know if there is any conflicting or errorneous information in the above post.Also english is not my first language,so please overlook any grammatical or spelling mistakes I have made.
I hope this information helps a newb in future.
Last edited by devaj; 05-10-2013 at 04:47 AM.
Reason: added some more information.