1834532 Members
3157 Online
110069 Solutions
New Discussion

hosts file

 

hosts file

My /etc/hosts file has the following entries:

128.1.200.80 hpnclass hpnclass
#128.1.200.90 hpnclass hpnclass
#128.1.200.91 hpnclass hpnclass
#128.1.200.92 hpnclass hpnclass
#128.1.200.93 hpnclass hpnclass

The four IP addresses that are commented out are bound to a 4port NIC that is installed on my system (but is currently disabled).

I have a service running that is configured to listen on //hpnclass:4048. This works fine when just the single IP address is running. As soon as I activate the 4 ports on the NIC and uncomment the IP addresses, I am unable to reach this service.

The additional NIC cards are for a network load balancing device. The single IP (128.1.200.80) will be disabled and commented out of /etc/hosts when this goes active.

If I were to change the hostname of the additional IPs (90 - 93), but keep the aliases the same, what would be the effect of doing this?
8 REPLIES 8
Jeff Schussele
Honored Contributor

Re: hosts file

Hi Thomas,

The basic problem that I see is that you have *multiple* IPs in the *same* subnet in that system. This is a totally unsupported configuration due to the fact that you cannot guarantee just *which* IP the traffic will come in on. You can force it out a certain IP - BUT if that's not what the router sent it to it's liable to be rejected.
Remember IPs are only for us mortals. The network does everything be MAC addresses and there are rules that routers will enforce. Like the traffic better come back to it from the MAC to which it sent it - lest it think it's getting "spoofed" traffic.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
G. Vrijhoeven
Honored Contributor

Re: hosts file

Hi Thomas,

Ip-adresses should be unique. What you do is specify the same hostname to multiple ipadresses all in the same subnet i assume.
I do not think i would get this working correct.
I would advice you to take a look at APA software. This way you can specify the same ipadress on multiple interfaces (channels). This product is not for free. More info can be found at:

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=J4240AA

HTH,

Gideon

Re: hosts file

The additional IP addresses are connected to a network load balancing device made by F5 Networks ( http://www.f5.com/f5products/products/bigip/ltm/BIGIP1000/ )

What I do is set up a virtual server on the F5 box that every one would send their request to. Based on the type of service being requested, the F5 would then send it to the server on one of those interfaces.

If I do a ping of the virtual server and the network address associated with the F5 box,I can check my arp cache and see that the MAC address is exactly the same.
rick jones
Honored Contributor

Re: hosts file

IIRC, gethostbyname() calls only return the first entry from /etc/hosts, so if you enable the other IPs, what does your service do to bind to those IPs? Or is it simply binding the wildcard IP and the 4048 port number?

Indeed, having multiple physical NICs in the same subnet is not straightforward under HP-UX. All NICs will be used for inbound, but only one NIC will be used for outbound. If the NICs do not have equal connectivity, this will manifest as an inability to reach the system. You can establish specific host and subnet routes to route traffic out specific NICs, or you can set ip_strong_es_model, which will generally force replies out the interface on which the request arrived - it though also means that only on the NIC with the corresponding IP will traffic to that IP be accepted.

Why do you want the additional IPs and ports? do you really want additional IPs, or is that just an artifact of enabling additional ports? To put the four-port card in action with the one IP, you might consider using Auto Port Aggregation - you would bind the four ports together into an "aggregate" which would then look to the transport like a _single_ physical NIC. You could then put your IP address(es) on that aggregate. (You would still want the IP subnet for the .80 NIC to be different from the .9X four-port. Docs for APA are on docs.hp.com.

And, I've always thought that hostnames were for humans, and IPs were for routers and MAC's were for switches and NICs :)
there is no rest for the wicked yet the virtuous have no pillows
Nguyen Anh Tien
Honored Contributor

Re: hosts file

Hi Thomas.
In order to make 4 cards load balancing, I recomend you use HP Auto Port Aggregation.
read "J4240-90018" docs for installation.
Best regard
tienna
HP is simple

Re: hosts file

I did get the application working (I was trying to connect to a BEA Tuxedo Admin console) by starting two server processes and having them listen to two separate IP address/ports.

Re: hosts file

Just to check on something, I know that APA is available for HPUX 11i, but will it run on HPUX 11?
Ranjith_5
Honored Contributor

Re: hosts file

Hi thomas,

Yes it runs on HP-UX 11 also.

See APA Support guide for v11 below
http://docs.hp.com/en/J4240-90027/ch01.html

regards,
Syam