Operating System - HP-UX
1829456 Members
1158 Online
109992 Solutions
New Discussion

Not able to broadcast using loopback address in hpux.

 
joseph kanagaraj
New Member

Not able to broadcast using loopback address in hpux.

Hi ,

In hpux , not able to broadcast using loopback address. I wrote sample UDP
client-server program, found different observation on Linux and hp-ux.
In Case of Linux
------------------------
Two server are listening on 127.255.255.255:2206(port) with SO_REUSEADDR
flag set and client application broadcasting the message on
127.255.255.255:2206. Both server application are able to get the client
message.

In case of hp-ux
-------------------------
Two server are listening on 127.255.255.255:2206(port) with SO_REUSEPORT
flag set and client application broadcasting the message on
127.255.255.255:2206. Only one server application is able to get the client
message. Also we observed that sometimes binding with 127.255.255.255:2206
fails with EADDRNOTAVAIL.

Why this different behavior in hpux ? Any limitation on loopback address on
hpux ? Any loopback broadcast address is there in hpux? Any suggestion /
inputs would be appreciated !

Thanks & Regards,
Joseph.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Not able to broadcast using loopback address in hpux.

Shalom Joseph,

Using broadcast wastes band width and is blocked by any network admins, check this and see if the HP box is sitting in a switch configured to block it.

See that network configuration is consistent in /etc/rc.config.d/netconf

Check the ndd setting on the system (see the man page on ndd) and /etc/rc.config.d/nddconf for anything that is out of the ordinary.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Not able to broadcast using loopback address in hpux.

Hello Joseph,

I can't comment on the behavior of HP-UX vs. Linux in this case. However let me suggest a workaround (not tested): you may try using a multicast address bound to the loopback interface.

Indeed, ifconfig shows that the lo0 interface has the MULTICAST flag so this should work. You would use a multicast address like 239.255.0.1 (in the IPv4 local scope range). And you would configure your socket so that it gets bound to the lo0 interface thanks to the IP_MULTICAST_IF socket option. See http://docs.hp.com/en/B2355-90136/ch05s05.html for details.

HTH.
joseph kanagaraj
New Member

Re: Not able to broadcast using loopback address in hpux.

Thanks lot jerome for the information about multicast . I will try with multicast instead of broadcast .

Thanks & Regards,
Joseph.