In this hands-on lab, we will be working with networking using YaST and Wicked. This is something every admin should know, and the steps in this lab are especially important to know in a DevOps scenario.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Use Wicked to Get the IP Address of eth0 and Then Use YaST to Configure the Hostname handsonlab.net to Resolve to the eth0 IP Address
Run the command:
sudo wicked show all
Take note of the eth0 IP address.
Then use YaST to set the hostname:
sudo yast
In the ncurses interface, go to Network Services > Hostnames > Add.
Enter the IP address of the eth0 adapter.
Enter the hostname handsonlabs.net.
Save and exit out of YaST.
- Verify that DNS Resolution Is Set Correctly in `nsswitch.conf` and That Changes Are Present in `/etc/hosts`, and Verify with Curl
Read the file, and look for the hostname:
cat /etc/hosts
Check
nsswitch.conf
and make sure thedns
line is set tofiles
first:cat /etc/nsswitch.conf hosts: files dns
Curl the index:
curl handsonlabs.net
You should get an index page returned.