static ip address and ifconfig

Polytropon freebsd at
Sat Dec 29 23:09:39 UTC 2012

On Sat, 29 Dec 2012 17:52:52 -0500, Fbsd8 wrote:
> Your talking in general terms which does not help me, I need details.
> You said above "Whereas a static IP assignment must be configured 
> manually by you the human and not the ISP."
> I tried to show this human manual configuration in my above post.
> What are you purposing as human manual configuration?
> I need syntax of commands used in response to my above post.

This basically means you do not actually use DHCP for your
"client" machines (or better: for _your_ machines, be it
servers, desktop computers or firewalls); instead you have
to configure the components that would be DHCP's task on
a dynamic IP connection.

This is:

1. In /etc/rc.conf you need to configure the NIC(s) of your
   system to the IPs you want them to have:

	ifconfig_xl0="inet 123.456.789.10  netmask 0xffffff00"
	ifconfig_xl1="inet 123.456.789.11  netmask 0xffffff00"

   Maybe your ISP also defines a default router for you.

2. In /etc/resolv.conf, you have to define name servers if
   you need them (or you run your own one). Typically the
   ISP will tell you which NS _he_ offers.

	nameserver 123.456.700.100

3. You would also add entries to /etc/hosts reflecting your
   host's settings:

	123.456.789.10 foo
	123.456.789.11 foo

All this implies that those settings are quite static. But for
a static IP that might be fully desired. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list