Date: Fri, 02 Oct 2015 06:42:15 +0300 From: doroseracledes@gmail.com To: Frank Leonhardt <freebsd-doc@fjl.co.uk>, freebsd-questions@freebsd.org Subject: Re: FreeBSD and two different networks Message-ID: <20151002034215.5804117.75106.9000@gmail.com> In-Reply-To: <560DB7A3.1000707@fjl.co.uk> References: <6371943.nqOrXjNnlq@thinkpad> <560DB7A3.1000707@fjl.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
How about dhclient enter-hooks: =E2=80=8Ehttp://www.macfreek.nl/memory/DHCP_Client_Script_Examples "If you want to have more control, e.g. only set the default route for em0,= but not for other interface, add the following lines to /etc/dhclient-ente= r-hooks: # Do not set default route on any interface except em0 if [ "$interface" !=3D "em0" ] then =C2=A0 =C2=A0 unset new_routers fi " There's also "supersede" in dhclient.conf to overwrite what dhcp provides a= nd set to something you want (think overwrite) =E2=80=8E Theodoros Sent=C2=A0from=C2=A0a=C2=A0smartphone =C2=A0=C2=A0 > Dear All, > > I have a FreeBSD machine at work. It's mostly connected to the so-called > "internal" network that has a static ip: let it be 172.16.1.113/12. The > default gateway for that network is 172.16.1.1. > Sometimes, I need to connect this machine to another network that uses DH= CP. > Its network mask differs: it's 192.168.1.0/24. The second network uses DH= CP. > > The question is: can I set both of the default gateways (skip DHCP: I can > configure the interface for the "external" network manually) in some way?= Can > I set up some kind of a daemon that checks whether one of my gateways is > accessible and forwards all of the traffic through that gateway? Thank you > very much in advance.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151002034215.5804117.75106.9000>