Configuring Network Interfaces on Linux

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Configuring network interfaces is an important skill for Linux administrators, both professionally and personally. In this hands-on lab, you’ll configure two network interfaces: the first using the older network-scripts method and the second with the more modern Network Manager method.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure the eth1 Interface Using Network Scripts on Server 1

On Server 1, configure the eth1 interface using network-scripts:

  1. In /etc/sysconfig/network-scripts, create a copy of ifcfg-eth0 called ifcfg-eth1.
  2. Update ifcfg-eth1 to have the following specifications:
    • Set the boot protocol to none.
    • Set the device to eth1.
    • Match the MAC address to the one assigned to the eth1 device.
    • Set the IP address to 10.0.2.20.
    • Set the netmask to 255.255.255.0.
    • Set the broadcast address to 10.0.2.255.
  3. Restart the network service.
  4. Ensure the interface is up and running
Configure the eth1 Interface Using nmcli on Server 2

On Server 2, configure the eth1 interface using nmcli:

  1. Ensure that network manager is started and enabled
  2. Configure the eth1 connection using nmcli with the following specifications:
    • Set the connection name to System eth1.
    • Set the interface name to eth1.
    • Set the IP address to 10.0.3.20.
    • Set the netmask to 255.255.255.0.
  3. Ensure that the eth1 interface is up and running.

Additional Resources

You work for an IT consulting company and are contracted to help support networking for a small local business. Two of the servers for this business have some additional network interfaces that need configuring.

On Server 1, we will create a copy of the file ifcfg-eth0 called ifcfg-eth1 in /etc/sysconfig/network-scripts. We will give ifcfg-eth1 the following specifications:

  • Set the boot protocol to none.
  • Set the device to eth1.
  • Match the MAC address to the one assigned to the eth1 device.
  • Set the IP address to 10.0.2.20.
  • Set the netmask to 255.255.255.0.
  • Set the broadcast address to 10.0.2.255.

Once created, restart the network service and ensure that the eth1 device is online.

On Server 2, start Network Manager, and enable and configure the eth1 interface using nmcli with the following specifications:

  • Set the connection name to System eth1.
  • Set the interface name to eth1.
  • Set the IP address to 10.0.3.20.
  • Set the netmask to 255.255.255.0. Once the connection is added, ensure that it is up and running.

Note: Due to some limitations in the environment, network.service will fail to start; however, restarting the service will still add the eth1 device after creating the ifcfg-eth1 file. Also, make sure to:

  • Perform all tasks as the root user.
  • Install all the utilities needed.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!