LinuxQuestions.org
Help answer threads with 0 replies.
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 03-23-2007, 10:18 PM   #1
Hubmasterflex
Member
 
Registered: May 2005
Distribution: Mandriva Linux, SuSe 9.3
Posts: 75

Rep: Reputation: 15
Router gateway address being picked up as primary DNS address under SuSe


Hi. I am running a wired connection under a Wireless G Belkin router that has a gateway address of 192.168.2.1. In OpenSuSe and various other distributions, it manages to pick up the DNS addresses from my internet provider, but my router gateway address is placed as the dominant DNS address. As a consequence, my internet will randomly timeout as i'm surfing the internet. Any suggestions to avoid my router gateway address from being placed 1st on the DNS list?
 
Old 03-24-2007, 12:42 AM   #2
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by Hubmasterflex
Hi. I am running a wired connection under a Wireless G Belkin router that has a gateway address of 192.168.2.1. In OpenSuSe and various other distributions, it manages to pick up the DNS addresses from my internet provider, but my router gateway address is placed as the dominant DNS address. As a consequence, my internet will randomly timeout as i'm surfing the internet. Any suggestions to avoid my router gateway address from being placed 1st on the DNS list?

Can you post the contents of your /etc/resolv.conf file?

Also, can you post the output of the command 'route'?
 
Old 03-24-2007, 01:03 AM   #3
Hubmasterflex
Member
 
Registered: May 2005
Distribution: Mandriva Linux, SuSe 9.3
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jonwatson
Can you post the contents of your /etc/resolv.conf file?

Also, can you post the output of the command 'route'?
Sorry, i guess i typed the wrong gateway #. My gateway is 192.168.0.1.

My route table:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


My resolv.conf
nameserver 66.51.205.100
nameserver 66.51.206.100
search Belkin

(If there's a better way to send my route table, let me know how)
 
Old 03-24-2007, 01:11 AM   #4
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
That looks normal. I was curious as to your usage of "my router gateway address is placed as the dominant DNS address". I'm not sure what you mean by that, but your routing and resolv.conf file look much like mine.

If by 'dominant DNS address' you mean this line: 'default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0' that's normal.

The route table can be read something like this (ignoring the local stuff because it's not relevant to this):

192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 <- this means that any IP address starting with 192.168.0 is on the same network and does not need to be routed through a router or gateway

default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 <- this means that any IP address not covered so far (only the 192.168.0 network in your case) isn't on this network and needs to be sent elsewhere via 192.168.0.1. This is correct since 192.168.0.1 is your gateway (your router) to the Internet.

So while I can't help you stop your sporadic disconnections, I can tell you that it's not due to your routing table.
 
Old 03-24-2007, 04:02 AM   #5
Hubmasterflex
Member
 
Registered: May 2005
Distribution: Mandriva Linux, SuSe 9.3
Posts: 75

Original Poster
Rep: Reputation: 15
In SuSe, there are 3 DNS addresses that are automatically listed. The first DNS address is that of my router gateway, 192.168.0.1. The 2nd and 3rd DNS listings are 66.51.206.100 and 66.51.205.100 respectively. I'm want to see if there a way to keep the router gateway from appearing as the first DNS address, as this will cause my internet to timeout.
 
Old 03-24-2007, 08:50 AM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Those addresses are being sent by the router. You need to either configure the router not to send its own address (not likely to be possible, unless you have very fine control over the router), or simply edit the file once you get it. For example, my router at home always sends itself as the only DNS server, but I'm running a DNS server on my LAN. It won't allow me to specify what servers it will send, unlike yours it doesn't send the DNS servers the router uses, it only sends itself. So My resolv.conf starts out looking like:

Code:
search earthlink.net
nameserver 192.168.70.1
And I modify it to read only:

Code:
nameserver 192.168.70.103
That speeds up my resolution very much, somehow filtering my requests through the router tacks on about 75 ms to resolving a domain, even one that should already be in the cache.

The only drag is you have to manually edit the config. If I had shell scripting ability, I would just write a script that gets called at the end of the dhclient process, and that would overwrite the resolv.conf.

Peace,
JimBass
 
Old 03-24-2007, 09:49 AM   #7
digen
Member
 
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
JimBass,you could just hard code the local name server entry in the file /etc/resolv.conf and make it immutable so that nothing can write to it.

I have made the same adjustment when using my vdata card to dial in.
 
Old 03-24-2007, 10:04 AM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
I could, but I take this laptop to work, and coffee shops, and friend's places, so hardcoding a DNS server is a very poor choice. If I only used it at home that would work fine.

The only time locking your /resolv/conf files makes sense is if it is a machine that will never be moved, and you need to remember that it is locked. The worst thing would be forgetting you locked resolv.conf, and then changing DNS servers months later. I think locking that file is a very poor choice.

Peace,
JimBass
 
Old 03-24-2007, 10:53 AM   #9
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by Hubmasterflex
In SuSe, there are 3 DNS addresses that are automatically listed. The first DNS address is that of my router gateway, 192.168.0.1. The 2nd and 3rd DNS listings are 66.51.206.100 and 66.51.205.100 respectively. I'm want to see if there a way to keep the router gateway from appearing as the first DNS address, as this will cause my internet to timeout.
I think others have answered your question, but I'm curious as to where you see these 3 DNS addresses. Your resolv.conf file only shows two:

nameserver 66.51.205.100
nameserver 66.51.206.100

Confuzzled...
 
Old 03-24-2007, 11:08 AM   #10
digen
Member
 
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
@JimBass, Yup agree !
I actually run a caching name server on my laptop with "nameserver 127.0.0.1" hard coded in /etc/resolv.conf
 
Old 03-24-2007, 05:26 PM   #11
Hubmasterflex
Member
 
Registered: May 2005
Distribution: Mandriva Linux, SuSe 9.3
Posts: 75

Original Poster
Rep: Reputation: 15
JomWatson, i wish i could send you a screenshot, but to my knowledge, these forums don't support posting pictures. All i can say is that in YAST under DNS and Hostnames, the 3 Name Servers have 192.168.0.1 as the 1st on the list, followed by my providers DNS addresses.
 
Old 03-25-2007, 06:49 PM   #12
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
I don't use Suse, but I can't see how a computer would just add additional machines to a resolv.conf file. I very much expect that your router is giving out those nameservers. Do you have an additional computer behind the router? Check what DNS servers it is using. If it runs windows, the command ipconfig /all should give you all the DNS servers, and I bet you'll see the same 3 servers in the same order. Either that, or Suse is even more screwed up than that Microsoft deal suggests.

Peace,
JimBass
 
Old 10-18-2008, 08:42 AM   #13
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian Squeeze / BackTrack 5/ Linux Mint 11
Posts: 359

Rep: Reputation: 32
The first address is for resolving local names. I don't think you want to remove the router address. More than likely, your router is your local DNS server (per your route command). If you remove that address permanently, and use only your ISP's DNS addresses, you will have connectivity issues on your local LAN. In most cases, your router provides local DNS, and anything outside of the local LAN is then passed to the ISP. But your ISP doesn't keep track of your LAN, so you need something internally to provide that service. In your case, that is your router.

Having your router address as your primary DNS address won't cause Internet timeouts as long as it knows the correct DNS addresses of your ISP. As soon as it sees http, it automatically forwards the request to your ISP's DNS servers. I am wondering if your ISP changed DNS server addresses. This happens more than you might believe. One thing you can try is to manually hardcode the WAN DNS addresses in your router to known good DNS addresses. I usually use Opendns addresses, or the well known fallback of 4.2.2.1 and 4.2.2.2. If you use these as your WAN DNS addresses, and the timeouts disappear, then your ISP changed their DNS servers.

hth,
 
Old 10-18-2008, 01:40 PM   #14
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Man, this thread is old and dead. Beyond that, some of what you're saying is completely incorrect.

Quote:
The first address is for resolving local names. I don't think you want to remove the router address. More than likely, your router is your local DNS server (per your route command). If you remove that address permanently, and use only your ISP's DNS addresses, you will have connectivity issues on your local LAN. In most cases, your router provides local DNS, and anything outside of the local LAN is then passed to the ISP. But your ISP doesn't keep track of your LAN, so you need something internally to provide that service. In your case, that is your router
The first address is not necessarily for anything other than name resolution. The first address is simply the first place that the machine in question will ask to resolve a name. Removing it will have no effect on your LAN connectivity, as the router does absolutely no LAN name resolution. Windows networking or SAMBA can resolve short names (laptop vs. laptop.yourdomain.com), and for that you don't need a router at all. You could put 2 computers in a hub (or connect with a crossover cable) and if they are part of the same windows workgroup or SAMBA workgroup, they'll be able to ping each other by shortname, assuming they have the same network parameters. You would need to specially configure your router to resolve names.

Quote:
As soon as it sees http, it automatically forwards the request to your ISP's DNS servers.
No, not even remotely close to the truth. DNS does not care if you're looking for hyper text tranfer protocol (http), mail exchangers (mx), or any other name under the sun. DNS only handles questions like, "what IP address does this domain name have?" It doesn't care one bit what you're asking for. As a case in point, with 2 windows machines on the same LAN (without a router), put them in the same workgroup on the same subnet. Then ping each other by shortname. If either (or both) of the machines are running a webserver, then open a browser and point it to http://shortname and you'll get the webserver. under your theory of network resolution, this won't work, because you have no router resolving local names. The way it actually works is simply to resolve the name you ask for in any way it has open to it. Windows/SAMBA networking can resolve local address names, and pointing a browser at a shortname will absolutely work, given each machine being on the same subnet.

Quote:
I am wondering if your ISP changed DNS server addresses. This happens more than you might believe. One thing you can try is to manually hardcode the WAN DNS addresses in your router to known good DNS addresses. I usually use Opendns addresses, or the well known fallback of 4.2.2.1 and 4.2.2.2. If you use these as your WAN DNS addresses, and the timeouts disappear, then your ISP changed their DNS servers.
This part of your post is indeed correct, but it came 18 months after this thread was last posted to. If the original poster was still having questions, I suspect they would have posted back looking for more help.

Peace,
JimBass
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Making default gateway address permanent in SuSe 10 alienmagic Suse/Novell 9 01-02-2008 10:29 AM
kinternet connects, gets a dhcp address, but no gateway or dns joncolby Linux - Wireless Networking 0 09-16-2005 09:02 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
Getting gateway address in C/C++ jormel Programming 2 01-13-2005 06:24 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration