1837533 Members
3556 Online
110117 Solutions
New Discussion

new subnetmask failed

 
SOLVED
Go to solution
Esche Markus
Occasional Contributor

new subnetmask failed

Hi,
I am working on a HP-UX 11.00 and would like to change the subnetmask of lan0. But 255.255.255.128 didn?t work. But 255.255.255.0 or 255.255.255.192 took the system properly.

Thanks
6 REPLIES 6
Thierry Poels_1
Honored Contributor
Solution

Re: new subnetmask failed

Hi,
HPUX considers subnetmask 255.255.255.128 default as invalid but you can overrule this without problems.

You will need to edit etc/rc.config.d/nddconf file and set ip_check_subnet_addr to zero.

good luck,
Thierry.

All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Kostas Doukakis
New Member

Re: new subnetmask failed

Hi

I have tried
ifconfig lan0 ip_address netmask 255.255.255.128
and it works fine.
What is your error message?

kostas
federico_3
Honored Contributor

Re: new subnetmask failed

What we have done for the subnet mask change from 255.255.0.0 to 255.255.128.0. In addition I include some of the peculiarities of HP-UX 11.00 that regard starting certain services from inetd.

The default installation of HP-UX does not permit the subnet mask 255.255.128.0. The official HP explanation is that this subnet mask is not RFC950 and RFC1122 compliant. However, there is a mechanism (although not supported by HP) to override this constraint.

The first thing to do is to install the latest patches for LAN (this depends on the HW lan board and the associated lan driver), ARPA Transport Cummulative Patch, and all their dependencies. For this it is best to contact HP giving them the model of the machine, the version of HP-UX, and "ioscan -fnC lan". They should provide the hardware-dependent list of latest patches similar to the following:

For HP-UX 11.0
PHKL_18543 PM/VM/UFS/async/scsi/io/DMAPI/JFS/perf patch
PHKL_20016 2nd CPU not recognized in G70/H70/I70
PHNE_21835 inetd(1M) cumulative patch
PHCO_21845 cumulative SAM/ObAM patch
PHNE_22566 Cumulative STREAMS Patch
PHKL_22589 LOFS, select(), IDS/9000 and umount race fix
PHKL_22840 IDS/9000; syscalls related to file/socket
PHNE_22962 LAN product cumulative patch
PHNE_23456 cumulative ARPA Transport patch
PHCO_23651 fsck_vxfs(1M) cumulative patch
PHKL_24015 probe,sysproc,PM,VM,PA-8700 cumulative patch
PHKL_24027 VxFS 3.1 cumulative patch

For HP-UX 10.20

PHCO_10947 libHcurses cumulative patch
PHNE_20747 inetd(1M) cumulative patch
PHNE_21884 HP-PB 100BT cumulative patch
PHNE_22352 LAN products cumulative Patch
PHNE_22507 cumulative ARPA Transport patch

These patches should allow the network interface to initialize correctly at boot. The testing has shown that if the patches are not installed the initialization of network services at boot fails, but it is possible to start up the lan interfaces manually (ifconfig lan1 inet 168.202.2.48 netmask 255.255.0.0 up). In addition, the patches should ensure the correct functioning of commands ndd (for HP-UX 11.00) and nettune (for HP-UX 10.20).

The files that need to be changed in HP-UX 11.00 are /etc/rc.config.d/nddconf and /etc/rc.config.d/netconf. Here are the changes to be made...

in /etc/rc.config.d/nddconf
TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

in /etc/rc.config.d/netconf
SUBNET_MASK[0]=255.255.128.0

(Interestingly enough the parameter ip_check_subnet_addr used above is not supported by HP:
# ndd -h unsupported | grep ip_check
ip_check_subnet_addr - Controls the subnet portion of a host address
)

For HP-UX 10.20 the command ndd is not available. There, after installing the patches (ARPA transport cummulative patch is the most important one), the command to use is nettune. In order for the machine to be able to set the "non-standard" subnetting create the start-up scripts as follows:

create /sbin/init.d/nettune_script with ownership bin:bin and perms 555
insert the following in the script: /usr/contrib/bin/nettune -s ip_check_subnet_addr 0
create link in /sbin/rc2.d: ln -s /sbin/init.d/nettune_script S006subnet
change in /etc/rc.config.d/netconf: SUBNET_MASK[0]=255.255.128.0
Vincenzo Restuccia
Honored Contributor

Re: new subnetmask failed

CONFIGURATION
Operating System - HP-UX
Version - 11.0


To disable this check, you must change a kernel global in HP-UX to 0:

Operating System | Kernel Global
------------------|----------------------
10.x | check_bcast_addr
11.00 | ip_check_subnet_addr
|

At 11.00, you can use the 'ndd' command to modify the kernel global:

1. cd /sbin/init.d

2. Copy any script file:

cp net.init ndd_script

3. Edit the new file:
.
.
.
start)
/usr/bin/ndd -set /dev/ip ip_check_subnet_addr 0
;;
.
.
.

4. chmod 555 ndd_script

5. chown bin:bin ndd_script

6. cd ../rc2.d

7. ln -s ../init.d/ndd_script S021ndd

Notice that the number assigned to this new script link is greater than
008 (S008net.init ), and smaller than (S340net).




rick jones
Honored Contributor

Re: new subnetmask failed

actually, depending on the class of the IP address, a netmask of 255.255.255.128 could actually work out of the box. what HP-UX does not aloow by default is an all-zeros or all-ones subnet portion of an IP address. that behaviour is altered with the ip_check_subnet_addr tunable.

11i sets ip_check_subnet_addr to 0 by default.
there is no rest for the wicked yet the virtuous have no pillows
Lora Ganeva
Regular Advisor

Re: new subnetmask failed

Hi,
You can add the entry
ROUTE_DESTINATION[]="net ..."
and it must work