Configuring Network Interfaces

Configure Gourmet's new office network by standing up VLANs, static routes, DNS, and verifying connectivity—all via nmcli and supporting utilities.

Overview

You are the network administrator tasked with configuring a new office for Gourmet. Your mission is to deploy a clean, segmented network that supports each department and keeps communication with HQ resilient.

The exercise covers interface configuration, VLAN isolation, routing stewardship, and DNS management. You will finish with a reproducible workflow for provisioning network services on RHEL-based systems.

Objectives

  • Configure IPv4 addresses on network interfaces using nmcli.
  • Set up VLANs to isolate department traffic.
  • Manage network connections and profiles.
  • Configure static routes for inter-office communication.
  • Set DNS servers and search domains.
  • Verify network configurations and routing.

Instructions

Execute the parts in order. Commands assume nmcli is available and that you have administrative privileges. If you encounter issues, use the solution references below for validation.

Part One: Configure Main Interface

  1. Using nmcli, set eth0 to use a manual IPv4 address 192.168.1.10/24 with gateway 192.168.1.1.
  2. Activate the connection to apply the static configuration.

Part Two: Set Up VLANs

  1. Create VLAN interfaces (dev eth0) with IDs 10, 20, and 30 named VLAN10, VLAN20, VLAN30.
  2. Assign the following IPv4 addresses:
    • VLAN10: 192.168.10.1/24 (R&D)
    • VLAN20: 192.168.20.1/24 (Marketing)
    • VLAN30: 192.168.30.1/24 (Support)
  3. Bring each VLAN connection up after configuring addresses.

Part Three: Configure Static Route

  1. Add a static route for 10.0.0.0/8 via gateway 192.168.1.254 to reach the main office network.

Part Four: Configure DNS

  1. Set DNS servers 8.8.8.8 and 8.8.4.4 on eth0 and each VLAN connection.
  2. Add gourmet.local as the DNS search domain.
  3. Bring each connection back up to apply DNS changes.

Part Five: Verify Configurations

  1. Show connection details with nmcli connection show.
  2. View IP address assignments with ip -c -br addr.
  3. Review routing tables and /etc/resolv.conf for DNS settings.

Part Six: Cleanup

  1. Delete VLAN connections once validation is complete.
  2. Return eth0 to DHCP and remove static routes.
  3. Clear DNS overrides and verify the baseline configuration.

Solutions

Use the command snippets to confirm your work or to recover if you miss a step.

Part One Solutions
sudo nmcli connection modify eth0 ipv4.addresses 192.168.1.10/24 ipv4.gateway 192.168.1.1 ipv4.method manual
sudo nmcli connection up eth0
Part Two Solutions
sudo nmcli connection add type vlan con-name VLAN10 ifname VLAN10 dev eth0 id 10
sudo nmcli connection add type vlan con-name VLAN20 ifname VLAN20 dev eth0 id 20
sudo nmcli connection add type vlan con-name VLAN30 ifname VLAN30 dev eth0 id 30
sudo nmcli connection modify VLAN10 ipv4.addresses 192.168.10.1/24 ipv4.method manual
sudo nmcli connection modify VLAN20 ipv4.addresses 192.168.20.1/24 ipv4.method manual
sudo nmcli connection modify VLAN30 ipv4.addresses 192.168.30.1/24 ipv4.method manual
sudo nmcli connection up VLAN10
sudo nmcli connection up VLAN20
sudo nmcli connection up VLAN30
Part Three Solutions
sudo nmcli connection modify eth0 +ipv4.routes "10.0.0.0/8 192.168.1.254"
sudo nmcli connection up eth0
Part Four Solutions
sudo nmcli connection modify eth0 ipv4.dns "8.8.8.8 8.8.4.4" ipv4.dns-search "gourmet.local"
sudo nmcli connection modify VLAN10 ipv4.dns "8.8.8.8 8.8.4.4" ipv4.dns-search "gourmet.local"
sudo nmcli connection modify VLAN20 ipv4.dns "8.8.8.8 8.8.4.4" ipv4.dns-search "gourmet.local"
sudo nmcli connection modify VLAN30 ipv4.dns "8.8.8.8 8.8.4.4" ipv4.dns-search "gourmet.local"
sudo nmcli connection up eth0
sudo nmcli connection up VLAN10
sudo nmcli connection up VLAN20
sudo nmcli connection up VLAN30
Part Five Solutions
sudo nmcli connection show
ip -c -br addr
cat /etc/resolv.conf
Part Six Solutions
nmcli con delete "VLAN10"
nmcli con delete "VLAN20"
nmcli con delete "VLAN30"
nmcli con mod eth0 ipv4.method auto
nmcli connection modify eth0 -ipv4.routes "10.0.0.0/8 192.168.1.254"
nmcli con mod eth0 ipv4.dns ""
nmcli con mod eth0 ipv4.dns-search ""
sudo nmcli connection show
ip -c -br addr
cat /etc/resolv.conf