[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.
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.
Why does a default gateway without a router/modem works in windows but not in linux
Hi all,
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.
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 04: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 03:47 AM.
Reason: added some more information.
Thanks for the update. Looks like I must have never attempted to reply on your issue on post #6. Sorry about that.
I can't exactly get my mind to determine the issue but there are a number of things I am thinking about.
One may be how the browser is set to work on each. Either global or application configurations and even maybe UPNP. There might be some issue with dhcp that is being different.
I may have to reexamine how linux and windows might use a choice between static entries and dhcp or connection entries. Someone else may be very up to date and could explain.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.