Operating System - HP-UX
1836428 Members
3665 Online
110100 Solutions
New Discussion

Problems when subnetting networks.

 
Daniel Wajsman
Contributor

Problems when subnetting networks.

Hi.
I have a HP9000 K220 Server .I configured the /etc/rc.config.d/netconf with theese interfaces (I have attached the complete file):

lan0:0 172.18.0.224 Subnet Mask=""
lan0:1 10.0.0.37 Subnet Mask=""
lan0:2 10.99.1.2 Subnet Mask=""

One of the problems is that after rebooting the HP9000 I??ve lost IP conectivity with the networks 10.67.98.0,10.66.98.0 and 10.65.98.0,all of them with subnet mask 255.255.255.0
I learnt that for an HP Server ,the default subnet mask if you have a 10. network is 255.0.0.0,even though you specify a different Subnet mask.
Moreover,I think i do need to divide the A class network into several C class ones.
I??d like to know both why the Server could have lost IP connectivity and how I can subnet a 255.0.0.0 network.
Thanks
be yourself
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor

Re: Problems when subnetting networks.

Hi,

> lan0:1 10.0.0.37 Subnet Mask=""

The ip_check_subnet_addr controls the subnet portion of a host address and either allows or disallows the use of 0 in in the local network address portion.

To check whether you allow subnet zero,

# ndd -get /dev/ip ip_check_subnet_addr

The default value is 1 which disallows 0 in the local network address portion. If this is so, change it to 0 in order to allow subnet zero,

# ndd -set /dev/ip ip_check_subnet_addr 0

Hope this helps. Regards.

Steven Sim Kok Leong
Ron Kinner
Honored Contributor

Re: Problems when subnetting networks.

By leaving the subnet definition empty
SUBNET_MASK[0]=""
you have told it to use the default mask. The 10 net is a class A per the original RFC so the default is 255.0.0.0. When it reboots it checks to make sure you are not violating any rules one of which is you can't have two ip addresses on the same subnet on the same machine. (later versions have changed this rule and in 11.0 you can tell it not to worry about most rules via NDD but for simple boxes this is the case since it makes routing more complicated.) Since both your 10's use the same default subnet mask they both appear to be in the same subnet so they get thrown out.

172 is a class B so has 255.255.0.0 as its default subnet mask but even if it should be 255.255.255.0 it doesn't raise any flags since there is only the one on the PC. It would be difficult to reach a different class C 172 subnet but that's another problem.

Ron
Steven Sim Kok Leong
Honored Contributor

Re: Problems when subnetting networks.

Hi,

I jumped the gun without explaining. If you decide to change the subnetmask of both your conflicting 10.0.0.0 class A networks of default netmask 255.0.0.0 to two non-conflicting class B subnetworks, then for the IP address of 10.0.0.37 which implies the 10.0.0.0/16 or 10.0.0.0/255.255.0.0 subnet, you will need to set ip_check_subnet_addr to 0 in order for 10.0.0.0/16 to be recognised as a valid network despite the 0 in its network portion. Same applies if it is made a class C subnetwork.

Hope this helps. Regards.

Steven Sim Kok Leong
Ron Kinner
Honored Contributor

Re: Problems when subnetting networks.

One of the rules which your ip addresses violate is the first and last subnet rule.

The 10.0.0.37 subnet is the one which is causing your problem. When you break an A down to a C then you can't use the 10.0.0.0-10.0.0.255 subnet since it's the first subnet. (You also couldn't use the 10.255.255.0-10.255.255.255 subnet either.) The RFC is apparently concerned that you will confuse the network and broadcast addresses with your new subnets. As Steven pointed out you can override this rule by disabling ip_check_subnet_addr with NDD.

On pre 12.0 Cisco routers you had to say: ip subnet-zero in order to use the first and last subnets. Nowadays it's on by default.

Ron