Slides on how to manage networking - Part of RHCSA (RH124) syllabus
Size: 571.79 KB
Language: en
Added: Oct 10, 2024
Slides: 18 pages
Slide Content
Manage Linux Networking
Static IP vs Dynamic IP
Feature Static IP Dynamic IP
Configuratio
n
Manually set in device's network
settings or by network administrator
Automatically assigned by DHCP
(Dynamic Host Configuration Protocol)
server
Stability Remains constant, providing
consistent access to network
resources
Can change periodically or with each
network connection
Network
Monitoring
Easier to monitor and track devices
due to predictable addresses
May require more sophisticated
monitoring systems to track changing
addresses
Suitable for
Servers, networked devices
requiring constant and predictable
access.
Home network & networks with frequent
changes in devices/ configurations
●Network Interface: Hardware/software component that connects a
device to a network.
●MAC Address: Unique identifier assigned to a network interface by
its manufacturer.
●Subnet Mask: Divides an IP address into network and host parts.
●Gateway: Entry and exit point for a network, enabling
communication between devices on different networks.
●DNS (Domain Name System): Translates human-readable domain
names into IP addresses.
OS Network Components
Two ways to get ip address:
1.Command: ifconfig
2.Command: ip addr
Check system gateway information
●Command: netstat -rnv
To get the information about the domain and DNS server address
●Command: nslookup <site-name>
Verify 'NetworkManager' service status
●Command: systemctl status NetworkManager
Manage network interfaces with nmcli
CLI based tool to inspect available network interfaces
●Command: nmcli
Modify a network interface to set a static IPv4 address
●Command: nmcli connection modify <interface_name> ipv4.addresses
<static_ip_address>
Set the gateway address for a network interface
●Command: nmcli connection modify <interface_name> ipv4.gateway
<gateway_ip_address>
Ip and gateway configuration
Change IP assignment method to manual
●Command: nmcli connection modify <interface_name> ipv4.method
<method>
DNS Configuration
Set the DNS server
●Command: nmcli connection modify <interface_name> ipv4.dns
<dns_address>
Restart the network interface
●Command: nmcli connection down <interface_name> &&
nmcli connection up <interface_name>
Add secondary ipv4 address to the interface
●Command: nmcli connection modify <interface_name>
+ipv4.addresses <secondary_ipv4_address>
Note: Restart and confirm the changes
Network Configuration Using nmtui
1.Text-based interface for managing and configuring network settings
Command: nmtui
3.Choose the interface to edit its configuration
4.Add the ip address while navigating to the IP Address configuration
Access the network configuration scripts
●Command: cd <path_to_network_scripts_directory>
Network files
Review the contents of the 'hosts' file
●Command: cat <path_to_hosts_file>
Note: The file stores the system's hostname, and changes will take effect after a
reboot
Modify the DNS server address in the system's resolver configuration file
●Command: sudo vi /etc/resolv.conf
View the system configuration file that specifies the order and sources for
system database lookups
●Command: sudo cat <path_to_configuration_file>
Basic Commands
●ping - primary TCP/IP command used to troubleshoot connectivity,
reachability
●traceroute - Trace the route taken by the packets to reach the target device
●tcpdump - Captures and analyzes network traffic passing through a specific
interface
●ethtool - To get ethernet adapter details of a network interface
●dig - Get the information about domain names, commonly used for
troubleshooting DNS issues