How to transparently set-up two differently configured network interfaces?

Olaf Greve o.greve at
Wed Jan 12 05:24:52 PST 2005

Hi all,

I find myself with little time to find a neat solution for the following 

We have a Shuttle on which fbsd 5.2.1 is installed. Now, the machine 
used to have just one network interface, of which I'd simply switch the 
settings when the machine needs to be used for demo purposes, rather 
than running in our local network.

So, I just installed a second network interface, and I'd like the 
machine to become smart enough to do the following:

-Boot, check if rl0 has a cable attached to it, and if so, use that as 
active network interface, with fixed settings (gateway, nameserver, and 
IPv4 address all set to
-if rl0 does not have a cable attached to it, use DHCP on interface rl1 
and use that.

Sounds relatively straightforward. So I set the settings of the rl0 and 
rl1 network interfaces (via sysinstall) to reflect just that. However, 
when doing so, the gateways seem to get shared, and just get set to

Can anyone point me to the proper means of setting this up properly? 
Normally I would RTFM regarding dhclient.conf and such, but 
unfortunately I find myself with very little time available for spending 
on it, so I hope someone can give me a quick pointer in the right 


More information about the freebsd-questions mailing list