"Roger 'Rocky' Vetterberg" <[EMAIL PROTECTED]> writes:

> Lets say you have this in rc.conf:
> 
> ifconfig_dc0="inet 1.2.3.4 netmask 255.255.255.0"
> ifconfig_dc1="DHCP"
> default_router="1.2.3.254"
> 
> The network on dc1 is 192.168.0.0/24 with the default router on that
> subnet being 192.168.0.254.
> 
> If I reboot the box, dhclient will set default router to
> 192.168.0.254, overriding the value I specified in rc.conf.
> Is there a way to prevent that?
> 
> Right now, I have a shellscript that runs as soon as the box is
> finished booting that resets the default route to its correct value,
> but somehow it feels that this is not the right way to do it.

Right.  What you want to do is simply tell dhclient(8) not to do that.
The way you do that configuration is with dhclient.conf(5).

I would recommend the following statement: 
        prepend routers 192.168.0.254

My own dhclient.conf looks like the following, in which the only
statement that actually does anything useful is the one pointing the
main name server entry at myself.

    # $FreeBSD: src/etc/dhclient.conf,v 1.2.2.1 2001/12/14 11:44:31 rwatson Exp $
    #
    #   This file is required by the ISC DHCP client.
    #   See ``man 5 dhclient.conf'' for details.
    #
    #   In most cases an empty file is sufficient for most people as the
    #   defaults are usually fine.
    #
    interface "fxp0" { 
     request subnet-mask, broadcast-address, routers, domain-name-servers, 
             domain-name, host-name; 
     send host-name "lowellg.ne.client2.attbi.com";
     send dhcp-lease-time 5184000;

     prepend domain-name-servers 127.0.0.1;

    # require domain-name-servers; 
    # default host-name "lowellg";
    # default domain-name "ne.mediaone.net";
    # supersede host-name "lowellg.ne.mediaone.net";
    } 

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to