Operating System - HP-UX
1752646 Members
5720 Online
108788 Solutions
New Discussion юеВ

Re: How to specify subnet mask in netconf

 
akyy
Occasional Advisor

How to specify subnet mask in netconf

I am editing netconf with following :

ROUTE_DESTINATION[2]=135.243.68.0
ROUTE_MASK[2]=255.255.255.224
ROUTE_GATEWAY[2]=172.29.4.1
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""

---------------------

But when restart net daemon, it gives error:

egtmast,sys,root # /sbin/init.d/net stop
egtmast,sys,root #
egtmast,sys,root # /sbin/init.d/net start
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 :
netmask: bad value
egtmast,sys,root #

----------------------------

I must delete subnet mask not to get error:

ROUTE_DESTINATION[2]=135.243.68.0
ROUTE_MASK[2]=""
ROUTE_GATEWAY[2]=172.29.4.1
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""

--------------------------

So , how will system suppose subnet mask is 255.255.255.224 ?. How can i specify subnetmask in netconf?
3 REPLIES 3
Bala C
Frequent Advisor

Re: How to specify subnet mask in netconf

You need not mention the netmask as it is optional.

Without mentioning the netmask, Please start the network and paste the output of netstat -in and netstat -rn.
Michal Kapalka (mikap)
Honored Contributor

Re: How to specify subnet mask in netconf

akyy
Occasional Advisor

Re: How to specify subnet mask in netconf

That's right!

I want IPs between 135.243.68.0 and 135.243.68.31 ping my server.

But If I define as below:

ROUTE_DESTINATION[2]=135.243.68.0
ROUTE_MASK[2]=""
ROUTE_GATEWAY[2]=172.29.4.1
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""

--------------------------

I think range 135.243.68.0-255 will ping my server wtih this configuration. So is there a way to fix this even if after reboot?