Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2010 12:57:40 -0800
From:      Freddie Cash <fjwcash@gmail.com>
To:        "Ronald F. Guilmette" <rfg@tristatelogic.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Configuring for 1 static and 1 DHCP interface ?
Message-ID:  <AANLkTi=RJiwpOd9i77NUOZ_PREfrERjDNw%2BJ_iSWF7ig@mail.gmail.com>
In-Reply-To: <45858.1290545572@tristatelogic.com>
References:  <20101123155323.GA51348@laptop.levsha.me> <45858.1290545572@tristatelogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 23, 2010 at 12:52 PM, Ronald F. Guilmette
<rfg@tristatelogic.com> wrote:
> I don't want the DHCP stuff to set -no- routes at all... I still do
> want it to create a route to 192.168.1.0/24. =C2=A0I just don't want it
> make any change to the default route that would otherwise be set,
> you know, as a result of the defaultrouter=3D statement in my /etc/rc.con=
f
> file.
>
> So is there a nice clean & simple way to get the DHCP stuff to only
> create just that route to 192.168.1.0/24 , while leaving the default
> route alone?

dhclient doesn't set that route.  The kernel's networking code
automatically creates a route for the subnet when you add the IP to
the interface.

You can check this like so:
  ifconfig re0 172.20.0.1/24
  netstat -rn

Replace re0 with your interface.  You'll notice that just by adding an
IP with a subnet mask to an interface, you get a route for that subnet
created.

--=20
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=RJiwpOd9i77NUOZ_PREfrERjDNw%2BJ_iSWF7ig>