Skip to content

How To Bind Multiple IP Addresses to One Network Interface on Enterprise Linux 7

Here are the steps that you can add more IP address into the network card.

Copy the configuration file of eth0 as eth0:0
[root@test ~]# cp -p /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Modify the configuration
[root@test ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0:0

Take the network effective.
[root@test ~]# systemctl restart network
Verify the result
[root@test ~]# ip a s eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:7f:dc:81 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
       valid_lft forever preferred_lft forever
    inet brd scope global secondary eth0:0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe7f:dc81/64 scope link
       valid_lft forever preferred_lft forever


Leave a Reply

Your email address will not be published. Required fields are marked *