- #HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 HOW TO#
- #HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 INSTALL#
- #HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 UPDATE#
- #HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 PC#
For this example we are configuring DHCP for 192.168.1.0/24 LAN network.
#HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 UPDATE#
Option domain-name-servers, įirst, edit DHCP configuration file and update subnet details as per your network. # cp /usr/share/doc/dhcp-4.1.1/ /etc/dhcp/nfįirst configure the basic options which is common to all supported networks. Sample configuration file may be changed as perversion you have installed on your system. So as a first part, copy the content of sample configuration file to the main configuration file. Also it provides a sample configuration file at /usr/share/doc/dhcp*/, which is very useful for configuring the DHCP server. DHCPDARGS=eth1ĭHCP creates an empty configuration file /etc/dhcp/nf.
#HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 PC#
In this example, the PC has 1 network interface card (NIC) and it’s currently inactive. On Network Configuration and Devices tab, you’ll see available network card on the PC. Configure on GUI (Permanently) Select Application -> System Settings ->Network. Edit this configuration file and update the ethernet name. Step-by-step to change IP Address on Linux RedHat.
#HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 INSTALL#
yum install dhcpįirstly we need to set ethernet interface name as DHCPDARGS in /etc/sysconfig/dhcpd file. DHCP rpms are available under base repositories, so we don’t need to add an extra repository. Read more about dhcp here.įirst install DHCP packages using yum package manager on CentOS, Red Hat systems. This article will help you for Configuring DHCP Server on CentOS, Red Hat System. It is useful for LAN network, but not generally used for production servers. $ ip a add 10.50.100.DHCP ( Dynamic Host Configuration Protocol) is a network protocol used for assigning IP address to network clients dynamically from a predefined IP pool. It only lasts until you reboot your server or restart the network service, after that – the IP is gone from the interface. Want to add an IP address just for a little while? You can add one using the ip command. $ ifup ens160:0ĭon’t use this if Network Manager is in control. $ cat ifcfg-ens160:0īring up your alias interace and you’re good to go. If Network Manager isn’t used, you can use the old style aliases you’re used to from CentOS 5/6. $ grep 'NM_CONTROLLED' /etc/sysconfig/network-scripts/ifcfg-ens160 Only use this if your interface is not controlled by Network Manager. If you want, you can modify the text file, but I find using nmtui to be much easier. $ cat /etc/sysconfig/network-scripts/ifcfg-ens192 If you check the text-configs that have been created in /etc/sysconfig/network-scripts/, you can see how nmtui has added the alias. Save the configs and the extra IP will be added. Once nmtui is open, go to the Edit a network connection and select the interface you want to add an alias on.Ĭlick Edit and tab your way through to Add to add extra IP addresses. The simplest/cleanest way to add a new IP address to an existing interface in CentOS 7 is to use the nmtui tool ( Text User Interface for controlling NetworkManager). That’s the Network Manager misinterpreting your configuration files, overwriting the values from your main interface with the one from your alias. Here’s what a config would look like in CentOS 6: $ cat ifcfg-ens160:0Īfter a network reload, the primary IP address will be removed from the server and only the IP address from the alias interface will be present. You may be used to adding a new network-scripts file in /etc/sysconfig/network-scripts/, but you’ll find that doesn’t work in RHEL / CentOS 7 as you’d expect if the Network Manager is being used. If that’s a yes, you can proceed with the next configurations using the Network Manager tool. Using Network ManagerĬheck if your interface you want to add an alias to, uses the Network Manager. This syntax is more inline with most routers/switches, where you can grep for inet and inet6 for your IPv4 and IPv6 IP addresses. To see all IP addresses, use the ip tool. It would show you all interfaces and their IP aliases on the server. The “old” days of Linux used to be all about ifconfig. If it’s not under Network Manager control, you can happily modify your configs by hand. If that’s the case, you’ll want to keep using the Network Manager to manage your interfaces and aliases. There are a few different methods than on CentOS 6, so there may be some confusion if you’re trying this on a CentOS 7 system for the first time.įirst, determine if your network interfaces are under the control of the Network Manager.
#HOW TO CONFIGURE IP ADDRESS IN REDHAT LINUX 6 HOW TO#
This guide will show you how to add an extra IP address to an existing interface in Red Hat Enterprise Linux / CentOS 7.