1833515 Members
3013 Online
110061 Solutions
New Discussion

Subnet Mask setting

 
SOLVED
Go to solution
yc_2
Regular Advisor

Subnet Mask setting

Hi,

I configured a second NIC card (btlan4) with the following in /etc/rc.config.d/netconf for a K380 server running UX 11.00

:
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=192.168.16.23
SUBNET_MASK[1]=255.255.255.0 <- works
SUBNET_MASK[1]=255.255.255.224 <- error
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0

ROUTE_GATEWAY[1]=192.168.16.1
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[1]=default

If the subnet_mask set to 255.255.255.224, the following message will show when /sbin/init.d/net start is executed:

ERROR: lan1 interface: ifconfig: ioctl (SIOCSIFNETMASK): bad value
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net default: gateway 192.168.16.1: Network is unreachable

Everything runs fine if subnet_mask is set to 255.255.255.0 but I was told by my network admin to use 255.255.255.224 and commented that the error was due to wrong configuration in the server.

Any pointer is appreciated.




14 REPLIES 14
Paul_481
Respected Contributor

Re: Subnet Mask setting

Hi Leong,

Try configuring it thru SAM.

SAM > Network and Communications > Network interface cards.

Regards,
Paul
Joseph Loo
Honored Contributor
Solution

Re: Subnet Mask setting

hi,

recommended step is to disable subnet mask checking. this is a good thread to address your problem:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=105606

regards.
what you do not see does not mean you should not believe
yc_2
Regular Advisor

Re: Subnet Mask setting

Use SAM to configured and the result is the same as mentioned in the first posting.
Paul Eadington_1
Valued Contributor

Re: Subnet Mask setting

If he's given you a subnet of 255.255.255.224 and you need to get to the default gateway of 192.168.16.1, then I think you need to be setting your Broadcast address also.

Try setting the broadcast to 192.168.16.31 and let us know how that goes.
I had hair .. then I got into Unix
yc_2
Regular Advisor

Re: Subnet Mask setting

When SAM was used to configured the NIC card, the broadcast address 192.168.16.31 was assigned by SAM.
Suraj Singh_1
Trusted Contributor

Re: Subnet Mask setting

Hi,

Try disabling subnet mask checking:

# ndd -set /dev/ip ip_check_subnet_addr 0

To make permanent, edit /etc/rc.config.d/nddconf:
TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

The reason HP-UX is rejecting the maxk/ip combination is it was interpreting them under the original, classful subnetting rules that still had the concept ofa this netowrk, all subnets broadcast. thus, an all-zeros or all-ones subnet portion could not be assigned as a host's IP address.

the ip_check_subnet_addr as mentioned will cause the mask/ip combinations to be interpreted under the newer classless rules. that becomes the default in 11i.

Regards,
Suraj
What we cannot speak about we must pass over in silence.
yc_2
Regular Advisor

Re: Subnet Mask setting

It worked with the advice from Joseph Loo and Suraj Singh. Thanks you.

Just one more question, why is it "Unknown tunable parameter: ip_check_subnet_addr" when the following is issued:

#ndd -h ip_check_ubnet_addr

Joseph Loo
Honored Contributor

Re: Subnet Mask setting

hi,

make sure u type the parameter correctly:

# ndd -h ip_check_subnet_addr

regards.
(p.s. please remember to assign points.)
what you do not see does not mean you should not believe
yc_2
Regular Advisor

Re: Subnet Mask setting

Hi Joesph,

My typo mistake but I still get "Unknown tunable parameter: ip_check_subnet_addr" by cutting your posting.

Joseph Loo
Honored Contributor

Re: Subnet Mask setting

hi,

could u reply the "ndd -h":

# ndd -h
look under SUPPORTED ndd tunable parameters

it may be ip_check_subnet_addr is not supported.

regards.
what you do not see does not mean you should not believe
yc_2
Regular Advisor

Re: Subnet Mask setting

Found it under:

UNSUPPORTED ndd tunable parameters on HP-UX
Joseph Loo
Honored Contributor

Re: Subnet Mask setting

hi,

maybe u like to read this thread for why it is unsupported:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=716344

regards.
what you do not see does not mean you should not believe
Bejoy C Alias
Respected Contributor

Re: Subnet Mask setting

Hi,
I think u didnt think about why SAM was giving error. The pblm is with the netmask , it should be 255.255.255.240 ,bcoz 255.255.255.224 is not a valid subnetmask for the ip address 192.168.16.23. Pls check with the subnetmask 255.255.255.240 if possible, i wont tell u to doit if u dont have any issues after disabling the checking of subnetmasks.
Be Always Joy ......
Nguyen Anh Tien
Honored Contributor

Re: Subnet Mask setting

I think your IP is out of this range.
see this doc
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000070739152
SO YOU SHOULD CHANGE TO
IP_ADDRESS[1]=192.168.16.226
SUBNET_MASK[1]=255.255.255.224
TIENNA
HP is simple