Operating System - HP-UX
1836452 Members
2937 Online
110101 Solutions
New Discussion

configure IPs on a hp vm guest 11.31

 
silusan
Regular Advisor

configure IPs on a hp vm guest 11.31

 

vm host and vm guest hav 11.31 OS, vm integrity 4.30

 

 

hpvmcreate -P VMGUEST -c 4 -r 8G -B manual -a disk:scsi::disk:/dev/disk/diskxx -a network:lan::vswitch:vs1234

 

I get the port number assigned to this guest from

 

hpvmstatus -P VMGUEST

 

Then i assign it n the vm host's virtual switch

 

 

 

hpvmnet -S vs1234 -u portid:2:vlanid:1565


then start the VMGUEST, install OS.

 

Now I want to know, how many IPs can I cofigure on this VMGUEST.
I have been given three IPs in the server recipe spreadsheet

I have two IPs in the same subnet(dataIP and heartbeatIP mask 26)
one more IP is a different subnet(virtualIP mask 29)

6 REPLIES 6
Dave Olker
Neighborhood Moderator

Re: configure IPs on a hp vm guest 11.31

I don't understand. You want three different IP's configured on a single NIC? You can do that with IP aliasing via the ifconfig command, but is that really what you want or should you create multiple virtual NICs and configure them with unique IP addresses?

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Ken Grabowski
Respected Contributor

Re: configure IPs on a hp vm guest 11.31

I believe the upper limit of the IP's you can plum to a single interface is 256. But they all have to be in the same subnet.

silusan
Regular Advisor

Re: configure IPs on a hp vm guest 11.31

Dave / Ken

 

from OS build point of view, obviously I will assign one IP(dataIP) to the lan0(suppose)

 

data IP - used to connect to guest from putty(publicIP you can say) -

virtual IP

heartbeat IP

 

data and virtual IP are on the same subnet. heartbeat IP is on a different subnet

 

vmhost1 - guest-aa

vmhost2 - guest-bb

 

i think the application is installed on guest-aa and guest-bb and a heartbeat IP configured on these two guests.

 

I am assuming that I need to alias an IP to lan0 as virtual IP....

 

 

Dave Olker
Neighborhood Moderator

Re: configure IPs on a hp vm guest 11.31

Are you using a clustering technology, like Serviceguard? Is that where the virtual IP and heartbeat requirements come from?


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
silusan
Regular Advisor

Re: configure IPs on a hp vm guest 11.31

Dave

No cluster in our environment.

 

Well, I learnt a while ago, that it is the hearbeat IP I will be configuring along with the data IP..on this VMGUEST.

 

dataIP and heartbeatIP are on different subnets.

 

the third IP- the virtual IP(thats the naming convention we use in our recipes) will be configured by app team.

 

Now I am not sure how do I configure two IPs, with different subnet masks on this guest.

These two IPs dataIP and heartbeat IP - both have different VLANs.

 

in hpvmstatus -P VMGUEST, it is clear that the vm host assigns just one portid to the VMGUEST.

 

1. Do I need to try to get two port IDs for this guest? if yes, how?

 

2. Do i need to assign two IPs on single port? how?

 

3. Do i need ot create a separate vswitch on this vm host and do

hpvmcreate -P VMGUEST -a disk:scsi::disk:disk1

-a network:lan::vswitch:vs1234

-a network:lan::vswitch:vs5678?

Ken Grabowski
Respected Contributor

Re: configure IPs on a hp vm guest 11.31

Not sure what the heart beat is for if your not using something like Serviceguard. 

 

You can use ifconfig to plum these addresses while the system is up, but when you reboot it will be lost.  I recommend you configure your network files with the information since your application is stationary. Then reboot to verify it all comes up operational.

 

The Application IP (virtual IP) can be easily setup in your /etc/rc.config.d/netconf file. Your host IP will have an entry like:

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="10.1.1.16"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]="10.1.1.255"
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]="0"
INTERFACE_MODULES[0]=""

So copy that and index the 0 to a 1, as in:

INTERFACE_NAME[1]="lan0:1"
IP_ADDRESS[1]="10.1.1.17"
SUBNET_MASK[1]="255.255.255.0"
BROADCAST_ADDRESS[1]="10.1.1.255"
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]="0"
INTERFACE_MODULES[1]=""

 

That's all you need for that address.  For the heartbeat, you add a third entry:

 

INTERFACE_NAME[2]="lan1"
IP_ADDRESS[2]="10.1.2.10"
SUBNET_MASK[2]="255.255.255.0"
BROADCAST_ADDRESS[2]="10.1.2.255"
INTERFACE_STATE[2]=""
DHCP_ENABLE[2]="0"
INTERFACE_MODULES[2]=""

 

and at the bottom:

ROUTE_DESTINATION[2]="10.1.2.0"
ROUTE_MASK[2]=""
ROUTE_GATEWAY[2]="10.1.2.1"
ROUTE_COUNT[2]="1"
ROUTE_ARGS[2]=""

 

This is assuming that your router is at 10.1.2.1 and that second NIC is lan1.  Make adjustments to your IP, router, and NIC name accordingly.

 

My understanding is you need to create a second vswitch LAN for the other subnet, but somebody may have a better answer than me on that one.