Network Integration  «Prev  Next»
Lesson 1

Linux Network Integration

Your network connection opens a window to the Internet's vast resources and opportunities. Red Hat Linux, with its GUI and command line tools, makes it easy to connect your network to the Internet. This module discusses how to connect your machine to other networks, including the Internet. You also learn to identify your network parameters and use the Red Hat supplied tools to configure your Linux machine's network connection.
  • Learning Objectives
    After completing this module, you will be able to:
    1. Identify your required network parameters
    2. Use netcfg to configure a network interface
    3. Enable and disable a network interface
    4. Use the Host Table to look up network IP addresses and hostnames
    5. Configure your network interface to use DNS
    In the next lesson, you will learn how to obtain information about your network.


Required Network Parameters for a Client Machine

For a client machine running Red Hat Linux to successfully connect to the Internet, a specific set of network parameters must be accurately configured. These parameters define how the machine will interface with both the local network and the larger Internet. Failure to properly configure even a single parameter can result in disrupted or non-operational network connectivity. Below are the essential network parameters and their corresponding configuration methodologies:
Required Network Parameters
  1. IP Address: A unique identifier for the machine within the network. This can be dynamically assigned via DHCP or statically configured.
  2. Subnet Mask: Utilized for IP routing and often accompanies the IP address. Defines the local network's range.
  3. Default Gateway: The IP address of the network router that connects the local network to external networks including the Internet.
  4. DNS Servers: Required for domain name resolution. Without DNS, the system cannot translate human-readable domain names into IP addresses.
  5. Hostname: Optional but recommended, especially for identifying the machine in a networked environment.
  6. Network Interface: The hardware interface responsible for connecting to the network, commonly identified as `eth0`, `ens33`, etc.
Configuration Steps
  1. Step 1: Identify Network Interface
    First, identify the network interface you intend to configure. Use the `ip addr` command to list all available network interfaces.
    ip addr
    
  2. Step 2: Edit Network Configuration File
    Navigate to the network scripts directory.
    cd /etc/sysconfig/network-scripts/
    

    Locate the appropriate configuration file for your interface, typically named `ifcfg-<interface_name>`. Edit this file using a text editor like `vi`:
    sudo vi ifcfg-<interface_name>
    
  3. Step 3: Configure Parameters
    Enter or modify the following parameters as required:
    1. `BOOTPROTO`: Specifies whether to use DHCP (`dhcp`) or static (`static`) addressing.
      For static addressing, include:
      1. `IPADDR= <Your_IP>`
      2. `NETMASK=<Your_Subnet_Mask>`
      3. `GATEWAY=<Your_Default_Gateway>`
    2. `DNS1` and `DNS2`: The IP addresses of primary and secondary DNS servers, respectively.
    3. `ONBOOT`: Set to `yes` to enable the interface at boot.

    Example of a static configuration:
    BOOTPROTO=static
    IPADDR=192.168.1.10
    NETMASK=255.255.255.0
    GATEWAY=192.168.1.1
    DNS1=8.8.8.8
    DNS2=8.8.4.4
    ONBOOT=yes
    
  4. Step 4: Apply Changes
    After editing the network configuration file, restart the Network Manager service to apply changes:
    sudo systemctl restart NetworkManager
    
  5. Step 5: Verify Configuration Use `ping` to verify that the machine can reach external networks:
    ping 8.8.8.8
    

    You can also verify DNS resolution:
    ping www.google.com
    
Additional Considerations
  1. Firewall: Ensure that firewall rules do not block outgoing or incoming traffic necessary for Internet connectivity.
  2. Routing Table: Use `route -n` to inspect the routing table and ensure that it is properly configured.
  3. Name Resolution: Test name resolution with utilities like `nslookup` and `dig` to ensure that DNS is configured correctly.
By meticulously configuring these network parameters and performing validation checks, you can guarantee that a client machine running Red Hat Linux will attain proper Internet connectivity. Misconfigurations in any of these elements can result in degraded functionality, making rigorous attention to detail imperative.


Many organizations would like to start integrating Linux into their organizations but do not know how to begin. For the most part, the users are quite happy with the tools they have with Microsoft. The organization does not want to make changes but they would like to find ways to reduce their overall computing costs. Few organizations ever conduct a total cost of ownership analysis prior to setting up their office computers. If the solution works and the organization is satisfied with the cost performance they are getting from their licensed software, there is absolutely no reason to change. This module is designed for organizations
  1. looking to reduce their license costs or
  2. organizations that simply want to explore other options
so that they have more leverage in selecting solutions for their organization. Even the most Microsoft centric organization owes it to themselves to experiment with alternatives. It might always help during negotiations with Microsoft that your organization is at least experimenting with alternatives.

SEMrush Software 1 SEMrush Banner 1