LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2012, 05:00 PM   #1
devaj
LQ Newbie
 
Registered: Feb 2009
Posts: 17

Rep: Reputation: 2
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.

Thank you.
 
Old 08-29-2012, 07:15 PM   #2
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
What distribution of Linux, please?
 
Old 08-29-2012, 08:02 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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.

Last edited by jefro; 08-29-2012 at 08:31 PM.
 
Old 08-29-2012, 10:50 PM   #4
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Well, I"m not qualified to second guess you, jefro. However, I will agree with you that Google is evil.

Regards,
 
Old 08-30-2012, 02:40 AM   #5
devaj
LQ Newbie
 
Registered: Feb 2009
Posts: 17

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by vtel57 View Post
What distribution of Linux, please?
Linux Mint
 
Old 08-30-2012, 02:46 AM   #6
devaj
LQ Newbie
 
Registered: Feb 2009
Posts: 17

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by jefro View Post
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.
Attached Thumbnails
Click image for larger version

Name:	WindowsXp_without_gateway.jpg
Views:	30
Size:	71.3 KB
ID:	10510   Click image for larger version

Name:	WindowsXp_with_gateway.jpg
Views:	30
Size:	92.2 KB
ID:	10511  
Attached Files
File Type: txt Linux_internet_configuration.txt (5.2 KB, 39 views)

Last edited by devaj; 08-30-2012 at 04:32 AM. Reason: added information
 
Old 05-10-2013, 03:39 AM   #7
devaj
LQ Newbie
 
Registered: Feb 2009
Posts: 17

Original Poster
Rep: Reputation: 2
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.
 
Old 05-10-2013, 04:59 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default gateway problem with router jpjohn Linux - Wireless Networking 1 08-02-2011 07:38 PM
pc's connected with same wireless router have different default gateway address jpjohn Linux - Wireless Networking 2 08-02-2011 12:43 PM
Setting up Router/Default Gateway with Redhat 9.0 Tutorial bmfmyth Linux - Networking 3 08-31-2004 03:47 PM
setting my router as the default gateway TheOneAndOnlySM Linux - Networking 10 03-27-2004 06:12 PM
Newbie windows gateway works but how to see anything from either pc on network shaneblyth Linux - Networking 7 09-22-2003 08:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration