Day 13 Learnings: Network and Connectivity in Linux
Today, I explored network and connectivity tools in Linux, focusing on basic commands to manage and verify network configurations. These tools are essential for troubleshooting and maintaining a stable network environment.
What I Learned This Week
Using the
ifconfig
Command:
Theifconfig
command is used to configure, view, and manage network interfaces in Linux.Checking Network Connectivity with the
ping
Command:
Theping
command helps test network connectivity to a host by sending ICMP echo requests.
Steps I Followed
Viewing and Managing Network Interfaces | ifconfig
Command
Display All Network Interfaces:
Used the command to view active and inactive network interfaces:bashCopy codeifconfig
Enable a Network Interface:
Brought up a specific interface (e.g., eth0):bashCopy codesudo ifconfig eth0 up
Disable a Network Interface:
Took down the same interface when not in use:bashCopy codesudo ifconfig eth0 down
Assign an IP Address:
Configured a static IP address to an interface:bashCopy codesudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
Testing Network Connectivity | ping
Command
Ping a Host:
Checked connectivity to a specific host (e.g., Google DNS):bashCopy codeping 8.8.8.8
Specify Ping Count:
Limited the number of ICMP requests sent:bashCopy codeping -c 5 8.8.8.8
Ping with Packet Size:
Sent ICMP packets with a custom packet size:bashCopy codeping -s 1000 8.8.8.8
Continuous Ping Test:
Ran a continuous ping to monitor real-time connectivity:bashCopy codeping google.com
Used
Ctrl+C
to stop the test.
Problems I Encountered
ifconfig
Not Found:
Encountered an error stating thatifconfig
was not installed.Firewall Restrictions with
ping
:
Pinging certain hosts returned no response due to firewall settings.
How I Solved These Problems
Installing
net-tools
:
Installed thenet-tools
package to enable theifconfig
command:bashCopy codesudo apt-get install net-tools
Testing with Alternate Hosts:
Identified firewall restrictions and tested connectivity with different accessible hosts.
Resources I Used
Linuxize Guide to ifconfig Command
Linuxize Guide to ping Command
Linux forums for troubleshooting installation issues and network settings.
Conclusion
Today’s learnings highlighted the importance of network tools like ifconfig
for interface management and ping
for connectivity checks. These commands are foundational for diagnosing and solving network issues effectively.
Looking forward to Day 14 to uncover more Linux capabilities!