Red Hat Enterprise Linux Diagnostics and Troubleshooting
Identify and correct the misconfigured network settings of a server.
Outcomes
You should be able to diagnose and repair network configuration issues that cause a network service to be unavailable.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
[student@workstation ~]$ lab start network-review
This command creates the necessary files to perform this lab.
Instructions
A web server on serverb publishes content at the URL: http://serverb.lab.example.com.
The original network specifications for the serverb web server are not available. The network team properly configured the DNS entry for serverb on their name servers. Diagnose and fix the network configuration on serverb to ensure that the web content is available at the given URL. Verify that the network fixes are persistent.
Important
Because this exercise introduces network problems, you might lose ssh connectivity to the virtual machine that you are fixing. Therefore, this lab instructs you to log in directly to the system console for the serverb system when creating and resolving this problem. All Red Hat Training delivery modes provide direct access to classroom virtual machine consoles.
As the
rootuser on theserverbsystem console, run thenet-trouble-issuecommand to create the problem to troubleshoot.Using the correct method for your classroom environment, access the
serverbsystem's text console. Log in on theserverbconsole as therootuser withredhatas the password.serverb login:
rootpassword:redhat...output omitted... [root@serverb ~]#As the
rootuser on theserverbsystem console, run thenet-trouble-issuecommand.[root@serverb ~]#
net-trouble-issue
In a new terminal window on the
workstationmachine, verify that you cannot access theserverb.lab.example.comURL by using thecurlcommand.[student@workstation ~]$
curl serverb.lab.example.comcurl: (7) Failed to connect to serverb.lab.example.com port 80: No route to hostAs the
studentuser on theserverasystem, discover which public IP network settings are expected for theserverbsystem.Log in to the
serverasystem as thestudentuser.[student@workstation ~]$
ssh student@servera[student@servera ~]$Discover the expected public IPv4 address of the
serverbmachine.[student@servera ~]$
host serverb.lab.example.comserverb.lab.example.com has address 172.25.250.11Identify the expected IPv4 netmask, knowing that
workstation,servera, andserverbare on the same subnet.[student@servera ~]$
ip addr show dev eth02: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:00:fa:0a brd ff:ff:ff:ff:ff:ff inet 172.25.250.10/24 brd 172.25.250.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::2c1:1c11:1485:3f4c/64 scope link noprefixroute valid_lft forever preferred_lft foreverThe netmask is /24.
Identify the gateway, knowing that
workstation,servera, andserverbmust use the same gateway.[student@servera ~]$
ip routedefault via 172.25.250.254 dev eth0 proto static metric 100 172.25.250.0/24 dev eth0 proto kernel scope link src 172.25.250.10 metric 100The default gateway is 172.25.250.254.
Determine the DNS name server that the
serverbmachine can use, knowing thatworkstation,servera, andserverbuse the same name server.[student@servera ~]$
cat /etc/resolv.conf# Generated by NetworkManager search lab.example.com example.com nameserver 172.25.250.254
Diagnose and fix the network issue on the
serverbmachine.You should already be logged in to the
serverbsystem console as therootuser. Display the current network settings to identify the number of network interfaces and their configuration.The
eth0interface has an incorrect IP address.[root@serverb ~]#
ip a1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:00:fa:0b brd ff:ff:ff:ff:ff:ff inet 172.25.251.11/24 brd 172.25.251.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::8e80:72dc:3b82:55e7/64 scope link noprefixroute valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8942 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:01:fa:0b brd ff:ff:ff:ff:ff:ffDetermine the NetworkManager connection names for the two physical network interfaces.
[root@serverb ~]#
nmcli connNAME UUID TYPE DEVICE Wired connection 1 df120ee2-aded-3ef7-9ff9-9f33c48c9043 ethernet eth0 Wired connection 2 433d347a-dceb-3549-a86e-981b863bd5d2 ethernet --Depending on your system configuration, the output might display both
eth0andeth1device names.Display the IPv4 NetworkManager settings for
Wired connection 1.The DNS server settings look correct, but the network interface is configured for the wrong subnet. It must be configured for the network information that you discovered previously.
[root@serverb ~]#
nmcli conn show 'Wired connection 1' | grep ipv4ipv4.method: manual ipv4.dns: 172.25.250.254 ipv4.dns-search: lab.example.com,example.com ipv4.dns-options: -- ipv4.dns-priority: 0 ipv4.addresses: 172.25.251.11/24 ipv4.gateway: 172.25.251.254 ipv4.routes: -- ipv4.route-metric: -1 ipv4.route-table: 0 (unspec) ipv4.routing-rules: -- ipv4.ignore-auto-routes: no ipv4.ignore-auto-dns: yes ipv4.dhcp-client-id: -- ipv4.dhcp-iaid: -- ipv4.dhcp-timeout: 0 (default) ipv4.dhcp-send-hostname: yes ipv4.dhcp-hostname: -- ipv4.dhcp-fqdn: -- ipv4.dhcp-hostname-flags: 0x0 (none) ipv4.never-default: no ipv4.may-fail: yes ipv4.dad-timeout: -1 (default) ipv4.dhcp-vendor-class-identifier: -- ipv4.dhcp-reject-servers: --Copy the interface configuration files into the
roothome directory as a backup before making changes.[root@serverb ~]#
cp /etc/sysconfig/network-scripts/ifcfg-*.[root@serverb ~]#Modify the network connection for the
eth0device.[root@serverb ~]#
nmcli conn mod 'Wired connection 1' ipv4.addresses '172.25.250.11/24' ipv4.gateway 172.25.250.254[root@serverb ~]#Verify the new settings.
[root@serverb ~]#
nmcli conn show 'Wired connection 1' | grep ipv4ipv4.method: manual ipv4.dns: 172.25.250.254 ipv4.dns-search: lab.example.com,example.com ipv4.dns-options: -- ipv4.dns-priority: 0 ipv4.addresses: 172.25.250.11/24 ipv4.gateway: 172.25.250.254 ipv4.routes: -- ipv4.route-metric: -1 ipv4.route-table: 0 (unspec) ipv4.routing-rules: -- ipv4.ignore-auto-routes: no ipv4.ignore-auto-dns: yes ipv4.dhcp-client-id: -- ipv4.dhcp-iaid: -- ipv4.dhcp-timeout: 0 (default) ipv4.dhcp-send-hostname: yes ipv4.dhcp-hostname: -- ipv4.dhcp-fqdn: -- ipv4.dhcp-hostname-flags: 0x0 (none) ipv4.never-default: no ipv4.may-fail: yes ipv4.dad-timeout: -1 (default) ipv4.dhcp-vendor-class-identifier: -- ipv4.dhcp-reject-servers: --To implement the new configuration, deactivate the 'Wired connection 1' profile, and then reactivate it. The active configuration number will change.
[root@serverb ~]#
nmcli conn down 'Wired connection 1'Connection 'Wired connection 1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/645) [root@serverb ~]#nmcli conn up 'Wired connection 1'Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/676)Verify that the network configuration settings are correct.
[root@serverb ~]#
ip addr show dev eth02: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 52:54:00:00:fa:0b brd ff:ff:ff:ff:ff:ff inet 172.25.250.11/24 brd 172.25.250.255 scope global noprefixroute eth0 valid_lft forever preferred_lft forever inet6 fe80::8e80:72dc:3b82:55e7/64 scope link noprefixroute valid_lft forever preferred_lft forever
Take any further needed steps to ensure access to the web service content, including to verify the firewall and the web server's
systemdservice.Verify that the HTTP and HTTPS services are present in the firewall services list.
[root@serverb ~]#
firewall-cmd --list-servicescockpit dhcpv6-client http https sshAs the
studentuser on theserveramachine, verify that web content is available from theserverbmachine.[student@servera ~]$
curl http://serverb.lab.example.comSERVERB is providing web content.
Return to the
workstationmachine as thestudentuser.