LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2016, 05:49 PM   #16
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513

Quote:
Originally Posted by jefro View Post
If I had sat connection, I'd make the 50 or so common sites in hosts file and be sure edit that into a good hosts blocking file. You don't need all those ad's tearing up your bandwidth.
http://winhelp2002.mvps.org/hosts.htm

You can speed up lookups as most systems go to hosts file first to resolve an IP. Local lookup is much faster than web searches. You can speed up good sites and block bad sites or trivial ad sites.
Actually, you could run your own caching server... The problem with entries in the /etc/hosts file for internet servers is that the specific server you connect to may be super busy (or even down). DNS allows the same name to be assigned to multiple IP numbers (usual limit is about 35 for IPv4), and the server will rotate the numbers to help balance the load. The /etc/hosts file will only use the first entry that matches the name.

Once your caching server gets the name/ip numbers it will provide them locally until the DNS lifetime is reached. This allows the servers to migrate to new IP numbers without having you manually edit the /etc/hosts file.
 
Old 11-01-2016, 08:39 PM   #17
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I think you'd end up using a lot of data making a local dns server still. They only get so many bits over the sat. I ran my house on a wifi for a while and was in a similar boat trying to limit data use. (text browser helps a lot)
 
Old 11-01-2016, 10:02 PM   #18
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
It saves a good bit. The DNS entries only get downloaded once for its entire lifetime. And if it changes, then the updates will be downloaded.
 
Old 11-02-2016, 03:29 PM   #19
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
It is a solid choice to consider using a local stub.
Either choice might be better than constant sat use of name resolution I'd think.
 
Old 11-03-2016, 07:20 AM   #20
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by tronayne View Post
Of course. However, I have HughesNet Gen4 (EchoStar XVII) satellite service (with light velocity delay built in) and HughessNet DNS servers are faster than any of the other ones in my circumstance. If there's a weather problem (there is every so often) it ain't going to be working in any event, you just wait, there is no alternative where I live.
Keep in mind that it's 22,236 miles up, 22K down, do something, 22K back up and 22K down to me.

Well, I actually don't. The normal connection with the laptop is an Ethernet cable to the router but, if I have to use wi-fi, I have a /etc/resolv.con.bak that, if DHCP rears its ugly head, is a simple copy to /etc/resolv.conf. Also, I do not run DHCP on anything, everything (including the laptop is fixe-IP; that would include pita, the laptop). That simple copy does not get overwritten during use, so, all is well that ends (and I usually do not edit /etc/resolv.conf, I just leave the HghesNet DNS servers as the active ones if they're working.

Thanks for the interest.

Hope this helps some.
Thnx for your answer.
 
Old 11-03-2016, 07:25 AM   #21
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by jpollard View Post
Actually, you could run your own caching server...
This isn't going to help you much unless you can change the TTL of the records. Most DNS records have a TTL of 1 day.
 
Old 11-03-2016, 08:39 AM   #22
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@tronayne:
Quote:
if DHCP rears its ugly head, is a simple copy to /etc/resolv.conf.
How do you determine if DHCP rears its ugly head?
DHCP is always in your router.
So it is always there. No?
 
Old 11-03-2016, 09:52 AM   #23
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You can always change the default configuration of dhclient (usually /etc/dhclient.conf) to preserve the original content - that way you can "prepend" the wireless (since that will be the default) to the resolv.conf file, and will remove it when it stops - and your original reference will continue to be tried if the first entry fails.
 
Old 11-03-2016, 12:40 PM   #24
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Quote:
Originally Posted by fanoflq View Post
@tronayne:

How do you determine if DHCP rears its ugly head?
DHCP is always in your router.
So it is always there. No?
Yup, sure is in the router, but all my internal systems are fixed-IP and it doesn't bother me.

The sole exception is pita the laptop. Normally pita is connected via Ethernet to a router port. WICD is installed on pita and, when the Ethernet cable is in use it (WICD) doesn't do anything to /etc/resolv.conf but, when remote where wi-fi is the choice, DCHP takes over and causes /etc/resolv.conf to be overwritten (with no DNS address, thank you very much). Thus the back up copy of /etc/resolv.con and all is then well with the world: there is DNS service, so simple, so painless.

I have never been able to figure out just why that happens (I've tried pretty much everything to shut that off in whatever configuration file there is, no joy in Mudville).

I don't like network manager (it's a pain using fixed-IP that I don't want to deal with) and I'm perfectly happy to simply copy resolv.conf.bak over the rewritten file and be done with it -- pita is the only device on my LAN that will ever use wi-fi (I have no intention of every doing anything with IOT, do not go sit on the couch with the laptop in hand or any of that kind of stuff -- I have DirecTV and I will only connect it with Ethernet (and not often). pita is the only piece of equipment I have that ever uses DHCP directly and it's no problem to not have to deal with it.

Hope this helps some.
 
  


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
Hostname to Hostname mapping within /etc/hosts possible? helptonewbie Linux - Newbie 2 09-09-2010 06:43 AM
Could someone explain to me the process of adding a hostname? (hostname.domain.com) brynjarh Linux - Server 2 10-18-2009 07:58 PM
Problem with hostname and /etc/hosts file toxikco2 Debian 6 03-07-2007 08:55 PM
postfix with /etc/hosts, /etc/hostname file setting taiwf Linux - Newbie 1 05-24-2006 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:27 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