The `ip` and `ifconfig` commands are an invaluable part of any administrator’s tool kit. In this lab, you will be tasked with configuring two separate network interfaces. This will include deleting and adding IP addresses, updating the ARP cache, changing the state of network interfaces, and recording statistics for these interfaces.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Configure the ens5 Interface Using the ip Command
Note: All tasks should be performed as the root user.
sudo -i
- Remove the old ARP entry for the 192.168.1.11 address and the associated interface.
- Delete the IP address 192.168.1.11/24 from the
ens5
interface. - Add 10.0.2.10 as a primary IP address for
ens5
and 10.0.2.20 as a secondary IP address. Both should have a broadcast address of 10.0.2.255. - Ensure the
ens5
network interface is online. - Add a new entry to the ARP table for 10.0.2.10 with the associated MAC address.
- Configure the ens6 Interface Using the ifconfig Command
- Delete the 10.0.0.10/24 IP address from the
ens6
interface. - Add 192.168.1.20 as the primary IP address for
ens6
with a netmask of 255.255.255.0 and a broadcast address of 192.168.1.255. - Ensure the
ens6
interface is online. - Add an entry to the ARP table for 192.168.1.20.
- Delete the 10.0.0.10/24 IP address from the
- Set the ens5 Interface to Promiscuous Mode and Save Interface Statistics
- Set the
ens5
interface to promiscuous mode. - Save network interface statistics to
/root/network_stats
.
- Set the