Assigning IP addresses.
Now, when we have our networks
and they rely on IP addresses like IPV4,
how do we tell our devices what addresses
they're going to have?
Well, there are really two different methods we can use.
One is to manually or statically assign them
and the other is to dynamically assign them.
Now, when I use a static assignment,
this is a really simple process.
As a technician,
I manually will type in the IP address for the host,
its subnet mask, its default gateway, and its DNS server.
But this can be time consuming and prone to error.
For example, let's say I have 20 devices on the network.
Now I'm going to have to go and assign
those four pieces of information
20 different times, once for each device.
That's 80 places I have to enter information.
This means there's a lot of chance for human error here
because these numbers are very easy to mistype,
and if you mistype one,
you're going to be assigning the wrong information
to the wrong devices, or you might have the same information
on multiple devices and this will also cause problems
or conflicts between two devices.
So as you start to work on large enterprise networks,
it becomes very impractical to do static assignment
of the IP addresses for all your devices.
Some of our networks in the past that I've run
have been 500 clients, 1,000 clients,
5,000 clients, 10,000 clients, 100,000 clients,
or even 1 million client computers
in a large scale intranet.
So for us to assign those all statically
and keep track of all those different IP addresses
would become a full-time job for a large team of people
located all over the world
because that large intranet spans six continents.
That would be a waste of a lot of time, money,
labor, and resources.
So instead, we simplify this process
by using dynamic allocation of IP addresses.
This is known as a dynamic assignment.
By doing this, we have a quicker, easier,
and less confusing method of assigning our Ips
to all of our network clients when they join the network.
Now for large or small networks,
using dynamic IP addressing
is usually going to be your best option.
In your home, whether or not you know it,
you're already probably using dynamic IP addressing.
When you bought a new smartphone
or tablet or laptop or desktop,
you took it out of the box, you powered it on,
and then you joined your wireless network
and you were able to go online and browse the web, right?
You didn't have to do any kind of crazy configurations.
Well, in this case, you didn't assign your new device
an IP address, a subnet mask, a default gateway,
or a DNS server to use.
Instead, your network's DHCP server did all that for you
automatically without you even having to ask it to.
This is because most small office and home office
network devices like your cable modem,
fiber modem, or wireless access point,
already have a running DHCP server there for you,
and it's turned on by default.
You just tell the device what network to join
and your router will use DHCP
to hand out a dynamic IP address
for your network client to be able to utilize.
So what are those four components
of a fully configured client?
Well, whether you're using static or dynamic assignment,
you still need to use the same four components.
This is an IP address, a subnet mask, a default gateway,
which is usually just the IP of your router,
and a server for either DNS or WINS.
Now DNS is the domain name system.
DNS is going to be used to convert domain names
used by a website to the IP address of its server
so that your computer can connect to it.
For right now, just realize that DNS is essentially
the internet's version of a phone book
where we can look up a name
and get a number to connect directly to.
Now names to numbers and numbers to names,
that's what DNS is all about.
For example, when you went to diontraining.com,
you're going to be using DNS in the background
to determine what the IP address is of my server,
so you can connect to it and access our webpages
or our videos.
That is DNS at work.
Now WINS on the other hand, W-I-N-S,
is used within a local area network.
Specifically, WINS is used in Windows domains
and it is known as the Windows Internet Name Service.
It's used to enable Windows
to identify net bios names on a TCP IP network
and convert those NetBIOS names to IP addresses.
Basically WINS is like DNS,
but it only works within a Windows domain environment.
So if I wanted to connect to my mail server
inside a Windows domain,
I could type in its IP address if I knew it,
or I could simply type in the name of the server,
something like Mailbox or whatever I have named it.
Now, when it comes time to do the dynamic assignment
of the critical addressing information for each client,
we can use four different methods to do this.
This includes BOOTP, DHCP, APIPA and ZeroConf.
BOOTP is by far the oldest and least used
of these four options.
BOOTP or the Bootstrap protocol
was originally introduced in 1985
for use in diskless Unix workstations
because it could dynamically assign
the IP address information
and then allow the workstation
to load a copy of their boot image over the network.
Now, BOOTP used a static database of IPs and MAC addresses.
So essentially, whenever a client connected to the network
to initiate the BOOTP process,
it would find its Mac address inside its database
and then send the proper IP address that matched it
back to the requesting client as its assignment.
This wasn't as dynamic as we would like so in 1993,
a newer updated protocol known as DHCP
was introduced to replace BOOTP.
Now, DHCP or the Dynamic Host Configuration Protocol
is going to allow the assignment of an IP
based on an assigned scope or pool of addresses,
as well as it provides the ability for us to configure
numerous other options within it.
Now, since DHCP allows me to configure my scope,
I can actually tell my DHCP server something like,
hey, I only want you to hand out addresses
that are from 192.168.1.100
up through 192.168.1.200,
and this gives you about a hundred clients
that can now be automatically assigned.
Every time somebody connects to the network,
the DHCP is going to send out one of those IPs from that range
and assign it for a given period of time,
known as a lease, to a client.
Now each IP can be barred for a certain amount
of time from this pool, and when that lease expires,
the DHCP server is going to pull back that address.
Now, this doesn't actually cause a problem for us
because your computer at any time can say,
hey, I'm still using that address.
You can't take it.
And in that case, the DHCP server would say,
oh, okay, you can keep it
and reassigns it for another period by renewing its lease.
It's just like if you get a book from the library,
say you are halfway through reading it
and it's going to be due tomorrow, you could take it back
to the library and recheck it out.
It's the same concept with DHCP and dynamic addresses.
Now, when the lease does expire
and it's no longer needed by the client,
it's going to be returned back to the scope or that pool
and be ready to be issued to another client.
Essentially, each client can borrow that IP
during its assignment and then return it
whenever it's done with it.
Now this IP management is going to be performed
by the DHCP server on our behalf,
and it's going to be used to manage all of these IPs
that are being assigned and returned over time.
This is great because we don't have to control it ourself
or keep track of it all manually.
Instead, we have the ability to go into it at any time
and look at the logs and say, hey,
who was using the IP 192.168.1.132
on September 9th at 3:00 PM
and then we can figure it out using DHCP's
IP address management and their logs.
And so this gives us all the benefits of figuring out
who did what while still not having to do
any of the management and oversight
of handing out these IP addresses.
Now, another great thing about DHTP
is that it gives our clients
all of these different variables
that they need to communicate.
This includes the dynamic IP address that's being assigned,
as well as the subnet mask,
the default gateway, and the DNS server.
And if you're using a WINS server,
you can also send that through DHCP.
This can all be done using the DHCP protocol for us
automatically each and every time a new client connects
to the network.
Yes, I know I've repeated these four configuration options
a bunch of times now, and you know what that means?
It means this information is really important.
So you simply have to know those four configuration items
that DHCP provides to your clients
and keep them in mind for test day.
Remember, that's the IP address, the subnet mask,
the gateway, and the DNS server's IP.
The WINS server is an optional component
that may or may not be sent.
Alright, we're going to talk a lot more about DHCP
in a separate video, but for now,
you need to remember that DHCP is the modern implementation
of BOOTP and it's commonly used in our modern networks
to be able to assign automatically the IP address
and other required data for a client
to communicate on a network.
Now, the third way we can do automatic
or dynamic addressing is by using APIPA, A-P-I-P-A,
or the Automatic Private Internet Protocol Addressing.
Basically, if for any reason DHCP
cannot complete the assignment process
or find an address for you to give to the client
because you ran out,
then APIPA is going to be used instead.
This kind of thing can happen if there's a problem
where the client can't reach the DHCP server
because of networking issues or something else like that.
Now, in these cases, the client is going to assign itself
an APIPA address, which is a self-assigned address.
Now, by default on a Windows server or workstation,
you're going to find that APIPA is selected by default
under the TCP IP properties
under the alternate configuration tab.
Now, this allows the Windows machine
to assign itself an address randomly
from the 169.254 .something .something scope
if it can't reach a DHTP server
or it can't contact it and finish the negotiation process.
Now, APIPA is designed to allow for a quick configuration
of a local area network
without the need of having a DHTP server.
For example, if I take 10 clients
and I connect them all to a switch without a DHCP server,
these 10 clients will default
to picking up their own IP address from the APIPA range,
which is 169.254 .something .something.
Again, because it's a Class B address,
this is perfectly fine
because they're all going to be on the same local area network.
So if I wanted to play "Doom" on this local area network
with these 10 machines, that's fine.
They'll all find each other
and they'll talk based on their APIPA addresses
without any issues at all.
Now, the only problem that will occur
is that these are private IP addresses,
so they can't be read outside of our local area network.
Therefore, if we need to communicate locally,
we can do that using a switch and everything will be fine,
but we're not going to be able to reach the internet
because we don't have the same network as the router.
Because the router had a valid IP address,
not an APIPA address.
And so we don't have a default gateway to get out
of this local network we've created.
Now, this is the biggest challenge you're going to have
when you have an APIPA address assigned to your clients
because they cannot communicate
outside the local area network
or with other devices that don't have an IP address as well.
If you ever have a computer that starts
with 169.254 .something .something,
and you can't figure out why it's not connecting
to the internet, well that's your reason.
It's an APIPA address
and APIPA addresses can't get out past the router,
and so APIPA addresses are not going to allow you
to connect to the internet.
Our last dynamic method of configuring an IP address
is known as ZeroConf or zero configuration.
Now ZeroConf is a newer technology
that was based on APIPA and can provide you
with a lot of the same features as APIPA,
as well as some new ones.
For example, ZeroConf can actually assign an IPV4
link-local address to a client.
This is a form of a non-routable IP
that's used on a local subnet just like APIPA.
But the big difference is that with zero config,
this client can now have the ability
to resolve computer names to IP addresses
without the need of DNS by using something known as mDNS
or multicast Domain Name Service.
Also, ZeroConf can perform a service discovery
on a network so it can find out what things are connected
and available for use.
So if there's a printer, a scanner,
or shared file system,
you can actually find that using ZeroConf.
There have been lots of different implementations
of ZeroConf in recent years,
and it's called different things
depending on the implementation
and the product line you're using.
For example, on Apple Products,
ZeroConf is actually called Bonjour,
and it's used mostly for service discovery of other clients
and devices on the local area network.
In Microsoft Windows,
they like to call it LLMNR,
Link-Local Multicast Name Resolution,
and it's going to rely on it as an extension
of APIPA to provide for name resolution
and service discovery in addition to providing
network connectivity.
Now, if you're using Linux,
ZeroConf is usually implemented using SystemD,
or the system daemon service,
specifically the systemd-resolved background service.
So remember, there are lots of different ways
to assign IP addresses.
You can do it manually known as a static assignment
or automatically known as a dynamic assignment.
If you're using a dynamic assignment,
you can do this with one of four methods,
BOOTP, DHTP, APIPA, or ZeroConf.
Really, it all depends on the needs of your clients
and your network.