Showing posts with label One NIC Mutliple IP. Show all posts
Showing posts with label One NIC Mutliple IP. Show all posts

How to Multiple IP on ONE NIC on RHEL 6.3 ,CentOS 6.3 or Scientific Linux 6.3

[root@server1 ~]# cd /etc/sysconfig/network-scripts/
[root@server1 network-scripts]# ls
[root@server1 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:e0:4c:04:7d:2b
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="587b9935-5b28-45e3-8d45-ae3e179f9ad0"
IPADDR=192.168.0.254
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254
IPV6INIT=no
USERCTL=no

[Note:Before editing network configuration file, take backup of it.]

eth0:1 is an alias of the eth0 interface. Now, let’s assign a different IP address to eth0:1. Other NIC aliases could be named eth0:2, eth0:3 etc.

[root@server1 network-scripts]# cp ifcfg-eth0 ifcfg-eth0:1
[root@server1 network-scripts]# vim ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=static
HWADDR=00:e0:4c:04:7d:2b
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="587b9935-5b28-45e3-8d45-ae3e179f9ad0"
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254
IPV6INIT=no
USERCTL=no
Read More

How to Multiple IP on ONE NIC on RHEL 6.3 ,CentOS 6.3 or Scientific Linux 6.3

[root@server1 ~]# cd /etc/sysconfig/network-scripts/
[root@server1 network-scripts]# ls
[root@server1 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:e0:4c:04:7d:2b
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="587b9935-5b28-45e3-8d45-ae3e179f9ad0"
IPADDR=192.168.0.254
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254
IPV6INIT=no
USERCTL=no

[Note:Before editing network configuration file, take backup of it.]

eth0:1 is an alias of the eth0 interface. Now, let’s assign a different IP address to eth0:1. Other NIC aliases could be named eth0:2, eth0:3 etc.

[root@server1 network-scripts]# cp ifcfg-eth0 ifcfg-eth0:1
[root@server1 network-scripts]# vim ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=static
HWADDR=00:e0:4c:04:7d:2b
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="587b9935-5b28-45e3-8d45-ae3e179f9ad0"
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254
IPV6INIT=no
USERCTL=no
Read More