Hey, beautiful people.
In this video, we are going to learn DHCP server.
I have a few students who have reached out to me and asked me that I create a video on DCP service.
Now please keep in mind DCP service is something that is managed by network administrators in corporate
world.
So which company you work, wherever you go?
You will find that the service is being managed by routers and network devices, so no system administrator
or Linux administrator manages the DHCP service.
Why am creating this video is because I do take my students feedback seriously, and they have requested
that I create a quick video on DSP so they could understand how DSP works.
Anyway, before we go any further into this video, one thing I want to clarify in this video, I will
show you how to set up DSP.
So conceptually only because if you want to set up DSP server on your Linux machine, then you will
have to reconfigure your router or modem in your home, which can route then all the traffic to your
new DSP server.
Now, reconfiguring the router or modem will make all your devices at home lose the network connectivity.
And if you do not know how to reconfigure your router modem, then I would say stay away from it because
my instructions right here does not include reconfiguring the router modem because there are different
router, different manufacturers, different setting.
My instructions right here only include the setting up the DHCP server on the Linux machine.
All right, so let's spend a few minutes with me.
Let's understand what DSP is, how it works in case we should know something about it or something comes
up down to down the road.
All right.
DSP, first of all, stands for Dynamic Host Configuration Protocol.
In order to communicate over the network, a computer needs to have an IP address, right?
And I'm sure by now you, you should know that without an IP address, your computer cannot communicate
over the network.
All right, so we are clear up until this point now, DHCP Server is responsible to automatically assign
IP addresses to your servers, laptops, desktops and other devices on the network.
Yes, it is responsible.
Every time you buy a new device, for example, you get a new tablet.
You bring it home.
You start it up and you connect to your via fi and then you get to the internet.
The reason you get to the internet is because it has an IP address, and that IP address is randomly
assigned by your DHCP server.
All right, so you probably thinking, hey, wait a second.
Right now in our home, how ships are assigned to our devices?
Well, that's a good question.
The answer is the router or gateway that is given to you by your ISP provider.
So you probably paying a monthly fee to your ISP or internet provider every month?
They are the one who give you a router or a gateway or a modem that is actually in your home, that
router.
Is responsible or it has a DCP service already running on it which actually hands out or assigns IP
addresses to all your devices.
OK, so that's good.
Now I know how the IP czar assigned in my home.
But how about corporate world?
How IP are assigned in corporate world?
Well, to answer that question in corporate world, they have dedicated routers that run DSP service
to assign IP on the network.
Now, DSP service is a service that assigns IP randomly to devices.
And if a device shuts down and it puts back on, it can get a different IP.
It will not get the same IP, so DHCP shuffles around the IP range it has in assigns IPS.
But if you want to assign a static IP, then you do not get the DHCP IP.
You tell your, your client, your computer, you assign a static a fixed IP to your computer so it
won't change.
Then you don't really need DHCP.
And I'll tell you this 95 percent to even, I would say, around approximately 98 to 98 percent of the
time the IP is in corporate world are assigned and static basis.
They are not assigned on DHCP because they want to have all of their server have that one IP.
They they could have it on the DNS as well.
All right.
So anyway, DHCP is mostly used in a home network.
So that's why we are learning more about it.
Moving on.
Step by step instructions on DCP.
The very first thing is in order for you to run your own DHB server.
Of course, you have to pick a Linux machine, which can run a DSP server.
Once you identified that Linux machine, then the next thing you do, you take a snapshot.
Always take a snapshot if it's a a a virtual machine.
So this way, if you make a mistake, you can always revert back to the time when you took this snapshot.
All right.
Let's assume you have picked so were ABC.
To have that DHB service running beautiful, then next thing is a sign a static IP to DCP.
Yes, that's a requirement.
You cannot have that same DHCP server that will be handing out the IP to other servers to rely on another
DSP server as well.
You have to assign the IP.
You pick an IP a few choice, of course, as long as that IP is available and hard code that onto that
DSP server.
So it won't change this way when the clients your client who needs an IP.
When the client goes up on the network and says, Who is my DHCP server?
I o this is the IP address that I need to go to to get my IP and DHCP services.
Hi, yes, you call me.
Here is the IP.
But what if the IP changes of the DSP server, then the client won't know.
That's why you have to assign a static IP to the DHCP server.
All right, then what you do is once the IP is.
So this is the instruction to assign the IP, you modify the ETSI cis config network and the interface
file and then assign the IP.
Or the best way is that you are simply run NMT UI command.
It's a great tool to assign a static IP.
Once you run that command as root, of course, you will be given a good menu.
The very first thing is right here you'll get three options added a selection activate a connection
setup host.
And so of course, you pick the first one pick the Ethernet adapter that you are going to assign the
static IP to.
So, for example, in our case, we'll pick in-progress three, and once that is selected, then you
come here and assign the IP address.
Now for this one, we picked the IP address, for example.
192 168 15. one and slash 54 slash 54 means that this will provide the range of 256 IPS.
All right.
So once the IP is assigned to our DHCP server, then moving on.
We will install the DHCP server package.
To install the package, you run the Command Yum, Install DSP.
Now this is the command you will run with the options in in red, how or Santos version seven.
If you are running eight, then you will run a DNF Install DSP Dash Server Bit version eight.
The next thing is added the configuration file with desired parameters, so you have to set the parameters
of how the IPS will be assigned to the clients.
For that, you have to modify at DSP slash DCP dconf file.
If you do not have that conf file or if you cannot find a file, you could copy it from the location.
USR Share Doc DSP with version the pickoff example to the location.
All right, then once you when once you edit that file, then you define these exact parameters.
Of course, you could change these parameters based on your requirement.
The very first thing you define is the DSP server will release the IP address for at least 10 minutes,
so not release reserve, which means is if it is assigning the IP address to the client.
It will keep it for 10 minutes.
Well, after that, it will keep it as long as the server is running.
Once a server shuts down, then it could reassign a different IP.
Same thing The Diaspora will reserve the IP address for Max of two of us then right here at this.
Parameter defines the subnet range of 256 addresses, so DHCP Server is allowed to assign up to 256
addresses because we have assigned the subnet off's last 24.
Next one, this is the range, even though we have slash 24.
You could actually modify and limit that range as well.
So from 256, you could come down and define the range.
So right here we have a range of 50 to 200 say means we want this DHCP server to only assign up to 100
and 50 addresses.
You could broaden the range or shrink the range.
It depends on your requirement.
Then a router defines the Gateway, the default gateway that will be given to your client, the subnet
mask that will be given to your client and the DNS and name server, which will be assigned to each
host that boots up and needs the IP address.
All right, then we have start the DHCP servers.
Once you configure, once you done with the configuration file, you input all the parameters.
Now it's time to start the service and it's just that simple system KTO star DHCP.
And you need to make sure you enable that service so it can get started at boot time, then disable
the firewall or allow DHCP report over the firewall.
If you don't want to disable the firewall, so simply to disable the firewall, you'll do System Ctrl
Stop Firewall D or to allow the port of DHCP.
While that the firewall is running.
Then you run this command firewall Dash Command Dash Dash, Add Dash service, which service DHCP and
you want it to have it permanent.
And of course, once you make that changes to the firewall, you would have to reload the configuration.
All right.
Once that done, the service is up and running on our DSP.
So beautiful.
Now switch DHCP service from your router or modem to your new leadership server, so log in to your
ISP, provider, router or a modem that you have at home.
Disable the DHCP on that modem and enable the DHCP forwarding to the new DHCP server.
Now, once again, as I said earlier, this type of setting is different and each modem aurora.
And if you are not familiar with the setting, I want you to learn first how you can make that.
Maybe you could call your ISP service provider and ask for help.
But if you do not know this, I would definitely research first before going into and setting up DHCP
server.
All right.
I hope the this lecture serves as purpose.
It gives you a conceptual understanding of DHCP.
For those of you who wants to try it, actually, I would say try it on your lab environment.
Of course, do not tried at home, which especially running your devices that are critical and especially
you have kids and who are running laptops and and games, and they will be very upset.
I tell you that I'll see in the next lecture.