LinuxQuestions.org
Visit Jeremy's Blog.
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 10-01-2005, 12:20 AM   #1
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
Fedora DNS resolv.conf issue


Hi everybody ... i have fedora core 4 installed on my laptop. i have internal eth0 card on it. i carry the laptop with me between the office and home. the card if configured to request DHCP information. i have two routers one at home and office. they are working fine as DHCP servers with other mahines.
the card pull DHCP information right at the office . but when i get back home , i get th following infromation from the DHCP server:
Add 192.168.2.x
GAT 192.168.2.1
DNS 192.168.2.1

everything seems to be fine ... the GUI network tool shows that i took the information right. and i will be able to ping ip address not FQDNs. i checked the /etc/resolv.conf and it had the 10.10.10.1 as a DNS server which is my dns server at the office.

my question is why the network service is not able to reset the information to the DHCP settings ? i have to reset the resolv.conf everytime i get back home.

if anyone has an explanation .... i will appriciate the help
 
Old 10-01-2005, 03:16 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Try just adding another nameserver line in resolv.conf;
nameserver 192.168.2.1
 
Old 10-01-2005, 04:51 PM   #3
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Original Poster
Rep: Reputation: 31
i'm trying too

i did that already ..... but i don't find a reason for the dhcp client not to be able to update the resolv.conf by itself. the network GUI intserface shows that i've got the right DNS server and the resolv.conf points to another server. i would like to find a reason for that.

thanks a lot
 
Old 10-17-2005, 11:13 AM   #4
knobdy
Member
 
Registered: Oct 2005
Location: St. Joseph, MO
Distribution: SuSE 10 on T42 Laptop
Posts: 38

Rep: Reputation: 15
Angry same issue in SuSE 9.3

I'm having the same issue. My resolv.conf file gets backed up correctly, I guess, but the new DNS entries - at work as opposed to at home - are ammended to the resolv.conf file. I have to edit it manually and remove the entries for my home DNS server in order for DNS resolution to work at work.

One, it would be nice if all the settings were replaced when a new DHCP lease is obtained.
Two, if it can't do one then it should at least be able to read all of the entries in the file before it gets timed out (which is what I'm assuming is happening).
 
Old 10-17-2005, 11:31 AM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
At the client machine, do you have PEERDNS=yes in the /etc/sysconfig/network-scripts/ifcfg-eth-0 ?
 
Old 10-17-2005, 12:09 PM   #6
knobdy
Member
 
Registered: Oct 2005
Location: St. Joseph, MO
Distribution: SuSE 10 on T42 Laptop
Posts: 38

Rep: Reputation: 15
No, there's not setting for DNS in either ifcfg file - and, for that matter, I use the wireless NIC at home and the wired NIC at work.

This is the dhcp file in that directory though:

BLOE-T42:/etc/sysconfig/network # cat dhcp
## Path: Network/DHCP/DHCP client
## Description: DHCP configuration tweaking
#
# Note:
# To configure one or more interfaces for DHCP configuration, you have to
# change the BOOTPROTO variable in /etc/sysconfig/network/ifcfg-<interface> to
# 'dhcp' (and possibly set STARTMODE='onboot').
#
# Most of these options are used only by dhcpcd, not by the ISC dhclient (which
# uses a config file).
#
# Most of the options can be overridden by setting them in the ifcfg-* files,
# too.

## Type: string
## Default: ""
## ServiceRestart: network
#
# Which DHCP client should be used?
# If empty, dhcpcd is tried, then dhclient
# Other possible values:
# dhcpcd (DHCP client daemon)
# dhclient (ISC dhclient)
DHCLIENT_BIN=""

## Type: yesno
## Default: no
#
# Start in debug mode? (yes|no)
# (debug info will be logged to /var/log/messages for dhcpcd, or to
# /var/log/dhclient-script for ISC dhclient)
#
DHCLIENT_DEBUG="no"

## Type: yesno
## Default: no
#
# Should the DHCP client set the hostname? (yes|no)
#
# When it is likely that this would occur during a running X session,
# your DISPLAY variable could be screwed up and you won't be able to open
# new windows anymore, then this should be "no".
#
# If it happens during booting it won't be a problem and you can
# safely say "yes" here. For a roaming notebook with X kept running, "no"
# makes more sense.
#
DHCLIENT_SET_HOSTNAME="no"

## Type: yesno
## Default: yes
#
# Should the DHCP client modify /etc/resolv.conf at all?
# If not, set this to "no". (The default is "yes")
#
# resolv.conf will also stay untouched when MODIFY_RESOLV_CONF_DYNAMICALLY
# in /etc/sysconfig/network/config is set to "no".
#
DHCLIENT_MODIFY_RESOLV_CONF="yes"

## Type: yesno
## Default: yes
#
# Should the DHCP client set a default route (default Gateway) (yes|no)
#
# When multiple copies of dhcpcd run, it would make sense that only one
# of them does it.
#
DHCLIENT_SET_DEFAULT_ROUTE="yes"

## Type: yesno
## Default: no
#
# Should the DHCP client modify the NTP configuration? (yes|no)
#
# If set to yes, /etc/ntp.conf is rewritten (and restored upon exit).
# If you don't want this, set this variable to "no". (The default is "no")
#
DHCLIENT_MODIFY_NTP_CONF="no"

## Type: yesno
## Default: no
#
# Should the DHCP client modify the NIS configuration? (yes|no)
#
# If set to yes, /etc/yp.conf is rewritten (and restored upon exit).
# If you don't want this, set this variable to "no". (The default is "no")
#
DHCLIENT_MODIFY_NIS_CONF="yes"

## Type: yesno
## Default: yes
#
# Should the DHCP client set the NIS domainname? (yes|no)
# (if the server supplies the nis-domain option)
#
DHCLIENT_SET_DOMAINNAME="yes"

## Type: yesno
## Default: yes
#
# When writing a new /etc/resolv.conf, should the DHCP client take an
# existing searchlist and add it to the one derived from the DHCP server?
#
DHCLIENT_KEEP_SEARCHLIST="no"

## Type: integer
## Default: ""
#
# Lease time to request ( -l option)
#
# Specifies (in seconds) the lease that is suggested to the server.
# The default is infinite. For a mobile computer you probably want to
# set this to a lower value.
#
DHCLIENT_LEASE_TIME=""

## Type: integer
## Default: 999999
#
# (only dhcpcd does use this setting)
#
# You can set the timeout (dhcpcd will terminate after this time when it
# does not get a reply from the server).
#
# The default timeout of dhcpcd is 60 seconds. However, we'll set it to a
# much longer time. dhcpcd will then run as a daemon in the background and
# broadcast a DHCPDISCOVER once in a while, trying to get a lease.
#
DHCLIENT_TIMEOUT="999999"

## Type: integer
## Default: ""
#
# (only dhcpcd does use this setting)
#
# INIT-REBOOT timeout ( -z option)
#
# This timeout is specifically to control how long dhcpcd tries to reacquire
# a previous lease (init-reboot state), before it starts getting a new one.
# Default: 10
#
DHCLIENT_REBOOT_TIMEOUT=""

## Type: string
## Default: AUTO
#
# specify a hostname to send ( -h option)
#
# specifies a string used for the hostname option field when dhcpcd sends DHCP
# messages. Some DHCP servers will update nameserver entries (dynamic DNS).
# Also, some DHCP servers, notably those used by @Home Networks, require the
# hostname option field containing a specific string in the DHCP messages from
# clients.
#
# By default the current hostname is sent ("AUTO"), if one is defined in
# /etc/HOSTNAME.
# Use this variable to override this with another hostname, or leave empty
# to not send a hostname.
#
DHCLIENT_HOSTNAME_OPTION="LOECO_T42"

## Type: string
## Default: ""
#
# specify a client ID ( -I option)
#
# Specifies a client identifier string. By default the hardware address of the
# network interface is sent as client identifier string, if none is specified
# here.
#
# Note that dhcpcd will prepend a zero to what it sends to the server. In the
# server configuration, you need to write the following to match on it:
# option dhcp-client-identifier "\0foo";
#
DHCLIENT_CLIENT_ID=""

## Type: string("dhcpcd dhclient")
## Default: ""
#
# specify a vendor class ID ( -i option)
#
# Specifies the vendor class identifier string. dhcpcd uses the default vendor
# class identifier string (system name, system release, and machine type) if it
# is not specified.
#
DHCLIENT_VENDOR_CLASS_ID=""

## Type: yesno
## Default: no
#
# Send a DHCPRELEASE to the server (sign off the address)? (yes|no)
# This may lead to getting a different address/hostname next time an address
# is requested. But some servers require it.
#
DHCLIENT_RELEASE_BEFORE_QUIT="no"

## Type: string
## Default: ""
#
# Run this script when the interface is brought up, down, or the IP address
# changes ( -c option)
#
# per default, /etc/sysconfig/network/scripts/dhcpcd-hook is run
#
DHCLIENT_SCRIPT_EXE=""

## Type: yesno
## Default yes
#
# Force dhcpcd to calculate UDP checksum on received packets. (yes|no)
# This corresponds to dhcpcd's -C option.
#
DHCLIENT_UDP_CHECKSUM="yes"

## Type: string
## Default: ""
#
# additional options, e.g. "-B"
#
DHCLIENT_ADDITIONAL_OPTIONS=""

## Type: integer
## Default: 0
#
# Some interfaces need time to initialize. Add the latency time in seconds
# so these can be handled properly. Should probably set per interface rather than here.
#
DHCLIENT_SLEEP="0"

## Type: integer
## Default: 5
#
# When the DHCP client is started at boot time, the boot process will stop
# until the interface is successfully configured, but at most for
# DHCLIENT_WAIT_AT_BOOT seconds.
#
DHCLIENT_WAIT_AT_BOOT="5"
## Type: yesno
## Default: yes
#
# Should the DHCP client modify /etc/samba/dhcp.conf?
#
DHCLIENT_MODIFY_SMB_CONF="yes"
 
Old 10-17-2005, 12:12 PM   #7
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Why dont you put two namerserver enteries in /etc/resolv.conf ?

One for your office network & other for home.
 
Old 10-17-2005, 12:34 PM   #8
knobdy
Member
 
Registered: Oct 2005
Location: St. Joseph, MO
Distribution: SuSE 10 on T42 Laptop
Posts: 38

Rep: Reputation: 15
That would sort of defeat the purpose of using DHCP wouldn't it?

I would then have to edit the file manually if I decided to use a wifi hotspot at my favorite coffee shop or bar.

The dhcp client is supposed to edit this file, if its not, then its broken.
 
Old 10-17-2005, 02:21 PM   #9
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally posted by knobdy
That would sort of defeat the purpose of using DHCP wouldn't it?

I would then have to edit the file manually if I decided to use a wifi hotspot at my favorite coffee shop or bar.

The dhcp client is supposed to edit this file, if its not, then its broken.
Aint you told me that you were going out too.
 
Old 10-17-2005, 03:58 PM   #10
knobdy
Member
 
Registered: Oct 2005
Location: St. Joseph, MO
Distribution: SuSE 10 on T42 Laptop
Posts: 38

Rep: Reputation: 15
Well, you never know - but in any case, what's the point of having a laptop if you can't take it with you anywhere!

At work I know the DNS servers, as I do at home, elsewhere I'm probably hosed. So is this a known bug, a bug, or something else? Like it says under my handle, I'm a newbie.
 
Old 10-18-2005, 01:35 AM   #11
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I have done a bit of background reading on this and and you should have a file /etc/sysconfig/network-scripts/ifcfg-ppp0. In this file look for the line peerdns which should be set to yes - reference .

Last edited by TigerOC; 10-18-2005 at 01:37 AM.
 
Old 10-18-2005, 09:11 AM   #12
knobdy
Member
 
Registered: Oct 2005
Location: St. Joseph, MO
Distribution: SuSE 10 on T42 Laptop
Posts: 38

Rep: Reputation: 15
Sorry, that file doesn't exist. I'll check your reference but on my system (again, SuSE 9.3) there is only /etc/sysconfig/network/<MANY network scripts -none of which start with if-anything or end with ppp0 or any other ifname>
 
Old 10-18-2005, 10:03 AM   #13
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Try posting in the Suse section re pppoe and resolv.conf as this is quite a common problem and there are a number of postings on this subject at the moment Someone there is bound to have an answer on setting this in Suse. Most distros use specifics for this kind of thing and its just knowing where to find it.
 
Old 10-22-2005, 12:06 PM   #14
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Original Poster
Rep: Reputation: 31
i don't have the file either

/etc/sysconfig/network-scripts/ifcfg-eth-0 .... coudn't be found .. i have /etc/sysconfig/network-scripts/ifcfg-lo which is the loopback interface ..
this discussion have came to nothing uptill now .... cus the dhcp client is still not able to update resolv.conf .... say you have a wireless NIC and you are moving between hotspots .... that would bea problem .... i did some research but i could find nothing ....i posted the same quetions on other websites ... if anything new came out , i will post it here
 
Old 10-27-2005, 07:31 AM   #15
zz-007
LQ Newbie
 
Registered: Oct 2005
Distribution: Debian and SuSE
Posts: 7

Rep: Reputation: 0
I managed to get it work

Hi,

I experienced the problem with SuSE 9.3. The solution (so far) was to configure both the fixed connection interface et0 and the wireless interface eth1 as STARTMODE='ifplugd', or 'Device activation: On Cable Connection' from the yast2 menus. I suppose the former is a result from the latter. I used yast2.

Apparently the problem was that resolv.conf was never written properly as there still was one interface missing configuration from the DHCP-server.
 
  


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
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
Route and Resolv.conf Issue FrodoNeil Linux - Networking 2 12-07-2004 11:55 PM
configure jay's firewall to use dns in /etc/resolv.conf TheOneAndOnlySM Linux - Software 0 03-29-2004 07:27 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:20 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