2

I have

Comcast cable <====> modem <===> router <===> freebsd server

My freebsd server is connected to wireless router via a network cable.

What I want to do is, to have a static ip for the server.

How can I do it?

4

You can set static IP address in FreeBSD in /etc/rc.conf file. First you need to know what is name of your network interface that you want to configure. Use ifconfig to list all network interfaces, when you find it add following line to /etc/rc.conf:

ifconfig_INTERFACE_NAME="inet IP_ADDRESS netmask NETMASK"

for example:

ifconfig_dc0="inet 192.168.0.2 netmask 255.255.255.0"
  • 3
    And default gateway in /etc/rc.conf: defaultrouter="192.168.0.1" – Alpacino Sep 12 '11 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.