Configuring Network Settings
  • 4 Minutes to read
  • Dark
    Light
  • PDF

Configuring Network Settings

  • Dark
    Light
  • PDF

Article Summary

By default, the CTERA Portal server obtains an IP address using DHCP. In a production environment it is recommended to use a static IP address. Also when your infrastructure includes more than one network, you have to configure CTERA Portal for the appropriate network. You configure network settings by using nmtui, the built-in network manager.

To use nmtui:

  1. Log in as root using SSH or through the console.
  2. Run the following command: ‘nmtui‘
    The NetworkManager TUI screen is displayed.
    image.png
  3. Use the keyboard arrows or the TAB key to navigate between options.

Changing the CTERA Portal Server's Hostname

To change the CTERA Portal server's hostname:

  1. In nmtui, navigate to Set system hostname and press Enter.
    The Set Hostname screen opens, displaying the current portal hostname.
    image.png
  2. In the field provided, enter the server hostname.
  3. Navigate to OK and press Enter.
    A confirmation message is displayed.
  4. Press Enter.
    The new hostname is configured.
  5. Navigate to Quit and press Enter to exit nmtui.
  6. You need to reboot the system for the change to take effect. You can reboot the system by entering the command: ‘reboot‘

Configuring a Network Interface

Listing Network Interfaces

To list all network interfaces:

  • Run the following command: ifconfig

Configuring a Static IP Address for a Network Interface

To configure a static IP address for a network interface:

  1. In nmtui, navigate to Edit a connection and press Enter.
    The following window opens, displaying all network adapters attached to the CTERA Portal server.
    image.png
  2. Navigate to the network adapter for which you want to set a static IP address and press Enter.
    The Edit connection window is displayed.
    image.png
  3. Navigate to Automatic next to IPv4 CONFIGURATION, press Enter, and then select Manual.
    image.png
  4. Navigate to Show next to IPv4 CONFIGURATION and press Enter.
    Additional fields are displayed.
    image.png
  5. Navigate to Add next to Addresses and press Enter.
  6. Type the static IP address.
    To specify a subnet mask, use the classless inter-domain routing (CIDR) notation. For example:
  7. To configure a default gateway for the current network interface, navigate to Gateway, and then type the IP address of the default gateway.
  8. To configure a DNS server, navigate to Add next to DNS servers, press Enter, and then enter the IP address of the DNS server.
    Note

    You can add multiple DNS servers if desired, by repeating this step.

    In the following example, the network interface named eth0 has the static IP address 192.168.98.204, the default gateway address 192.168.90.1, and the two DNS servers 192.168.88.20 and 192.168.88.21.
    image.png
  9. Navigate to OK and press Enter.
  10. Navigate to Quit and press Enter to exit nmtui.
  11. Restart the network service by typing the command: ‘service network restart‘

Your changes take effect.

Enabling DHCP for a Network Interface

If you want to use DHCP, for example, for a demo, and you are configured to use a static IP, you can change to DHCP using nmtui.

To enable DHCP for a network interface:

  1. In nmtui, navigate to Edit a connection and press Enter.
    image.png
    The following screen opens, displaying all network adapters attached to the CTERA Portal server.
    image.png
  2. Navigate to the network adapter for which you want to enable DHCP, and then press Enter.
    The Edit connection screen is displayed.
    image.png
  3. Navigate to Manual next to IPv4 CONFIGURATION, press Enter, and then select Automatic.
  4. Navigate to OK and press Enter.
  5. Navigate to Quit and press Enter to exit nmtui.
  6. Restart the network service, by entering the command: service network restart

Your changes take effect.

Deactivating a Network Interface

To deactivate a network interface:

  1. In nmtui, navigate to Activate a connection and press Enter.
    The following screen opens, displaying all network adapters attached to the CTERA Portal server.
    image.png
    The asterisk (*) to the left of a network adapter's name indicates that the network adapter is activated.
  2. Navigate to the activated network adapter you want to deactivate, a network adapter with an asterisk, and press Enter.
  3. Navigate to Quit and press Enter to exit nmtui.

The network adapter is deactivated.

Activating a Network Interface

To activate a network interface:

  1. In nmtui, navigate to Activate a connection and press Enter.
    The following screen opens, displaying all network adapters attached to the portal server:
    image.png
  2. Navigate to the deactivated network adapter you want to activate, a network adapter without an asterisk, and press Enter.
  3. Navigate to Quit and press Enter to exit nmtui.

The network adapter is activated.
The asterisk (*) to the left of a network adapter's name indicates that the network adapter is activated.

Configuring Static Routes

To configure a static route for a network interface:

  1. In nmtui, navigate to Edit a connection and press Enter.
    The following screen opens, displaying all network adapters attached to the CTERA Portal server.
    image.png
  2. Navigate to the network interface for which you want to set a static route and press Enter.
    The Edit connection screen is displayed.
    image.png
  3. Navigate to Show next to IPv4 CONFIGURATION and press Enter.
    Additional fields are displayed.
    image.png
  4. Navigate to Edit next to Routing and press Enter.
    The following screen is displayed.
    image.png
  5. Navigate to Add and press Enter.
  6. In the fields provided, type the network destination/prefix, the next hop, and the route metric.
    image.png
    Note

    To add another static route, navigate to Add and press Enter, and then specify the route details.
    To remove an existing route, navigate to Remove next to the static route you want to remove and press Enter.

  7. When done configuring static routes, navigate to OK and press Enter.
  8. Navigate to OK and press Enter.
  9. Navigate to Quit and press Enter to exit nmtui.
  10. Restart the network service, by running the following command: service network restart
    Your changes take effect.
  11. To view the list of static routes, run the following command: netstat –rn
    image.png

Was this article helpful?