Network configuration in FreeBSD

Steve Bertrand iaccounts at
Thu Jul 8 07:42:36 PDT 2004

>> Am new to FreeBSD... just installed it for 2nd time today, but don't
>> know what
>> I did that it didn't ask me for the network configuration (ip, domain,
>> etc)... once installed, is there a command to perform that task?
>> I'm linux user, so am familiar to *nix systems, but don't know how to
>> configure the network specifically on freebsd...

I certainly agree with the suggestions to RTFM (Handbook), as well as
sysinstall, but just for the record, the following is how you can do it
from the command line. Let's assume that your network adapter is using the
device name vr0 (you can look this up using the # ifconfig command), your
IP address will be, your subnet mask is your
hostname is, your DNS servers are and
and finally, your default gateway is

First, edit /etc/rc.conf and add the following lines (include the quotes):

ifconfig_vr0="inet netmask"

Next, edit /etc/resolv.conf and add these lines:


Now, to enable things as to not have to reboot, run the following commands:

# ifconfig vr0
# route add default

Unless you have a firewall, you should now be able to connect to other hosts.



> As another person suggested, try checking out the FreeBSD Handbook at
>, which pretty much describes everything you need to know
> when getting started w/FBSD.
> Since, no one has suggested this yet, I will:  you can go back into the
> installer utility by running /stand/sysinstall.  The installer comes in
> handy quite a bit when you don't know the actually commands to do
> something (ie setting up a network interface or partitioning a disk).
> Once you run /stand/sysinstall, you can scroll all the way to the bottom
> and select 'Index' and then select 'Network Interfaces'.
> --
> Don't you wish that all the people who sincerely want to help you
> could agree with each other?
> /*  Aaron Walker
>   *
>   */
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list