Aarvi

How to add multiple ips in centos 7

In centos 7 by default ifconfig command will not work.
You need to install it using this command yum install net-tools
1.  Create a file in /opt/1.sh
2.  create ip list in an excel sheet,
Example:
ip addr add198.xxx.xx.xxdev enp6s0f0 label enp6s0f0:1
ip addr add198.xxx.xx.xxdev enp6s0f0 label enp6s0f0:2
ip addr add198.xxx.xx.xxdev enp6s0f0 labelenp6s0f0:3
ip addr add198.xxx.xx.xxdev enp6s0f0 labelenp6s0f0:4
3. Add ips in /opt/1.sh file
4. Execute sh 1.sh for the ips to display in ifconfig
5. For the ips to reflect in ifconfig even after server is rebooted add this command sh /opt/1.sh in /etc/rc.d/init.d/network file and it should be added above exit $rc

Aarvi server solutions Is a Web Hosting Support Company that has built a solid reputation for quality, reliability, and true professional service