Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Mar 1997 15:52:39 -0700 (MST)
From:      Wes Peters - Softweyr LLC <softweyr@xmission.com>
To:        gz@interlink.net (David Jokinen)
Cc:        questions@freebsd.org
Subject:   Re: how to change network config
Message-ID:  <199703282252.PAA21201@xmission.xmission.com>
In-Reply-To: <9703281918.AA09889@RezoNet.NET> from "David Jokinen" at Mar 28, 97 02:21:31 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I'm new to both FreeBSD and UNIX. I had no trouble with the initial 
> installation, but now I've moved the box to another network, so I need to 
> simply change my IP address, gateway and DNS settings. What's the 
> simplest way to do this? Will I need to reboot after, and if so, what's 
> the safest way to reboot? Thanks.

In order, network first:

Edit /etc/hosts and fix up your machines name; it should *always* be in
this file.  Remove the names of any machines on the old network you
won't be talking to anymore.

Edit /etc/sysconfig and make sure your ifconfig lines are correct.  If
you're still using numerical IP addresses in here, this is the time to
change them to names and make sure the names are in /etc/hosts.  Next
time, you won't have to worry about the addresses, just get the names
correct.

Gateway:

If you're using a simple default route, get it while you're in
/etc/sysconfig.  Make it a name also, and put an entry in /etc/hosts.

DNS:

If you're just a client, edit /etc/resolv.conf and set your correct
nameserver and domain name.

Applying:

You don't have to reboot the machine, but that is probably the easiest
way to get it.  If you only have one ethernet interface, you could
simply configure it down, then configure it up at the new address and
add the new default route.  Probably better to reboot.  ;^)

-- 
          "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                       Softweyr LLC
http://www.xmission.com/~softweyr                       softweyr@xmission.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703282252.PAA21201>