LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Router gateway address being picked up as primary DNS address under SuSe (http://www.linuxquestions.org/questions/linux-networking-3/router-gateway-address-being-picked-up-as-primary-dns-address-under-suse-540087/)

Hubmasterflex 03-23-2007 10:18 PM

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?

jonwatson 03-24-2007 12:42 AM

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'?

Hubmasterflex 03-24-2007 01:03 AM

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)

jonwatson 03-24-2007 01:11 AM

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.

Hubmasterflex 03-24-2007 04:02 AM

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.

JimBass 03-24-2007 08:50 AM

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

digen 03-24-2007 09:49 AM

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.

JimBass 03-24-2007 10:04 AM

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

jonwatson 03-24-2007 10:53 AM

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...

digen 03-24-2007 11:08 AM

@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 :)

Hubmasterflex 03-24-2007 05:26 PM

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.

JimBass 03-25-2007 06:49 PM

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

Tons of Fun 10-18-2008 08:42 AM

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,

JimBass 10-18-2008 01:40 PM

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


All times are GMT -5. The time now is 06:31 AM.