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:
    The ifconfig command is used to configure, view, and manage network interfaces in Linux.

  • Checking Network Connectivity with the ping Command:
    The ping command helps test network connectivity to a host by sending ICMP echo requests.


Steps I Followed

Viewing and Managing Network Interfaces | ifconfig Command

  1. Display All Network Interfaces:
    Used the command to view active and inactive network interfaces:

     bashCopy codeifconfig
    
  2. Enable a Network Interface:
    Brought up a specific interface (e.g., eth0):

     bashCopy codesudo ifconfig eth0 up
    
  3. Disable a Network Interface:
    Took down the same interface when not in use:

     bashCopy codesudo ifconfig eth0 down
    
  4. 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

  1. Ping a Host:
    Checked connectivity to a specific host (e.g., Google DNS):

     bashCopy codeping 8.8.8.8
    
  2. Specify Ping Count:
    Limited the number of ICMP requests sent:

     bashCopy codeping -c 5 8.8.8.8
    
  3. Ping with Packet Size:
    Sent ICMP packets with a custom packet size:

     bashCopy codeping -s 1000 8.8.8.8
    
  4. 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

  1. ifconfig Not Found:
    Encountered an error stating that ifconfig was not installed.

  2. Firewall Restrictions with ping:
    Pinging certain hosts returned no response due to firewall settings.


How I Solved These Problems

  1. Installing net-tools:
    Installed the net-tools package to enable the ifconfig command:

     bashCopy codesudo apt-get install net-tools
    
  2. 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!