CentOS Network Connection Files

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hello, Cybrarians.
00:00
>> Welcome back to
00:00
>> the Linux plus course here at Cybrary.
00:00
I'm your instructor, Rob Goelz.
00:00
In today's lesson, we're going to discuss
00:00
network connection files in CentOS.
00:00
Now, upon completing today's lesson,
00:00
you'll be able to understand
00:00
the network configuration file syntax
00:00
for CentOS interface files,
00:00
and those are found in the etc/
00:00
sysconfig/ network scripts directory.
00:00
We're also going to touch briefly on the dhclient file.
00:00
With that being said, let's go ahead and get right
00:00
to it with some demo time.
00:00
In today's demo, we're over here in our CentOS system,
00:00
let's go ahead and navigate to
00:00
that directory I had mentioned.
00:00
We going to go to cd/etc/sysconfig network scripts.
00:00
All right, and then if we do an ls
00:00
dash al in this directory,
00:00
we're going to see all of the interface files,
00:00
the network connection files on the system.
00:00
Now, on this particular VM,
00:00
I only have a single interface file
00:00
for this IF Config E&P 0, S3.
00:00
Now that's the interface,
00:00
the network connection that we're using for this system.
00:00
It's a little bit weird.
00:00
ENP 0S3, what does that mean?
00:00
Well, that is actually gotten
00:00
from something called predictable
00:00
interface naming that takes into
00:00
account the way that the system comes up,
00:00
the settings in the bios,
00:00
the order that the PCI bus boots in,
00:00
lot of these things we'll cover later,
00:00
but if you want to know a little bit more about why that
00:00
has such a wacky interface name,
00:00
take a look at predictable interface naming.
00:00
Go ahead and Google that and
00:00
you'll know all you need to know.
00:00
Let's go ahead and take a look in this file,
00:00
so if we do a less on IFCFG ENP 0S3, hit, Enter here.
00:00
What we're going to see is all of the configuration that
00:00
is specific to this interface.
00:00
Now, it's not super interesting on this system and
00:00
that's because I only have DHCP,
00:00
I just added, just getting an IP address over DHCP.
00:00
All we're really seeing here
00:00
is that the type is Ethernet,
00:00
we're running the boot protocol, DHCP.
00:00
If we were using a static IP addressing,
00:00
we would see some other settings in this file,
00:00
so for instance our boot protocol,
00:00
instead of saying DHCP,
00:00
it would say static.
00:00
If we were running a static system we would
00:00
have an IP address line, IPADDR.
00:00
We would also see a netmask line,
00:00
we would see a gateway to specify
00:00
the default gateway that the system is
00:00
using with a static IP address that it has,
00:00
and then finally, we would also
00:00
definitely see a broadcast.
00:00
We would see a broadcast line in that file that would
00:00
indicate the broadcast network that the interface is on.
00:00
That's pretty much it for the networks scripts directory
00:00
and the network configuration files
00:00
that we find in the network directory.
00:00
Well that's pretty much it for
00:00
etc/config/network scripts and the interface files
00:00
that we see in that directory.
00:00
Now, let's move over and take a look at the DH client.
00:00
Now, the DH client on the system is used for DHCP.
00:00
It's used to configure DHCP on
00:00
this system to connect and talk to a DHCP server.
00:00
The DH client file is found in, etc/DHCP/DH client.
00:00
We're going to try and do a less on this if we can,
00:00
let's see if it allows us to,
00:00
we might actually need to become sudo, and we do,
00:00
we need to elevate our privileges in order
00:00
to view this file so let's just do a sudo edit.
00:00
What I'll do here is I'll type in
00:00
my user password to elevate
00:00
my privileges in order to read that file.
00:00
In CentOS, the only configuration
00:00
is a single send command,
00:00
and we can see that down here at the very bottom,
00:00
send DHCP client identifier equals hardware.
00:00
Now, what this specifies is that
00:00
the DHCP client is going to send the MAC address,
00:00
the hardware address of the interface to
00:00
the DHCP server in order to
00:00
get back it's DHCP information.
00:00
With that, in today's lesson,
00:00
we covered network connection configuration and CentOS,
00:00
which is found in
00:00
the /etc/sysconfig/ network-scripts directory,
00:00
and we also talked a little bit about
00:00
DHCP client configuration using the DH client file.
00:00
Thank you so much for being here
00:00
>> and I look forward to seeing you in the next lesson.
Up Next