CompTIA Linux+ XK0-005 – Unit 09 – Networking Part 4
31. Topic B: Network Services
So now we’re going to talk about network services. These are going to be things that help make the connectivity on the network a lot easier for us or the communications a lot easier for us. So we’re going to talk about things like DNS and DHCP and how they can benefit us in making our connectivity both in the local area network or out through the whole Internet.
32. NIC Configuration
First, we’re going to start off with the configuration of our network card. Now, this is the first thing we have to do to be able to get anywhere is to make sure that we have an address appropriate for the actual network that we’re connecting to. Now, one of the easy commands that you can use to verify your connectivity or to verify number one, which cards they’re on and what their settings are, is a simple command like if config if config will allow you to be able to see the existing settings. Now, you can also statically create and use through a file all of the network settings that you want to have each card to use if you want them to have static configurations. So you also have that ability as well. But we’re going to kind of focus on the use of having dynamic host configuration protocols.
33. Network Commands
So if you want to do any type of configurations and you don’t necessarily want to statically deal with things through a file, you can use the if config not only to see the settings of the interface but to also use it to make the new settings. Now if config all by itself will list all of your network cards which generally will also include this thing called a loopback. A loopback interface face is not a physical interface that touches any wires or radio frequency. It’s often a virtual interface that exists on your system, often for remote management purposes. A whole nother world there to work with in the networking setup of loop backs. I’m not going to get down that road but I just want you to know there is no network card that is actually associated with the loop back.
Now if config followed by the name of the specific interface, then followed by the settings is simply what you would do to create the new settings. Or you can open up a graphical user interface depending on the desktop environment and make the settings just by clicking on things, typing in what you want and then clicking OK. There’s also another command that you’ll see often in the network world called the route command. Now the route command is especially important if you have more than one gateway on your network. And what I mean by that is you can say look I have two routers, one goes to the Internet, one goes to my server farm. You then create routes on your system that says if this is the IP address you want to go to for my server farm then go use this router because that’s the server farm router for all of the other routes.
Go use this router because that’s my internet route. But that’s another network command you have where you can configure the routes on your system. Most of you probably only have a single router on your network and that is that router that’s actually going to take you to the internet. And the only route you have would be one we call the default route. Again that’s back into routing issues. And the default route very quickly if you ever wanted to see it, is a route whose destination address is all zero. So that means everything matches. So anyway another network command is the route so that you can take care of your routing tables so that when you send traffic out through your network interface card it knows which direction to go.
34. Demo – Configuring Your Network Interface
All right, we’re going to take a look at our settings for our network card. And we’re going to start off with a little bit of this redirecting to our screen cat the Etsy network and interfaces. And there we can see pretty much that we have interface f zero, ethernet zero set up to be a DHCP client. So there’s nothing exciting about that. So what we’re going to do is run the if config command. We already are set up with the super user or the su to root. And that’s why I can run this command. If you run it, if configuring your tool doesn’t work, you got to make sure you have the root I’m on this private address, 108 216841. My mask is a class, what some people would call a class C mask. I call it a prefix length of 24 bits. And I’m not going to worry about the init six that’s on a link scope. It’s going to automatically figure itself out on its own.
And the next thing I need to kind of see is what is my default gateway. So there’s the route command and it looks like my route table at the moment isn’t all that exciting. Says that my gateway, my generated mask. I know that that’s what I have there. Oh, there we go. Finally it came up with the default route. The default route is going to the same location as my DNS server, as is my DHCP server. So it’s kind of my all in one device that’s at 192 168 one one. The reason I snickered at that is that this will be a very easy configuration should you want to do this stuff on your own. All right, so now again, the if config showed me both my network cards. You could always say ifconfig f zero if you want to see just your ethernet zero card itself. And that’s always works out well.
And as I said before, you can view the configurations with your interfaces command, but we’ve already seen that. So what we’re going to do now is try to use ifconfig to make a new configuration instead of being a DHCP client. So I’m going to type in ifconfig f to zero. That’s the interface. And we’re going to put in a new address, surprisingly the same one that we had before because I like having internet connectivity. But just so you can see how this works, I’m going to put in the net mask of let me type in the word net mask of 255-255-2550. And we’re going to put in the broadcast address 192 168. One has to be 255 because of the mask and the address that we’re on. And I’m going to hit enter here to put that in. And now again, I’m going to do if config and I kind of expect to see the same addresses that I had before.
And sure enough, everything else is the same. But the idea here was that I actually sat and did this without it being something that was done through DHCP. If I go back to my Etsy, my network and my interfaces, and I do need to basically restart, too. That was one of the other things I forgot to do, is after restart and after I reboot the system, I can actually come back here to the etsy file and we would see that I’m no longer this DHCP client. So I’m going to reboot this, but you’re going to catch the return to the DHCP. So on our return to DHCP in a different lab, you’ll actually see the etsy file for the interfaces showing that it’s manually assigned, and then we put it back DHCP. So it’s kind of a way of getting you to come and take a look at another one of the labs that we’re doing. So you can see that after rebooting, this thing was statically assigned, because then we’re going to go back to DHCP.
35. DHCP Service
Now, one of the things we like to use when configuring our network cards is to have another server do it for us, and that is a DHCP server. Now, DHCP stands for Dynamic Host Configuration Protocol and it is a service that can run on anything. Switches and routers and firewalls other Linux servers, Windows servers. Almost anybody in the world can run DHCP. Now, in order refer us to look at our services, we have to make the decision. Are we a client? Do we get the DHCP address? Looking at the command DH client, are we running as a DHCP server?
Meaning we have the DHCP daemons running? Or are we doing some other type of form of communications, like maybe even being a relay? A relay is where we intercept somebody’s request for DHCP and send it through the network to the actual DHCP server and relay it back. The short reason that happens is that DHCP request is a broadcast. Broadcast can’t go past a router, so the relay sends it past the router. Kind of a quick little how that service works for you. But those are some of the options you have when you’re configuring DHCP services, is to understand what is it that you’re going to be.
36. Demo – Managing DHCP Client Services
All right. In a previous lab I left off with this Etsy network interfaces configuration file set up showing you that it was using the DHCP configuration. And so here you can see what happens after we’ve edited it. The address now is statically assigned with this 141. And as I said, if you reboot this thing, that’s what the address is going to be because this is the basic startup hot plug the Ethernet, here’s the interface at zero, ethernet zero, here’s my settings. So we can still override that if we want to go back to being a DHCP client. And the purpose of my changing this file was so that we weren’t anymore the DHCP client. But what you’re going to see here is, and by the way, I don’t need to do the pseudo because here I am who I am, I’m the root already. I’m going to use the command DH client and then F zero.
So it tells that card basically that I want it to be a DHCP enabled address. So there you see that it’s doing a DHCP Discover and we’re going to hopefully get our DHCP server to give us an answer back. And based on that answer, hopefully have an IP address. Now, the odds are, since I statically set it to the same one that was given to me before by the DHCP server, the odds are I’m going to get the same address coming back to me. So we’re going to find out here in just a minute as we wait for this discovery process to go forward and then we’ll look and see what has been given to us. Some of you might have noticed here as going through here, this is the part of the DHCP process if you’re not at all familiar with DHCP, what it is, is clients will send a broadcast out.
And when they send a broadcast out, they’re basically looking for anybody to answer the question about offering out DHCP addresses. And if we sent out a Discover, we’re hoping to get an offer back. Here you can see we actually didn’t get an offer back from the DHCP server, which means that we were not successful in getting the information back. That’s how you would set up though the DHCP client. This is kind of almost a three or four way process. I send out a Discover broadcast, that means the DHCP server has to be on my local network or there has to be a relay agent and if somebody answers it’ll send me an offer. And based on that offer that I get, I can then choose to accept that offer and send out kind of an acknowledgement saying yes, I’ll take that address that you gave me. And then we’re all said good and done.
But there you can see that as I tried to get that offer, it did not discover one. So we’ll try one more time to see if we can get one out. There with the DHCP discover but that is how you set these things up to do their job. Now even though I’m trying to do this on a temporary basis, what you’re going to see is that it will still, even if successful, if there was a DHCP server out there it would not only give me back an address but it would be temporary. The next time I reboot this is going to go back to the configuration that was set up in the interfaces file and again that’s the startup configuration. This would be just a temporary way of putting that information into this interface. And in fact if I were to take the interface down and up again then you would also see that as well.
So it looks like there is no DHCP server that’s going to respond but you can see the way in which you do. This was a very straightforward command and that was the DH client and then the name of the interface that you want to send out the request for the DHCP. Okay, so no offers received. So no working DHCP server there for us. If config at zero will still show you our address as it is now in that we don’t have one given to us since I’ve asked to be a client and none was offered. You see there is no IP address. But if I do go look at that cat file you can see I still have some static configurations. So what we’re going to do is we’re going to go ahead and take this thing down. We’re going to do the ifconfig F zero down, we’re going to make that interface die.
You might see a little pop up there that says, okay, it’s dead. Now we’re going to try to bring it back up and hope that when it gets back up that we can get our static information back for us. And let’s take a look now ifconfig and there we have our static and as I said that’s where it’s going to go, back to that file that you saw the interfaces configuration file. And so we’re good. Again, we didn’t get the DHCP request but you saw some other commands that you can take them down, take them up. Of course if you wanted to you could edit that interfaces file and tell it to automatically be a DHCP client or do as I’ve done here which was statically, configured everything.
Now I think that depending on the versions of Linux that you have you might also support an if down and then follow that by the name of the interface. Yes, there we go. And then an if up and f zero well can’t spell ethernet today and you can use those two commands besides the one you saw me using with if config. All right, so there you saw the command to temporarily make this DHCP client or edit the interfaces configuration file to make that permanent. You saw the ways to bring the interface up, to bring the interface down, to temporarily override the interface settings that you have with the existing DHCP if you had a DHCP address. And all of that can be done basically from the command line with your if config.
37. DHCP Server Services
Now, the DHCP server services running with the DHCP daemon, if you want to be that server, comes from the package called the DHCP Three server package. So you install that package, and then you can run as a DHCP server. Now, if you’re going to be a DHCP server, odds are you’re not going to also be a client. In other words, you should have your own statically configured IP address on your network card, and you will dynamically set out addresses for everybody else.
38. DHCP Server Services B
Now, in setting that up, there is some configuration files that you would find depending on the type of DHCP that you’re running. Whether it’s DHCP Three or just DHCP daemon, you’ll find it under the etsy path with whichever service you’re running. A DHCP configuration file. It’s technically called Dhcpd co NF configuration file. And what you put in there is what we often call the scopes. Now the scopes are generally going to be what range of addresses do you assign? When you assign an address, how long is the person allowed to keep it? That’s the lease time. What is the host name? What are the subnet information? Is it an authoritative type of a setting where you have to be able to legitimately be identified?
Other things that you can also put in the configuration options are things like who is your DNS server, who is your default gateway so you know the address of the router that you want to get out. If for some reason it was a voice over IP phone that was gathering information you can provide in there, who their call managing server is going to be. I mean, there’s a lot of options that you can configure in DHCP so that when a system comes online and makes a request, you’re you can give them every setting they need to have so that they know how. To communicate with the network and how to communicate with all of the other network services that could be beneficial for them in their everyday communications and use on the network.
Interesting posts
The Growing Demand for IT Certifications in the Fintech Industry
The fintech industry is experiencing an unprecedented boom, driven by the relentless pace of technological innovation and the increasing integration of financial services with digital platforms. As the lines between finance and technology blur, the need for highly skilled professionals who can navigate both worlds is greater than ever. One of the most effective ways… Read More »
CompTIA Security+ vs. CEH: Entry-Level Cybersecurity Certifications Compared
In today’s digital world, cybersecurity is no longer just a technical concern; it’s a critical business priority. With cyber threats evolving rapidly, organizations of all sizes are seeking skilled professionals to protect their digital assets. For those looking to break into the cybersecurity field, earning a certification is a great way to validate your skills… Read More »
The Evolving Role of ITIL: What’s New in ITIL 4 Managing Professional Transition Exam?
If you’ve been in the IT service management (ITSM) world for a while, you’ve probably heard of ITIL – the framework that’s been guiding IT professionals in delivering high-quality services for decades. The Information Technology Infrastructure Library (ITIL) has evolved significantly over the years, and its latest iteration, ITIL 4, marks a substantial shift in… Read More »
SASE and Zero Trust: How New Security Architectures are Shaping Cisco’s CyberOps Certification
As cybersecurity threats become increasingly sophisticated and pervasive, traditional security models are proving inadequate for today’s complex digital environments. To address these challenges, modern security frameworks such as SASE (Secure Access Service Edge) and Zero Trust are revolutionizing how organizations protect their networks and data. Recognizing the shift towards these advanced security architectures, Cisco has… Read More »
CompTIA’s CASP+ (CAS-004) Gets Tougher: What’s New in Advanced Security Practitioner Certification?
The cybersecurity landscape is constantly evolving, and with it, the certifications that validate the expertise of security professionals must adapt to address new challenges and technologies. CompTIA’s CASP+ (CompTIA Advanced Security Practitioner) certification has long been a hallmark of advanced knowledge in cybersecurity, distinguishing those who are capable of designing, implementing, and managing enterprise-level security… Read More »
Azure DevOps Engineer Expert Certification: What’s Changed in the New AZ-400 Exam Blueprint?
The cloud landscape is evolving at a breakneck pace, and with it, the certifications that validate an IT professional’s skills. One such certification is the Microsoft Certified: DevOps Engineer Expert, which is validated through the AZ-400 exam. This exam has undergone significant changes to reflect the latest trends, tools, and methodologies in the DevOps world.… Read More »