Operating System - HP-UX
1833582 Members
4714 Online
110061 Solutions
New Discussion

Re: Fail to add route entry during startup

 
Lora Ganeva
Regular Advisor

Fail to add route entry during startup

I have an HPUX 11i with the following configuration in /etc/rc.config.d/netconf:
INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=212.39.88.2
SUBNET_MASK[0]=255.255.255.128


ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=212.39.88.1
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]=212.39.88.128
ROUTE_MASK[1]="255.255.255.240"
ROUTE_GATEWAY[1]=212.39.88.20
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

####
I receive the following error message during startup:
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
"/sbin/rc2.d/S340net start" FAILED

I have installed all the recommended patches and set the ip_check_subnet_addr to zero. the result is that the interface is up, default gateway is added but the route via the 212.39.88.20 gateway can be added only by hand.

Any help would be greatly appreciated
11 REPLIES 11
Colin Topliss
Esteemed Contributor

Re: Fail to add route entry during startup

That looks like a host route.

The route mask should be:
255.255.255.255
if you are trying to route that particular host via 212.39.88.20

Col.
Michael Steele_2
Honored Contributor

Re: Fail to add route entry during startup

Ooops! :-0 hosts on that one. Try 255.255.255.224 instead for a net mask:

11100000 = 32 + 64 + 128 = 224. This will provide 32 host ip's. :-)
Support Fatherhood - Stop Family Law
Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

I don't want 32 hosts...i want 128.
John Palmer
Honored Contributor

Re: Fail to add route entry during startup

In order to use that subnet mask, you'll have to change subnet checking rules with:-

ndd -set /dev/ip ip_check_subnet_addr 0

For it to work after a reboot, configure /etc/rc.config.d/nddconf appropriately, something like...

TRANSPORT_NAME[0]=IP
NDD_NAME[0]=ip_check_subnet
NDD_VALUE[0]=0

Regards,
John

Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

I have added the entries in the nddconf file, but this didn't help at all.
John Palmer
Honored Contributor

Re: Fail to add route entry during startup

Have you rebooted after amending nddconf?

Before doing so, have you tried...

ndd -set /dev/ip ip_check_subnet_addr 0
ifconfig lan1 212.39.88.2 netmask 255.255.255.128

Regards,
John
Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

Yes, I have rebooted twice
Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

The problem is that lan1 is up and okay with the netmask
Michael Steele_2
Honored Contributor

Re: Fail to add route entry during startup

For 128 hosts your going to need:

255.255.255.0

-since-

255.255.255.128

...will only provide 126 hosts.
Support Fatherhood - Stop Family Law
Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

Ok..it was my mistake, I want to add a route entry: 212.39.88.128 255.255.255.240 212.39.88.20 1

Actually my question is not how to determine the netmask,it was what is the reason for these errors.
Lora Ganeva
Regular Advisor

Re: Fail to add route entry during startup

Thank You for answering.I decided the problem by adding the ROUTE_DESTINATION="net 212.39.88.128" in the netconf file and now it is okay.