Operating System - HP-UX
1834874 Members
2770 Online
110070 Solutions
New Discussion

Re: IP addressing problem

 
Rajesh_33
New Member

IP addressing problem

Dear all

In HP-UX 10.20 and 11.0

I was not able to assign IP address 192.168.145.177 with subnet mask 255.255.255.128

Pls help me regarding this.
12 REPLIES 12
Mark Grant
Honored Contributor

Re: IP addressing problem

What errors are you getting and how are you trying to do it?
Never preceed any demonstration with anything more predictive than "watch this"
John Carr_2
Honored Contributor

Re: IP addressing problem

hi try mask 255.255.255.0

:-) JOhn.
John Carr_2
Honored Contributor

Re: IP addressing problem

The first 2 bytes of the subnet mask 255.255 define the network, the 3rd 255 defines subnet, and the fourth byte 0 is devoted to teh host ID. The subnet mask 255.255.255.0 is widely used in class B networks to support subnetting.

hope this makes sense

:-) John.
Francois LAURENT
Frequent Advisor

Re: IP addressing problem

that's right ... if you're not freindly with sbnet calculating try this freeware ip subnet calculator
Ravi_8
Honored Contributor

Re: IP addressing problem

Hi,

255.255.255.128 is not the right subnet for the IP you are using. use the subnet as 255.255.255.0

never give up
Sritharan
Valued Contributor

Re: IP addressing problem

Hi,

Try to use this tool to calculate the subnet mask

http://www.telusplanet.net/public/sparkman/netcalc.htm


Thanks & Regards
Sri
Known is a drop...unknown is an ocean -> quote from a movie
Saurav_1
Valued Contributor

Re: IP addressing problem

Hi,

This is a common problem. which has been resolved with 11i. Solution for 11 system edit the /etc/rc.config.d/nddconf and put the following entry in the last.

TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_check_subnet_addr
NDD_VALUE[0]=0

INSERT LINE "/usr/bin/ndd -c" after the line "usr/bin/ndd -a" in the /sbin/init.d/net.init file.

hp-ux 10.2

1. Create a text file
# vi nettune_script ---with the following line:

/usr/contrib/bin/nettune -s ip_check_subnet_addr 0

2. mv nettune_script /sbin/init.d/nettune_script
3. chmod 555 /sbin/init.d/nettune_script
4. chgrp bin /sbin/init.d/nettune_script
5. chown bin /sbin/init.d/nettune_script
6. cd /sbin/rc2.d
7. ln -s /sbin/init.d/nettune_script /sbin/rc2.d/S006subnet

This will resolve ur problem. Pls assign points accordingly.

Saurav
Saurav_1
Valued Contributor

Re: IP addressing problem

reboot the system after change. To make the changes active.

Saurav
Claudio Cilloni
Honored Contributor

Re: IP addressing problem

I think 255.255.255.128 is a right subnet mask. It means that the addresses 192.168.145.1-126 and 192.168.145.129-254 are on different subnets.

Elmar P. Kolkman
Honored Contributor

Re: IP addressing problem

Before making the ndd settings 'permanent', you could test them runtime:
ndd -set /dev/ip ip_check_subnet_addr 0

Also, make sure no other interfaces are configured for usage in the 192.168 IP range. If another interface is already configured with a subnetmask which will include your subnet you try to add, it will not allow what you're trying to do. Sometimes dhcp does something like this...

'netstat -in' will show all assigned IP addresses with netmasks.
Every problem has at least one solution. Only some solutions are harder to find.
Ron Kinner
Honored Contributor

Re: IP addressing problem

Sauray and Elmar are correct. Your problem is caused by 11.0 attempting to enforce an obsolete RFC which said you should not use the first and last subnet. When you use a 255.255.255.128 you divide the usual class C into only two subnets which 11.0 considers the first and last so neither can be used. By turning off subnet checking you will no longer have the problem.

Ron
Worlock
New Member

Re: IP addressing problem

I will say that most everyone here that seems to think they know something about subnetting - doesn't.!.!
I will agree and say that listening to ron- here before me knows the right thing as does the one he states to listen to. to all those before me, 128 is a real sub net, it is using the first bit as a used bit in the last octet of a class "C" address( i.e. 128, 64, 32, 16, 8, 4, 2, 1) - this is how a binary ip is broken down into binary. each octet has the same coresponding bits for each of the 8 places as I described which makes up the 255, way to go ron.! I am impressed!
"Damnit Man!"