Operating System - HP-UX
1833871 Members
1656 Online
110063 Solutions
New Discussion

Loopback address with 32 bit netmask

 
Jani Kielenniva
New Member

Loopback address with 32 bit netmask

I am trying to assign a 32 bit netmask to a virtual loopback interface in HP-UX B.11.00 U 9000/800 like this:

ifconfig lo0:1 193.120.110.150 netmask 255.255.255.255 up

But it gives the following error:

ifconfig: ioctl (SIOCSIFNETMASK): bad value

ndd -get /dev/ip ip_check_subnet_addr return 0, so this shouldn't affect.

Any ideas how I could get the lo0:1 work with the 32-bit netmask?
3 REPLIES 3
Brian Hackley
Honored Contributor

Re: Loopback address with 32 bit netmask

Jani,

You don't need to set the netmask, the host route is created automatically by ifconfig.

netstat -rnv will show:
193.120.110.150/255.255.255.255
193.120.110.150 UH 0 0 lo0:1 4136

ifconfig complains because you are attempting to set what it perceives to be an illegal netmask.

Let us know if there's some reason that this is not working for you.

Regards,

-> Brian Hackley

Ask me about telecommuting!
John Dvorchak
Honored Contributor

Re: Loopback address with 32 bit netmask

Is a 32 bit netmask even valid? Doesn't that leave no room for a host address?
If it has wheels or a skirt, you can't afford it.
Joseph T. Wyckoff
Honored Contributor

Re: Loopback address with 32 bit netmask

As far as I know, the smallest useful netmask is gonna allow for 4 addresses

ff.ff.ff.fc
or
255.255.255.252

that is a

...00 broadcast (net) address
...01 useful address
...10 useful address
...11 broadcast address

Good Luck
Omniback and NT problems? double check name resolution, DNS/HOSTS...