Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? |
|
This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Set_a_system__39__s_TCP--IP_settings.html. Set a system's TCP/IP settingsConceptBe able to modify required TCP/IP settings both temporarily and permanently in order to remain after a reboot. IntroductionThis chapter one of the most important because you as network administrator must know how to convert your hardware into real server. In this part you know how to set network settings in BSD box. ExamplesYou can update IP on the fly manually and via DHCP server. You must be a root user for change IP and other network settings. TODO: briefly mention DHCP and refer to section View and renew a DHCP lease. TODO: maybe move some of this to there?
Now we update our fxp0 interface IP via DHCP server. You may override default dhclient options in /etc/dhclient.conf. In environments where a static IP or DHCP is not available, you must manually configure a network interface:
And check the status of this interface:
The -a switch may be used to check the status of all interfaces. You may save these settings on xBSD, yBSD and FreeBSD by adding an entry to /etc/rc.conf:
For OpenBSD, create an /etc/hostname.rl0 for the rl0 interface in OpenBSD:
To configure xBSD, yBSD, and FreeBSD to use dhcp on startup:
And in OpenBSD, simply use the following entry in /etc/hostname.if: "dhcp NONE NONE NONE To bring up an interface according to the configuration files, use netstart:
DHCP servers often provide a default route. If dhcp is not in use, or a default route is not provided by the DHCP server, you must configure one manually. In xBSD, yBSD and FreeBSD, add:
to rc.conf. Similarly, in OpenBSD, add an entry to /etc/mygate:
you may check the routing table by using
The -n option discarding name resolution preventing long delays. You may add a default entry by keying in:
For update DNS servers list you must update your resolv.conf file. This is typical file
TODO: don't cover DNS too much here. For more information about DNS, see section Change the order of name resolution and ...TODO. Firstly system try to resolve address with 192.168.10.1 and then with 10.10.10.13 (truly firstly with hosts file) Practice Exercises
More informationhostname (1), ifconfig(8), route(8), resolv.conf(5), rc.conf(5), hosts(5), hostname.if(5), myname(5), mygate(5), netstart(8)
|