HPE 9000 and HPE e3000 Servers
1753793 Members
6907 Online
108799 Solutions
New Discussion юеВ

How to configure two IP addresses for one NIC.

 
SOLVED
Go to solution
Ganesh Anekar
Advisor

How to configure two IP addresses for one NIC.

Hi all,

I am trying to configure A class HP 9000 server.This server was previously having configured for two IPs.One was external IP and other was Internal IP.

Now it is NOT showing both IPs configured.
I want to configure with two IPs for One NIC.

How should I do that?

Thanks
Ganesh
Interested to learn HP-unix,Sun and problem solving
3 REPLIES 3
Helen French
Honored Contributor
Solution

Re: How to configure two IP addresses for one NIC.

Hi Ganesh:

You need to use the index numbers to do this:

1. ifconfig lan#:0 <1st IP Address> netmask
(Specifying lan0:0 is equivalent to lan0)
2. ifconfig lan#:1 <2nd IP Address> netmask

/etc/rc.config.d/netconf should resemble the following format:

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]=10.10.10.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=10.10.20.15
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0

HTH,
Shiju
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor

Re: How to configure two IP addresses for one NIC.

Edit the /etc/rc.config.d/netconf as such ..
........
INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]=<1st-IP-address>
SUBNET_MASK[0]=
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]=<2nd-IP-address>
SUBNET_MASK[1]=
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0
.....

and just reboot or run ..

# ifconfig lan0:0 <1st-IP-address> netmask
# ifconfig lan0:1 <2nd-IP-address> netmask
Ganesh Anekar
Advisor

Re: How to configure two IP addresses for one NIC.

hi,

Thank you very much guys..

It worked!!!

I will be there with more ques for you..

bye

ganesh
Interested to learn HP-unix,Sun and problem solving