FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 04:07 PM
Michael Higgins
 
Default What overwrites resolv.conf

I received a used laptop a week or so ago, wiped the tinker-toy OS
offered with it and proceeded to do the right thing. So far, I have got
a machine I can (manually) put to sleep and use on a wireless network.
So far, so good.

At home, I don't have a wireless AP, but a 50-ft. ethernet cable. When
I connect via wireless (at the office, say), then use my machine at
home, resolv.conf is toasted, where I use fixed IP and put my DNS
servers in there. DHCP is used everywhere else.

So, what overwrites it, when, how, and how to stop it? Is there a
definitive guide to the syntax of the various config files? Or, BETTER
YET, is there anyone who has a smoothly-functioning configuration to
switch between wireless DHCP and connected hard-wired net setups and
would like to share?

Cheers,

--
| /| | | ~ ~
| / | |---| `|` ?
| |ichael | |iggins ^ /
michael.higgins[at]evolone[dot]org
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 04:19 PM
"Chris Brennan"
 
Default What overwrites resolv.conf

add this to your /etc/conf.d/net



dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
dns_domain_ESSID="some.domain"
dns_search_ESSID="search.this.domain search.that.domain"

you can also swap-out ESSID for eth0/wlan0 respectivly if they settings differ.

This way, when you start the rspective device, /etc/resolv.conf will
get the right settings.

C-

On Wed, Apr 23, 2008 at 12:07 PM, Michael Higgins <linux@evolone.org> wrote:
> I received a used laptop a week or so ago, wiped the tinker-toy OS
> offered with it and proceeded to do the right thing. So far, I have got
> a machine I can (manually) put to sleep and use on a wireless network.
> So far, so good.
>
> At home, I don't have a wireless AP, but a 50-ft. ethernet cable. When
> I connect via wireless (at the office, say), then use my machine at
> home, resolv.conf is toasted, where I use fixed IP and put my DNS
> servers in there. DHCP is used everywhere else.
>
> So, what overwrites it, when, how, and how to stop it? Is there a
> definitive guide to the syntax of the various config files? Or, BETTER
> YET, is there anyone who has a smoothly-functioning configuration to
> switch between wireless DHCP and connected hard-wired net setups and
> would like to share?
>
> Cheers,
>
> --
> | /| | | ~ ~
> | / | |---| `|` ?
> | |ichael | |iggins ^ /
> michael.higgins[at]evolone[dot]org
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 05:03 PM
Mike Edenfield
 
Default What overwrites resolv.conf

Michael Higgins wrote:


So, what overwrites it, when, how, and how to stop it? Is there a
definitive guide to the syntax of the various config files? Or, BETTER
YET, is there anyone who has a smoothly-functioning configuration to
switch between wireless DHCP and connected hard-wired net setups and
would like to share?


It's being overwritten by your DHCP client, which is the expected
behavior. As long as your setup is such that your wireless card always
uses DHCP, and your wired card never uses DHCP, you can configure the
Gentoo networking script to do the right thing depending on which
interface you're starting up.


In your /etc/conf.d/net setup, add variables for:

config_eth0 = ( "w.x.y.z/nn" )
dns_servers_eth0 = ( "w.x.y.z", "w.x.y.z" )
dns_domain_eth0 = "my.domain"

This will work as long as you manually stop and start the interfaces
when you switch adapters. The net.eth0 startup script will write out a
new resolv.conf, etc.


--Mike

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:37 PM
Michael Higgins
 
Default What overwrites resolv.conf

On Wed, 23 Apr 2008 13:03:55 -0400
Mike Edenfield <kutulu@kutulu.org> wrote:

> Michael Higgins wrote:
>
> > So, what overwrites it, when, how, and how to stop it? Is there a
> > definitive guide to the syntax of the various config files? Or,
> > BETTER YET, is there anyone who has a smoothly-functioning
> > configuration to switch between wireless DHCP and connected
> > hard-wired net setups and would like to share?
>

Thanks to all for your replies. I think I've got it now!

--
| /| | | ~ ~
| / | |---| `|` ?
| |ichael | |iggins ^ /
michael.higgins[at]evolone[dot]org
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 07:38 PM
Michal 'vorner' Vaner
 
Default What overwrites resolv.conf

Hello

On Wed, Apr 23, 2008 at 09:07:29AM -0700, Michael Higgins wrote:
> So, what overwrites it, when, how, and how to stop it? Is there a
> definitive guide to the syntax of the various config files? Or, BETTER
> YET, is there anyone who has a smoothly-functioning configuration to
> switch between wireless DHCP and connected hard-wired net setups and
> would like to share?

I didn't like the way Gentoo handled network (wifi OK, but ethernet with
different locations was a pain somehow), so I wrote a little perl thing
I use as a network manager.

However, I think noone who did not read and understand its code is able
to use it to anything, since it has no documentation and completely
non-intuitive control.

You can find it here http://vorner.pretel.cz/en/netprofile.html, if you
feel brave enough. If anyone is interested, I can answer questions about
it off-list (not to scare others).

--
I left the ssh key under the doormat

Michal 'vorner' Vaner
 
Old 04-23-2008, 08:00 PM
Alan McKinnon
 
Default What overwrites resolv.conf

On Wednesday 23 April 2008, Michael Higgins wrote:
> I received a used laptop a week or so ago, wiped the tinker-toy OS
> offered with it and proceeded to do the right thing. So far, I have
> got a machine I can (manually) put to sleep and use on a wireless
> network. So far, so good.
>
> At home, I don't have a wireless AP, but a 50-ft. ethernet cable.
> When I connect via wireless (at the office, say), then use my machine
> at home, resolv.conf is toasted, where I use fixed IP and put my DNS
> servers in there. DHCP is used everywhere else.
>
> So, what overwrites it, when, how, and how to stop it? Is there a
> definitive guide to the syntax of the various config files? Or,
> BETTER YET, is there anyone who has a smoothly-functioning
> configuration to switch between wireless DHCP and connected
> hard-wired net setups and would like to share?

Aaaah, the old obliterate-your-resolv.conf file problem :-)

It is possible to tell dhcp servers to not present a resolv.conf file to
all (or specific) clients.

However, I always found this to be a major pain in the arse. My
solution: don't use static ip's at home, set up a dhcp server with a
permanent lease for your machine, then have it download the resolv.conf
that you really do want at home.

Other locations might by broken but at least you know you are guaranteed
to get what you want when at home


--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-24-2008, 06:46 PM
Q
 
Default What overwrites resolv.conf

Michael Higgins <linux@evolone.org> wrote:

> Is there a definitive guide to the syntax of the various config files?

/etc/conf.d/net.example and /etc/conf.d/wireless.example are pretty
well annotated.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-24-2008, 08:24 PM
"Daniel da Veiga"
 
Default What overwrites resolv.conf

On Thu, Apr 24, 2008 at 3:46 PM, »Q« <boxcars@gmx.net> wrote:
> Michael Higgins <linux@evolone.org> wrote:
>
>
> > Is there a definitive guide to the syntax of the various config files?
>
> /etc/conf.d/net.example and /etc/conf.d/wireless.example are pretty
> well annotated.
>
>

For a desktop install, the config.example files are great.
But for a notebook, creating and maintaining different setups for
different networks is troublesome (some of them you'll probably never
use again). When travelling or just sitting at a hotel that uses WPA
or WEP keys, setting up config files for PSKs or keys is a pain.

I searched for some solution and found net-misc/networkmanager. Its a
cool solution, as it configures any network on-the-fly, without
messing with configuration or keeping files all over. I'm a Gnome
user, and the applet sitting at the panel is awesome, as it lists all
wireless connections, and also deals with wired networks. Its a "must
have" in my personal opinion for a mobile device, I use it with my
Asus EEE.

Just sharing some user experience.

--
Daniel da Veiga
����z�b��z{h�����x%��
 
Old 04-27-2008, 09:49 AM
Peter Humphrey
 
Default What overwrites resolv.conf

On Wednesday 23 April 2008 21:00:25 Alan McKinnon wrote:

> My solution: don't use static ip's at home, set up a dhcp server with a
> permanent lease for your machine, then have it download the resolv.conf
> that you really do want at home.

My solution was simply to "chattr +i /etc/resolv.conf", but that stopped
being available when I switched from ext3 to reiserfs.

--
Rgds
Peter
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 04:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org