RHCSA RHEL 8 - Configure IPv4 and IPv6 addresses

preview_player
Показать описание
Your support on Ko-Fi is much appreciated:

Join our new discord channel:

Buy CSG Merchandise:

This video is based on RHEL 8.

Video to cover the section 'Configure IPv4 and IPv6 addresses' for the RHCSA (Red Hat Certified System Administrator).

Notes from the video:

This section is on IP addressing. An Internet Protocol (IP) address is an individual address for a host on a network. When using the internet your IP address is assigned to you by your Internet Service Provider (ISP).

When using the device within your home network you will be assigned a local IP address by your router and then the router uses Network Address Translation (NAT) to translate your local address to your ISP provided address for use on the internet.

There are two types of IP address in use these days IPv4 and IPv6. IPv4 is still the most widely used, but is slated to be fully replaced by IPv6, just it is a massive task.

IPv4
This IP addressing scheme is a 32 bit address (being 32 1s or 0s) using decimal numbers, split into 4 octets.
Within these classes there are ranges assigned for private use of which we have included below. The subnet mask defines how large the network is, for example the network is 10.0.0.0 and the subnet mask is 255.0.0.0, the maximum value of an IP address is 255 so for the 10. octet it is masking, all of the other octets are able to go to their maximum values. So the IP address range is: 10.0.0.0 – 10.255.255.255, we can use any address in between e.g. 10.1.4.200. The CIDR is a way of expressing the subnet mask in short form, for example we can express the below class C network as 192.168.0.0/16.

The good thing is once you have the hang of Subnet Masks and CIDR it is again used in IPv6 so it’s not something you will have to learn again. All networks will have a gateway address (this is a router or switch that can redirect traffic intended for other networks) and a broadcast address (this is the address we use to send messages to multiple hosts on the same network for special types of requests).

Configuring a IPv4 Address
All of the configuration is completed via the nmcli application.

To show the connection information:

# nmcli connection show

To get the current status:

# nmcli device status

To get the current configuration:

# nmcli device show

To delete a device (don’t do to your active network interface!):

# nmcli connection delete enp0s3

To add a new connection for a new device (enp0s8):

# nmcli connection add con-name eth0 ifname enp0s8 type ethernet ip4 10.0.2.16/24 gw4 10.0.2.2

To check the configuration:

# nmcli connection show

# ip addr

# nmcli device show enp0s8

To bring an interface up:

# nmcli connection up eth0

To bring an interface down:

# nmcli connection down eth0

To manually configure an IP address:

IPv6
The addressing used in IPv6 is 128 bit and uses hexadecimal numbers, therefore has a much larger address space. This was due to IPv4 being too small for modern needs and now pretty much all of the IPs have been used.
IPv6 addresses are classless and therefore we have no class designation, however some prefixes (same as CIDR) are reserved for specific uses. Here are some common ones.
IPv6 uses the same gateway, but doesn’t have any broadcast address, it’s as the protocol is more modern and no longer needs this functionaility.

Configuring an IPv6 Address
Using the same method as above to manage the connection, the only difference is when you come to configure the actual IP addressing.

To add a new connection for a new device (enp0s8):

# nmcli connection add con-name eth0 ifname enp0s8 type ethernet ip6 2006:ac81::1105/64 gw6 2006:ac81::1101

To manually configure an IP address:

#rhcsa #rhel #linux #redhat
Рекомендации по теме
Комментарии
Автор

Thank you friend for the good video again.

ivandavidov
Автор

Do you know on the exam if they want you to modify an existing interface or add your own because they never actually specify which interface to configure and just ask that you set up your machine with said ip address dns gateway and netmask, I am somewhat confised any feedback or guidance would be very much appreciated, Thank you.

mitch
Автор

Hey Colin, thanks again for the material!

I'm guessing that in the exam they will give you a task and you need to execute that task, independent of the "how" right? I'm wondering if there's any difference between using nmtui vs nmcli.

victor_mendonca
Автор

Thank you for this video. I got quick question - why there are two IPv6 addresses after you configure a brand new connection? It can be seen at 19:58 in your video where you highlight your manually added IPv6 address and below it there is another one. I tried to remove it via nmcli connection delete fe80:.... but it stays there. Thanks in advance!

yolo-cars
Автор

The network addresses 10.0.2.5/24 or 10.0.2.16/24 do not make sense: /24 means that everything in the last octet (.5 or .16) belongs to the host part. Thus the "effective" network is 10.0.2.0/24 in both cases.

Автор

Awesome vids, do you recommend any dumps/dummy exams that a person can take to get an idea of what the RHCSA exam will be like?

justinharvey
Автор

If I get an error about a virb0 interface entering a disabled state when I start my computer, what does that mean? Is it something that is safe to disable in an exam environment?

mornepretorius
Автор

if i add another device it doesnt work

igorzamorski
Автор

Why you create nmcli method.
In rhcsa the method does not matter.
you can show only the file configuration method of IP configuration ( enp0s3) because it is very easy method but you aways chose the hard method of topics.


Your videos is full of information but not easy to understand for fresher's.

himanshugupta
Автор

If someone is preparing for rhcsa and by mistake they see your video then definately they will drop the idea of rhcsa after check your video.

Because you make hard to understand content,
If you are tutor then this is your responsblity that make a easy explanation of hard topics.
But you did make hard explanantion of easy topics.

himanshugupta