Networking

Learning outcomes:

  • Describe different distribution's types of network configs
  • Able to monitor network setting, ip, dns, emergency settings (in case of a hack/disaster)
  • Able to troubleshoot some basic networking issues on a Linux server

Would you like to download my PowerPoint to follow along?

  • Networking and Distributions
    • There is a huge amount of variability by distro
    • Some rewrite the config by script every boot
    • Some have a specialized app
    • In general it's better to use what's built in where possible.
  • Where to start
    • Setting IP addresses
      • Static vs dynamic
      • Example: as admin, should you have a static IP address in case you need to seriously lock down the server during a hack?
    • Setting DNS
    • Naming interfaces
    • IPv4 vs IPv6
    • There are lots of great references online for refreshers, for example This One that go into great depth on linux network administration
  • Examples
    • Red Hat
      • Differences in version (Red Hat 7 vs Read Hat 9) means you need to check your version
      • Default service in Red Hat 9 is NetworkManager
      • Red Hat 9 networking info lives in /etc/NetworkManager/system-connections/
      • Multiple tools are built in such as systemctl and nmcli
      • *Caution* Modification of most of the built in tools will mean Red Hat no longer with warranty or support your system
      • Documentation for Red Hat 9
    • Debian
      • /etc/network/interfaces is the config file
      • /etc/resolve.conf is for the nameservers
      • Resolveconf is a program (Different then resolve.conf) that works on the resolve.conf file
      • Resolveconf is optional
      • There is a GUI, but automatic network config tools are NOT for servers, desktop users only
      • Documentation for Debian
  • Legacy Issues
    • Ifconfig
      • Technically legacy
      • Used to configure, display and control network interfaces
      • Still used A LOT especially by people who have been doing Linux for a while (change is unwelcome by some in the community)
    • Ip
  • Important Commands to know
  • Troubleshooting
    • One way to start troubleshooting is by model layer
      • Network access or Physical layer: Is the cable unplugged? Is the interface up?
      • Data link Layer: did the ARP entry come up correctly?
      • Networking/Internet layer: Do you have a unique IP address? Is your DNS correct?
      • Transport layer: Is the correct port open?
      • Application layer: Is the program I'm trying to use installed? Updated? Is the Daemon running?
    • A second way to start troubleshooting is to ask questions of yourself and the server
      • Why am I unable to ping a known address?
      • What's my error message?
      • What's the most common issues and have I checked them?
      • What changed from the last time I used this machine?

Suggested Activities and Discussion Topics:

  • On each of your servers install the networking Tools, the package is called net-tools. Try one of the commands to make sure the install went well.
  • Read through This article and try out several of the commands on each server, making note of what you're seeing and if you have to make any changes to get each command to work
  • Start up one of your servers, and find where your server keeps the networking info. Pull up the documentation, look at the config file/script/tool, explore around the file system. Make notes with answers to the following questions:
    • What do you see?
    • Where is your networking info located?
    • Does it use a script?
    • Conf file?
    • Tool?
    • Special commands?
  • Complete the lab that is found on This PDF Make sure you are paying careful attention to the requirements.

Would you like to see some more classes? Click here