Static IP vsDynamic 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
3.
● 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
CLI based toolto inspect available network interfaces
● Command: nmcli
9.
Modify a networkinterface 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
10.
Change IP assignmentmethod 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>
11.
Restart the networkinterface
● 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
12.
Network Configuration Usingnmtui
1. Text-based interface for managing and configuring network settings
Command: nmtui
13.
3. Choose theinterface to edit its configuration
4. Add the ip address while navigating to the IP Address configuration
14.
Access the networkconfiguration scripts
● Command: cd <path_to_network_scripts_directory>
Network files
15.
Review the contentsof 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
16.
Modify the DNSserver address in the system's resolver configuration file
● Command: sudo vi /etc/resolv.conf
17.
View the systemconfiguration file that specifies the order and sources for
system database lookups
● Command: sudo cat <path_to_configuration_file>
18.
Basic Commands
● ping-primaryTCP/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