System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a static route for a subnet in netconf file.

Jean Samarani
Frequent Advisor

Adding a static route for a subnet in netconf file.

Hi Guys,

Hello Guys,

I am facing this weird issue below:

When I try to add a route in netconf to reach the host 110.1.136.96 based on the host parameter ( see below ), I am able to reach the destination server however when I try to add the static route for the whole subnet, the destination host is not reachable, Although the routing table looks ok.

Can anyone advise what could be the issue?



ROUTE_DESTINATION[1]="net 10.1.136.0"
SUBNET_MASK[1]=255.255.255.0
ROUTE_GATEWAY[1]=10.1.156.36
ROUTE_COUNT[1]=1


ROUTE_DESTINATION[2]="host 110.1.136.96"
ROUTE_GATEWAY[2]=10.1.156.36
ROUTE_COUNT[2]=1

thanks a lot !

Jean

10 REPLIES
Raj D.
Honored Contributor

Re: Adding a static route for a subnet in netconf file.

Jean,

First check if you can reach the gateway once the additional route added, then try reaching the host,

# route add net 10.1.136.0 netmask 255.255.255.0 10.1.156.36

# ping 10.1.156.36
# nslookup 10.1.156.36

Hth,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Jean Samarani
Frequent Advisor

Re: Adding a static route for a subnet in netconf file.

Actually, yes this work. I did it as you have mentioned but now my concern is how to fix it using netconf file.

Jean
Raj D.
Honored Contributor

Re: Adding a static route for a subnet in netconf file.

Jean,
If the above working then add in netconf file as follows, after the frist set of route entry, and re-check after netconf re-read has been done.



ROUTE_DESTINATION[1]="net 10.1.136.0"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.1.156.36"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""
ROUTE_SOURCE[1]=""
#####################################



Cheers,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "
Jean Samarani
Frequent Advisor

Re: Adding a static route for a subnet in netconf file.

Ok I will try the above configuration... and let you know.
Raj D.
Honored Contributor

Re: Adding a static route for a subnet in netconf file.

ok, make sure to add points once done.
Cheers,
" If u think u can , If u think u cannot , - You are always Right . "
Taifur
Respected Contributor

Re: Adding a static route for a subnet in netconf file.


Hi,

See below configuration for net conf,


ROUTE_DESTINATION[0]="net 10.1.136.0"
ROUTE_DESTINATION[1]="110.1.136.96"
ROUTE_MASK[0]="255.255.255.0"
ROUTE_GATEWAY[0]="10.1.156.36"
ROUTE_GATEWAY[1]="10.1.156.36"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""


If problem resolved , assign point.

Cheers//
Taifur
Jean Samarani
Frequent Advisor

Re: Adding a static route for a subnet in netconf file.

Hi Guys,

It didn't work when I did the configuration in netconf.

Any other idea what could be the problem?

thanks

GPissutto
Frequent Advisor

Re: Adding a static route for a subnet in netconf file.

Hi, can you send a netstat -nr after:
1.- Adding the route by command (route add)
2.- Adding the route by netconf

Jean Samarani
Frequent Advisor

Re: Adding a static route for a subnet in netconf file.

The entry is the same, The only difference is the flags UG and UGH.


does it make a difference ?
Ismail Azad
Esteemed Contributor

Re: Adding a static route for a subnet in netconf file.

Hi Jean,

You need to remember one thing on HPUX booting and that is every startup script references a configuration file at the time of boot and to make changes to take into affect as far as configuration is concerned stop and start the service and in case of your query execute the command {since you said you want to do this with netconf editting}

/sbin/init.d/net stop
/sbin/init.d/net start

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....