Network Configuration (basic) #freebsd #network #config

Posted On Sep 26 2017 by


Network Configuration (basic)

If you want to change the basic network configuration (such as IP address, subnet mask, etc) on your FreeBSD server, there are two basic routes you can take. You can also do a Network Configuration (manual) using ifconfig but if you don’t save your settings in the rc.conf file (or have sysinstall save them for you) then they’ll go away if your server reboots.

The “newbiest” method is to use the text-GUI menu-driven method of hitting up /stand/sysinstall and going through Configure, Networking, Interfaces, and pick the particular network interface you want to configure. This is very simple and easy and will make all the actual changes in the proper system configuration file for you.

The alternate way to do it is to manually edit /etc/rc.conf (and possibly /etc/resolv.conf ) yourself. Keep in mind that rc.conf is designed to be a “delta” file; it basically consists of a series of patches to apply to the basic system rc.conf file in /etc/defaults. If you’re feeling REALLY leet, you can monkey around in that too (or the rc scripts themselves), but I strongly recommend that you don’t – just stick to making your changes in /etc/rc.conf. One thing to remember is that since rc.conf is a “patch” style delta file, it can contain (and if you’ve been using /stand/sysinstall. WILL contain) more than one line configuring the same parameter – in which case the last line in the file is the one that takes the final effect.

So if you open up /etc/rc.conf and you see the following:

You should realize that the EFFECTIVE ip address of ph34r, now, will be the latest change visible in the file – The only things that you cannot change in /etc/rc.conf in terms of the basic IP network setup are the internet domain your machine considers itself a member of, and the DNS resolution settings – you change that in /etc/resolv.conf. which is NOT a “delta” or “patch” file, but is a complete config file in its own right, which simply lists available nameservers to use for DNS resolution.

This one’s pretty self-explanatory: the domain is, meaning that the FQDN is since the base server name is ph34r, and it uses the nameserver at (in this case, meaning it uses its own services) to resolve DNS requests. If you wanted to change either of those things, you would edit them. You can also list more than one nameserver to use for DNS resolution, if you like, and it will select as it needs to from the list you have given it.

Advanced Network Configuration

More advanced network configuration methods can be found in the Network Configuration (Advanced) section.

Last Updated on: September 26th, 2017 at 7:17 pm, by

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *