Configuring centos 7 static ip
![configuring centos 7 static ip configuring centos 7 static ip](http://www.techanswersweb.com/wp-content/uploads/2020/10/6.png)
![configuring centos 7 static ip configuring centos 7 static ip](https://computingforgeeks.com/wp-content/uploads/2021/10/Install-Ubuntu-22.04-–-Step-by-Step-With-Screenshots-27-265x198.png)
Vi /etc/sysconfig/network-scripts/ifcfg-p2p1 So, go ahead and open up the config file for your interface (be sure to replace p2p1 with the actual name of your interface). On CentOS 7, the interface config files are located in /etc/sysconfig/network-scripts/ and they are all prefixed with ifcfg. Now, in order to add additional IP addresses you’ll need to edit the configuration file (from hereon called “config file”) for this specific interface.
![configuring centos 7 static ip configuring centos 7 static ip](https://www.cyberciti.biz/media/new/faq/2016/08/ip-a-ouput.jpg)
Add additional IPs to your network interface The one that we will focus on for this guide is the second interface entitled p2p1 (on your system the interfaces might have a different name, such as eth0, eth1, etc). Inet6 fe80::7a45:c4ff:fe17:fa74/64 scope linkĪs you can see, I have several interfaces that are currently configured. Valid_lft 84707sec preferred_lft 84707sec The output should be similar to the following:ġ: lo: mtu 65536 qdisc noqueue state UNKNOWN If you’re not sure what netmask, gateway and broadcast addresses are, don’t worry, it’s not necessary for this guide. This command will show all of the currently configured network interfaces as well as the vital network information related to them, such as the current IP address, netmask, gateway and broadcast addresses. In order to view the IP addresses that are currently assigned to your NIC, run the following command: With CentOS 7 it’s just a matter of adding a few lines to your pre-existing configuration file. Previously, you had to create a new interface alias for each new IP address that you wanted to assign to the same NIC. In reality, even though it is different, this new method is easier. This article is specific to CentOS 7 because compared to previous releases of CentOS 7 uses NetworkManager, which handles network interfaces and IP addresses slightly differently. This how-to guide shows you the easiest way of adding those additional IP addresses to your CentOS 7 server. Fortunately this is a relatively easy process. IntroductionĪt certain times you will want or need to assign or add additional IP addresses to your server.
CONFIGURING CENTOS 7 STATIC IP FREE
On your servers you’ll more than likely be adding IP addresses that are publicly routed and available. If you wish to purchase additional IPs for your 100TB bare metal server, feel free to contact our Sales team, they’ll be happy to help you out. Note: In this article we are using private IP addresses (192.168.0.0) as an example.