LinuxQuestions.org
Visit Jeremy's Blog.
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 09-10-2011, 12:21 PM   #1
gene292
LQ Newbie
 
Registered: Jul 2011
Distribution: ubuntu 18.04
Posts: 19

Rep: Reputation: Disabled
resolv.conf - dns server outdated


I've just swithched my network provider, but the nameserver
in /etc/resolv.conf is still set to the old providers.
The comment in /etc/resolv.conf states that it is created
automatically by networkManager. However, reboting the machined or restarting
netwrok manager did not change anything :-(
What am I missing, please?

Here is some info about my system:
-----------------------------------------------------------------------------
me@me-4u:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... [ OK ]
-----------------------------------------------------------------------------
me@me-4u:~$ more /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.101
nameserver 167.206.245.130
nameserver 167.206.245.129
-----------------------------------------------------------------------------
me@me-4u:~$ more /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.101
nameserver 167.206.245.130
nameserver 167.206.245.129
-----------------------------------------------------------------------------
me@me-4u:~$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
me@me-4u:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:23:54:13:27:50
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::223:54ff:fe13:2750/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5239 errors:0 dropped:0 overruns:0 frame:0
TX packets:4082 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1877837 (1.8 MB) TX bytes:354695 (354.6 KB)
Interrupt:26 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3736 errors:0 dropped:0 overruns:0 frame:0
TX packets:3736 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:292256 (292.2 KB) TX bytes:292256 (292.2 KB)
 
Old 09-10-2011, 01:44 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Either /etc/resolv.conf gets populated with DNS info via NetworkManager (no idea where if not in /etc/NetworkManager/) or via your DHCP client if you use dhclient or equivalent. In case of the latter you could tweak things yourself manually, automagically updating settings probably are better, creating or adding relevant lines to /etc/dhclient-eth0.conf:
Code:
interface "eth0" {
 supersede domain-name-servers 8.8.8.8, 8.8.4.4, 208.67.222.222, 208.67.220.220, 4.2.2.1, 4.2.2.2;
 }
and restart networking. Note the IP addresses above are just for the example. Even though they work from about everywhere there's no special need to use Google, OpenDNS and Level 3 name servers.
 
Old 09-12-2011, 11:11 AM   #3
gene292
LQ Newbie
 
Registered: Jul 2011
Distribution: ubuntu 18.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thank you.
I've modified resolv.conf manually, and dns is working.
How is it supposed to happen automatically?
This started when I switched service from Cablevision to VerizonFios.
 
Old 09-12-2011, 11:41 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by gene292 View Post
I've modified resolv.conf manually, and dns is working.
OK but I hope you changed the DNS IP addresses to the ones your ISP provides you with?


Quote:
Originally Posted by gene292 View Post
How is it supposed to happen automatically?
I don't know. Maybe check the NetworkManager GUI or wherever else (/etc/sysconfig/network/profiles or /etc/sysconfig/network-scripts/*eth*) you can set connection details?

Last edited by unSpawn; 09-12-2011 at 11:42 AM.
 
  


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
Newbie DNS server & /etc/resolv.conf problem (CentOS 5.x) aspasia Linux - Newbie 0 03-24-2008 05:10 PM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
resolv.conf dns issues billbob Linux - Software 3 09-30-2005 12:20 PM
dns server and /etc/resolv.conf freeosfreesoul Linux - Laptop and Netbook 2 09-02-2005 06:45 PM
DNS & resolv.conf robeb Linux - Networking 1 06-25-2002 09:15 PM

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

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