Network Configuration Troubleshooting

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
>> Hey, there Cybrarians and welcome back to
00:00
the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Gills,
00:00
and in today's lesson, we're going to be
00:00
covering network configuration troubleshooting.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand
00:00
common network interface locations
00:00
as well as work with the IP,
00:00
arp, and nmcli commands.
00:00
Network interface management was covered in Module 3,
00:00
but we're going to recap some of the content here,
00:00
and that's because we need
00:00
this information to talk about network troubleshooting.
00:00
It's just a good idea to refresh at this point.
00:00
We're also going to talk a little
00:00
bit more about some of the commands that we
00:00
saw in Module 3 because we're going to use
00:00
these when we're troubleshooting
00:00
network connections and network connectivity.
00:00
First off, we need to know where to
00:00
look for interface configuration information,
00:00
because we're going to use the interface configuration
00:00
when doing our troubleshooting
00:00
>> to answer questions like,
00:00
>> well, what's the MAC address for
00:00
this interface and what subnet is in use.
00:00
Now when we're on
00:00
a Red Hat-based distribution like CentOS,
00:00
we can use the /etc/sysconfig/network-scripts directory
00:00
because that holds persistent
00:00
network connection information,
00:00
and each interface is going to have
00:00
its own configuration file inside of this directory.
00:00
There are a few important configuration items or
00:00
lines that we'll see in
00:00
these interface configuration files,
00:00
for example, we might see the boot protocol or boot
00:00
protoline being set to either static or DHCP.
00:00
If you see that it's set to static,
00:00
then it also gives us the ability to
00:00
specify a static IP address and that set
00:00
with the IPADDR or netmask or the gateway.
00:00
Next up, if we were looking at in
00:00
Ubuntu or Debian-based system,
00:00
the /etc/netplan directory is where we're starting to
00:00
see IP address management use in Ubuntu.
00:00
This replace the /etc/network/interfaces
00:00
and ifup and ifdown
00:00
directories that were used previously.
00:00
Nowadays, network configuration is being set in
00:00
a single net plan YAML file by default.
00:00
There are some syntax items to
00:00
consider when you're looking at a net plane YAML file,
00:00
for example, the interface name will be
00:00
the interface under which all configs live.
00:00
We might see DHCPv4.
00:00
This will be set to DHCP for yes.
00:00
Yes will be set for DHCP or you might see no on
00:00
DHCP4 if we're doing static IP addressing.
00:00
Then if we have static IP addressing turned on,
00:00
we can specify IP addresses that we want to use,
00:00
as well as the gateway.
00:00
Now most modern Linux distros
00:00
are actually starting to use
00:00
network manager for the detection
00:00
and management of network connections.
00:00
The nmcli command is a command-line tool
00:00
that you use to configure network manager.
00:00
This is a little bit easier to use than trying to open
00:00
a configuration file and
00:00
parse through it when you're doing troubleshooting,
00:00
and one of the really nice things about nmcli
00:00
is that it also allows you to do tab completion.
00:00
If you get lost, if you're trying to
00:00
figure out what to do or what command to run,
00:00
just a tab a few times and it'll give you a list of
00:00
options that you can use at that point that you're at.
00:00
Now nmcli can be used to manage the network connection,
00:00
but we can also look at a specific device
00:00
or view the network device status,
00:00
for example, we could do nmcli connection show,
00:00
that'll show us all of the network connections,
00:00
we can do nmcli device show to
00:00
get statistics about that device,
00:00
and we can get the status of
00:00
the device by doing an nmcli device status,
00:00
they'll tell us if that device
00:00
is connected or disconnected.
00:00
Now the IP command,
00:00
this is really helpful when you just
00:00
need to find the IP address info.
00:00
The IP command superseded
00:00
the ifconfig command for configuring IP addressing.
00:00
For example, to list all the IP
00:00
>> addresses on the system.
00:00
>> We can just do ip addr show,
00:00
that's just short for address ip addr show.
00:00
We can also do ip addr add IP dev device name,
00:00
and we're going to assign that IP to
00:00
that specified network interface
00:00
>> that's specified device.
00:00
>> Then if we wanted to enable or disable an interface,
00:00
we can do that with the ip link set command.
00:00
We say ip link
00:00
set and we provide it with the interface name,
00:00
and we say up to enable it,
00:00
or ip link set interface down
00:00
>> to disable that interface.
00:00
>> Now the arp command or
00:00
Address Resolution Protocol command is
00:00
used on a local network to
00:00
translate an IP address to a MAC address.
00:00
This is important because if we don't
00:00
have IP to MAC mapping,
00:00
we can have a lot of issues.
00:00
We need to have that low-level mapping setup
00:00
or it causes a lot of network problems,
00:00
things like arp cache poisoning, all that stuff.
00:00
Now the arp command is what we
00:00
use to view the arp table,
00:00
but this command is now more or less deprecated.
00:00
What is recommended now is using
00:00
another function of the ip command,
00:00
which is the ip neigh command.
00:00
Now, ip neigh is short for neighbor,
00:00
and that replace the arp command.
00:00
Just like we saw with arp ip neigh
00:00
will display the arp table
00:00
and the network discovery or
00:00
neighborhood discovery NDISC table.
00:00
NDISC is what is used for IPv6 addresses,
00:00
whereas the arp table response is
00:00
used for IPv4 addresses.
00:00
In this lesson, we covered
00:00
common network interface locations as well as the ip,
00:00
arp, and nmcli commands.
00:00
Thank you so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next