Linux Explorers

Exploring the wonderful world of Linux

This guide describes how to configure a network interface to use the IPV6 protocol.  In this example I have virtual machine running on CENOS7 in VMWare Workstation and connected to a router that supports IPV6.

Incase you didn’t know IPV6 is the protocol that is slated to replace IPV4 across the Internet.  The address space for IPV4 has been depleted however more and more devices need IP addresses to connect to the Internet.  The need to make the move has been slowed with the use of network address translation (NAT) however this is not a permanent solution.  IPV6 uses 128bit for addressing compared to 32bit fir IPV6 and provides a long term solution for the network address problem.

This is also an attempts to address the RHCE7 objective:

  • Configure IPv6 addresses and perform basic IPv6 troubleshooting

This guide assumes that you have a basic understanding of how IPv6 addressing works.  Its similar to IPv4 in some ways however there are enough differences that one needs to understand them ahead of taking the RHCE7 exam.

Below is the contents of the configuration file for my network interface card (NIC).  As you will see for this test I have removed all of the IPV4 configuration information to ensure that the NIC is functionling on IPv6 alone.  The file location is:

/etc/sysconfig/network-scripts/ifcfg-ens33

[test@localhost network-scripts]$ cat ifcfg-ens33
ONBOOT=YES
TYPE=ETHERNET
IPV6INIT=YES
IPV6ADDR=2602:306:cc2d:f590::A/64
IVP6_DEFAULTGW=2602:306:cc2d:f590::1
DNS1=2001:4860:4860::8888

Explanation for each line line in the file

ONBOOT=YES
Ensures the interface will activate on system boot or when the network service is reset

TYPE=ETHERNET
Defines that the interface uses Ethernet

IPV6INIT=YES
Initializes the interface for IPV6

IPV6ADDR=2602:306:cc2d:f590::A/64
This is the IPV6 address for this interface and defines that it has a 64bit prefix.

IVP6_DEFAULTGW=2602:306:cc2d:f590::1
This is the default gateway for the network.  In this case this is the IPv6 address for my wireless router which is the default gateway.

DNS1=2001:4860:4860::8888
This is the IPv6 address for my ISPs DNS server.

 

After configuring the adapter file reboot your system, or reset the network services with the following command.

systemctl restart network

or

reboot

The screen show below shows my NIC configuration and a test ping to Google’s IPV6 address.

ping6 ipv6.google.com

This confirms that the IPv6 address are valid and default gateway are valid, and that the DNS is being resolved correctly.

RHEL7_CENTOS7_IPV6_Configuration

 

As always please share your thoughts on this topic, especially if you know another way of configuring IPv6 addresses.

 

This guide will demonstrate how to create a NIC team in an attempt to address the following RHEL 7 objective:

 

  • Use network teaming or bonding to configure aggregated network links between two Red Hat Enterprise Linux systems

In this example a virtual machine was created with two NICs which are ETH0 and ETh1.  These NICs will be used to create the team and the device name for  the team will be “team0″

 

1) Create the configuration files for the NIC cards.

Navigate to “/etc/sysconfig/network-scripts” and create a file named “ifcfg-eth0″ with the contents below.  If a default file already exists delete it or rename it.

DEVICE=eth0
DEVICETYPE=TeamPort
ONBOOT=yes
BOOTPROTO=none
TEAM_MASTER=team0

 

2) Create a file named “ifcfg-eth1″ in the same directory with the below contents. If a default file already exists delete it or rename it.

DEVICE=eth1
DEVICETYPE=TeamPort
ONBOOT=yes
BOOTPROTO=none
TEAM_MASTER=team0

 

3) Create a file named “ifcfg-team0″ with the below contents.  This file contains the configuration for your NIC team virtual device

DEVICE=team0
DEVICETYPE=Team
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.1.200
GATEWAY=192.168.1.254
TEAM_CONFIG='{"runner": {"name": "roundrobin"}}'

 

4) Configure the /etc/resolv.conf with the IP of the name / DNS server.    for this example the IP for the DNS server is 192.168.1.254

nameserver 192.168.1.254

5) Restart the network service or reboot the system and you should now have a functioning NIC team.

systemctl restart network

or

reboot

Here is output of the command   “ifconfig team0″

This guide explains how to configure a basic Apache web server on Red Hat Enterprise Linux 7.  This is also on of the objectives on the RHCSA 7 exam and a fundamental skill required for the RHCE 7 exam.

1 ) The first thing that you will need to do is install the httpd service if it is not already installed.  Below are a few options for accomplishing this.

Also this guide assumes all commands are entered as the “root” user.

 yum -y groupinstall “Basic Web Server”

or

yum -y install httpd httpd-manual

 Note: The package httpd-manual has the apache documentation which may be helpful with configuration.

 

 

2) Enable the httpd service with the following command.   This will cause the service  to start when the system is booted.

systemctl enable httpd.service

3) Open the firewall to allow access to the web server.

firewall-cmd --add-service=http --permanent --zone=public

Note:  the –add-service statement is “http” and NOT “httpd”

 

 

4) Reload the configuration changes to the firewall

systemctl reload firewalld.service

 

 

5) Start the httpd service

systemctl start httpd.service

 

 

6) You can test the functionality by opening a browser for a computer on the same network and entering the IP in the address field.  You will see the apache test page if successful.

The default directory for the Apache server is “/var/www/html/”