Search

9.7. Setting the Hostname

download PDF
Setup prompts you to supply a host name for this computer, either as a fully-qualified domain name (FQDN) in the format hostname.domainname or as a short host name in the format hostname. Many networks have a Dynamic Host Configuration Protocol (DHCP) service that automatically supplies connected systems with a domain name. To allow the DHCP service to assign the domain name to this machine, specify the short host name only.

Note

You may give your system any name provided that the full hostname is unique. The hostname may include letters, numbers and hyphens.
Setting the hostname

Figure 9.24. Setting the hostname

If your Red Hat Enterprise Linux system is connected directly to the Internet, you must pay attention to additional considerations to avoid service interruptions or risk action by your upstream service provider. A full discussion of these issues is beyond the scope of this document.

Note

The installation program does not configure modems. Configure these devices after installation with the Network utility. The settings for your modem are specific to your particular Internet Service Provider (ISP).

9.7.1. Editing Network Connections

Important

When a Red Hat Enterprise Linux 6.9 installation boots for the first time, it activates any network interfaces that you configured during the installation process. However, the installer does not prompt you to configure network interfaces on some common installation paths, for example, when you install Red Hat Enterprise Linux from a DVD to a local hard drive.
When you install Red Hat Enterprise Linux from a local installation source to a local storage device, be sure to configure at least one network interface manually if you require network access when the system boots for the first time. You will need to select the Connect automatically option manually when editing the connection.

Note

To change your network configuration after you have completed the installation, use the Network Administration Tool.
Type the system-config-network command in a shell prompt to launch the Network Administration Tool. If you are not root, it prompts you for the root password to continue.
The Network Administration Tool is now deprecated and will be replaced by NetworkManager during the lifetime of Red Hat Enterprise Linux 6.
To configure a network connection manually, click the button Configure Network. The Network Connections dialog appears that allows you to configure wired, wireless, mobile broadband, InfiniBand, VPN, DSL, VLAN, and bonded connections for the system using the NetworkManager tool. A full description of all configurations possible with NetworkManager is beyond the scope of this guide. This section only details the most typical scenario of how to configure wired connections during installation. Configuration of other types of network is broadly similar, although the specific parameters that you must configure are necessarily different.
Network Connections

Figure 9.25. Network Connections

To add a new connection, click Add and select a connection type from the menu. To modify an existing connection, select it in the list and click Edit. In either case, a dialog box appears with a set of tabs that is appropriate to the particular connection type, as described below. To remove a connection, select it in the list and click Delete.
When you have finished editing network settings, click Apply to save the new configuration. If you reconfigured a device that was already active during installation, you must restart the device to use the new configuration — refer to Section 9.7.1.6, “Restart a network device”.

9.7.1.1. Options common to all types of connection

Certain configuration options are common to all connection types.
Specify a name for the connection in the Connection name name field.
Select Connect automatically to start the connection automatically when the system boots.
When NetworkManager runs on an installed system, the Available to all users option controls whether a network configuration is available system-wide or not. During installation, ensure that Available to all users remains selected for any network interface that you configure.

9.7.1.2. The Wired tab

Use the Wired tab to specify or change the media access control (MAC) address for the network adapter, and either set the maximum transmission unit (MTU, in bytes) that can pass through the interface.
The Wired tab

Figure 9.26. The Wired tab

9.7.1.3. The 802.1x Security tab

Use the 802.1x Security tab to configure 802.1X port-based network access control (PNAC). Select Use 802.1X security for this connection to enable access control, then specify details of your network. The configuration options include:
Authentication
Choose one of the following methods of authentication:
  • TLS for Transport Layer Security
  • Tunneled TLS for Tunneled Transport Layer Security, otherwise known as TTLS, or EAP-TTLS
  • Protected EAP (PEAP) for Protected Extensible Authentication Protocol
Identity
Provide the identity of this server.
User certificate
Browse to a personal X.509 certificate file encoded with Distinguished Encoding Rules (DER) or Privacy Enhanced Mail (PEM).
CA certificate
Browse to a X.509 certificate authority certificate file encoded with Distinguished Encoding Rules (DER) or Privacy Enhanced Mail (PEM).
Private key
Browse to a private key file encoded with Distinguished Encoding Rules (DER), Privacy Enhanced Mail (PEM), or the Personal Information Exchange Syntax Standard (PKCS#12).
Private key password
The password for the private key specified in the Private key field. Select Show password to make the password visible as you type it.
The 802.1x Security tab

Figure 9.27. The 802.1x Security tab

9.7.1.4. The IPv4 Settings tab

Use the IPv4 Settings tab tab to configure the IPv4 parameters for the previously selected network connection.
Use the Method drop-down menu to specify which settings the system should attempt to obtain from a Dynamic Host Configuration Protocol (DHCP) service running on the network. Choose from the following options:
Automatic (DHCP)
IPv4 parameters are configured by the DHCP service on the network.
Automatic (DHCP) addresses only
The IPv4 address, netmask, and gateway address are configured by the DHCP service on the network, but DNS servers and search domains must be configured manually.
Manual
IPv4 parameters are configured manually for a static configuration.
Link-Local Only
A link-local address in the 169.254/16 range is assigned to the interface.
Shared to other computers
The system is configured to provide network access to other computers. The interface is assigned an address in the 10.42.x.1/24 range, a DHCP server and DNS server are started, and the interface is connected to the default network connection on the system with network address translation (NAT).
Disabled
IPv4 is disabled for this connection.
If you selected a method that requires you to supply manual parameters, enter details of the IP address for this interface, the netmask, and the gateway in the Addresses field. Use the Add and Delete buttons to add or remove addresses. Enter a comma-separated list of DNS servers in the DNS servers field, and a comma-separated list of domains in the Search domains field for any domains that you want to include in name server lookups.
Optionally, enter a name for this network connection in the DHCP client ID field. This name must be unique on the subnet. When you assign a meaningful DHCP client ID to a connection, it is easy to identify this connection when troubleshooting network problems.
Deselect the Require IPv4 addressing for this connection to complete check box to allow the system to make this connection on an IPv6-enabled network if IPv4 configuration fails but IPv6 configuration succeeds.
The IPv4 Settings tab

Figure 9.28. The IPv4 Settings tab

9.7.1.4.1. Editing IPv4 routes
Red Hat Enterprise Linux configures a number of routes automatically based on the IP addresses of a device. To edit additional routes, click the Routes button. The Editing IPv4 routes dialog appears.
The Editing IPv4 Routes dialog

Figure 9.29. The Editing IPv4 Routes dialog

Click Add to add the IP address, netmask, gateway address, and metric for a new static route.
Select Ignore automatically obtained routes to make the interface use only the routes specified for it here.
Select Use this connection only for resources on its network to restrict connections only to the local network.

9.7.1.5. The IPv6 Settings tab

Use the IPv6 Settings tab tab to configure the IPv6 parameters for the previously selected network connection.
Use the Method drop-down menu to specify which settings the system should attempt to obtain from a Dynamic Host Configuration Protocol (DHCP) service running on the network. Choose from the following options:
Ignore
IPv6 is ignored for this connection.
Automatic
NetworkManager uses router advertisement (RA) to create an automatic, stateless configuration.
Automatic, addresses only
NetworkManager uses RA to create an automatic, stateless configuration, but DNS servers and search domains are ignored and must be configured manually.
Automatic, DHCP only
NetworkManager does not use RA, but requests information from DHCPv6 directly to create a stateful configuration.
Manual
IPv6 parameters are configured manually for a static configuration.
Link-Local Only
A link-local address with the fe80::/10 prefix is assigned to the interface.
If you selected a method that requires you to supply manual parameters, enter details of the IP address for this interface, the netmask, and the gateway in the Addresses field. Use the Add and Delete buttons to add or remove addresses. Enter a comma-separated list of DNS servers in the DNS servers field, and a comma-separated list of domains in the Search domains field for any domains that you want to include in name server lookups.
Optionally, enter a name for this network connection in the DHCP client ID field. This name must be unique on the subnet. When you assign a meaningful DHCP client ID to a connection, it is easy to identify this connection when troubleshooting network problems.
Deselect the Require IPv6 addressing for this connection to complete check box to allow the system to make this connection on an IPv4-enabled network if IPv6 configuration fails but IPv4 configuration succeeds.
The IPv6 Settings tab

Figure 9.30. The IPv6 Settings tab

9.7.1.5.1. Editing IPv6 routes
Red Hat Enterprise Linux configures a number of routes automatically based on the IP addresses of a device. To edit additional routes, click the Routes button. The Editing IPv6 routes dialog appears.
The Editing IPv6 Routes dialog

Figure 9.31. The Editing IPv6 Routes dialog

Click Add to add the IP address, netmask, gateway address, and metric for a new static route.
Select Use this connection only for resources on its network to restrict connections only to the local network.

9.7.1.6. Restart a network device

If you reconfigured a network that was already in use during installation, you must disconnect and reconnect the device in anaconda for the changes to take effect. Anaconda uses interface configuration (ifcfg) files to communicate with NetworkManager. A device becomes disconnected when its ifcfg file is removed, and becomes reconnected when its ifcfg file is restored, as long as ONBOOT=yes is set. Refer to the Red Hat Enterprise Linux 6.9 Deployment Guide available from https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/index.html for more information about interface configuration files.
  1. Press Ctrl+Alt+F2 to switch to virtual terminal tty2.
  2. Move the interface configuration file to a temporary location:
    mv /etc/sysconfig/network-scripts/ifcfg-device_name /tmp
    where device_name is the device that you just reconfigured. For example, ifcfg-eth0 is the ifcfg file for eth0.
    The device is now disconnected in anaconda.
  3. Open the interface configuration file in the vi editor:
    vi /tmp/ifcfg-device_name
  4. Verify that the interface configuration file contains the line ONBOOT=yes. If the file does not already contain the line, add it now and save the file.
  5. Exit the vi editor.
  6. Move the interface configuration file back to the /etc/sysconfig/network-scripts/ directory:
    mv /tmp/ifcfg-device_name /etc/sysconfig/network-scripts/
    The device is now reconnected in anaconda.
  7. Press Ctrl+Alt+F6 to return to anaconda.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.