How to add a network interface alias (for example eth0:0) on CentOS6 or RHEL6 in the "correct" way that is through NetworkManager without NM_CONTROLLED=no. And this has to be done without GUI.
Thank you,
a
centoscentos6networkmanagerredhatrhel6
How to add a network interface alias (for example eth0:0) on CentOS6 or RHEL6 in the "correct" way that is through NetworkManager without NM_CONTROLLED=no. And this has to be done without GUI.
Thank you,
a
Best Answer
run following commands as root:-
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Find entry that read as follows:
Replace with:
Find entry that read as follows:
Replace it with additional IP address you want to give the machine:
4.run:-
or
service network restart
similarly you can add additional ip addresses.
for more details refer to :- http://www.cyberciti.biz/faq/linux-creating-or-adding-new-network-alias-to-a-network-card-nic/