[GLLUG] ubuntu autochanging of /etc/resolv.conf and 192.168.1.64

Mike Reed mike at mreed.org
Tue Sep 12 12:53:17 EDT 2006


If you're trying to set a static IP, you need to change
/etc/network/interfaces to something like:

iface eth0 inet static
       address 192.168.1.10
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.1

Then ifdown eth0 and ifup eth0.  That should keep it from
tring to auto-assign/DHCP values.

- Mike

> You can still use DHCP for your IP settings, but override
> DNS settings.
> Look at /etc/dhcp3/dhclient.conf and the supercede
> statement.  From the
> manpage:
>
>       The supersede statement
>
>         supersede [ option declaration ] ;
>
>        If for some option the client should always  use  a
> locally-configured
>        value  or  values rather than whatever is supplied
> by the server,
> these
>        values can be defined in the supersede statement.
>
> Werd,
> dpk
>
>
> On 9/12/06, Clay Dowling <clay at lazarusid.com> wrote:
>>
>> Scott,
>>
>> What's probably assigning those values is dhcp.  If your
>> machine is
>> supposed to be getting its information from DHCP then
>> you should stop
>> fighting it.  If your machine is not supposed to be
>> using DHCP then you
>> should disable DHCP configuration on eth0.
>>
>> Clay Dowling
>>
>> Scott Harrison said:
>> > Hi,
>> >
>> >
>> > Here is my current situation.  I am booting from
>> > ubuntu live cd desktop version 6.06.1.
>> > Please see my silly perl scripts below, and
>> > help me find a better way!
>> >
>> >
>> > If I don't do this,
>> > perl -e 'while(1) {sleep(1);`echo "nameserver
>> 35.8.2.41" >
>> > /etc/resolv.conf`;}' &
>> >
>> >
>> > I then, after a few minutes, wind up with this:
>> > root at ubuntu:~# more /etc/resolv.conf
>> > search domain_not_set.invalid
>> > nameserver 192.168.0.1
>> >
>> >
>> > Also, I am doing this:
>> > perl -e while(1) {sleep(1);`ifconfig eth0 192.168.2.1
>> netmask
>> > 255.255.255.0`;}?
>> >
>> >
>> > because something in the system is auto-assigning
>> > 192.168.1.64 to eth0.
>> >
>> >
>> > I tried adjusting
>> > auto eth0
>> > iface eth0 inet dhcp
>> >
>> >
>> > to be
>> > auto eth0
>> > iface eth0 inet 192.168.2.1
>> >
>> >
>> > Also, for my LAN, I adapted various iptables commands
>> > from
>> http://www.tldp.org/HOWTO/Masquerading-Simple-HOWTO/summary.html
>> > to help allow other LAN computers to access the
>> internet.
>> > I am wanting to use ubuntu live cd as a failsafe
>> internet connection
>> > tool for my LAN, but it seems cumbersome to
>> > store/transcribe/thumbdrive/remixlivecd all those
>> > iptable commands.  Is there a simple GUI or countably
>> few
>> > set of commands to do something similar?
>> >
>> >
>> > I'm still in a happy place, but I must face Darth
>> Vader
>> > (aka these bugs and issues) again, and this mailing
>> list
>> > is my only hope.
>> >
>> >
>> > Scott
>> >
>> >  -----
>> >
>> >
>> > *******************
>> > ** DISCLAIMER :P **
>> > *******************
>> >
>> > This E-mail message and any attachments may contain
>> information.
>> >




More information about the linux-user mailing list