[
253
]
Assigning static IP addresses
With servers, it's very
important that your IP addresses remain fixed and do not
change for any reason. If an IP address does change (such as a dynamic lease with
no reservation), your users will experience an outage, services will fail, or entire sites
may become unavailable. When you install Ubuntu Server, it will grab a dynamically
assigned lease from your DHCP server, but after you configure the server the way
you want it, it's important to set a permanent IP address right away before it's
considered production-ready. One exception to this rule is an Ubuntu-based VPS.
Cloud providers that bill you for these servers will have an automatic system in
place to declare an IP address for your new VPS, and will already have it configured
to remain in place. But in the case of virtual or physical servers you manage yourself,
you'll start off with a dynamic address, unless you've already configured a static IP
address during installation.
In most cases, you'll have an IP address scheme in place at your office or
organization, which will outline a range of IP addresses that are available for use
with static assignments. If you don't have such a scheme, it's important to create one,
so you will have less work to do later when you bring more servers online. We'll
talk about setting up a DHCP server and IP address scheme in
Chapter 11
,
Setting
Up Network Services
, but for now, I'll give you a few quick tips. Your DHCP server
will typically have a range of IP addresses that will be automatically assigned to
any host that requests an assignment. When setting up a static IP on a server, you'll
want to make sure that the IP address that you choose is outside of the range that
your DHCP server assigns so you don't end up with a duplicate IP on your network.
For example, if your DHCP server assigns IPs ranging from
10.10.10.100
through
10.10.10.150
, you'll want to use an IP address
not
included within that range for
your servers.
There are two ways of assigning a fixed address to a network host, including your
servers. The first is by using a static IP assignment, as I've already mentioned. With
that method, you'll arbitrarily grab an IP address that's not being used by anything,
and then configure your Ubuntu Server to use that address. In that case, your server
is never requesting an IP address from your network's DHCP server. It simply uses
whatever you assign it. This is the method I'll be going over in this section.
The other way of assigning a fixed address to a server is by using a static lease. This
is also known as a
Do'stlaringiz bilan baham: |