1847822 Members
4083 Online
104021 Solutions
New Discussion

Re: static route

 
jpcast_real
Regular Advisor

static route

I am trying to add an static route to an hp-ux 11i but it does not work . If i do it manually I get it:

route add net 174.1.0.0 netmask 255.255.0.0 139.16.240.111 1

madcc01:/etc/rc.config.d> netstat -rnv
Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
139.16.240.112/255.255.255.255 139.16.240.112 UH 0 lan0 4136
139.16.240.0/255.255.255.0 139.16.240.112 U 2 lan0 1500
174.1.0.0/255.255.0.0 139.16.240.111 UG 0 lan0 0
default/0.0.0.0 139.16.240.1 UG 0 lan0 0


This is my netconf:

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="255.255.0.0"
ROUTE_GATEWAY[0]=139.16.240.1
ROUTE_COUNT[0]=1

ROUTE_DESTINATION[1]="net 174.1.0.0"
#ROUTE_DESTINATION[1]="174.1.0.0"
ROUTE_MASK[1]="255.255.0.0"
ROUTE_GATEWAY[1]="139.16.240.111"
ROUTE_COUNT[1]="1"

Can anyone help me ???

Tanks

Here rests one who was not what he wanted and didn't want what he was
12 REPLIES 12
KapilRaj
Honored Contributor

Re: static route

If you are on the console try a "net" stop and then start

Still if you do not get add the command in /sbin/rc3.d/routes_yours

Regds,

Kaps
Nothing is impossible
jpcast_real
Regular Advisor

Re: static route

I stoped also net and started again .

/sbin/init.d/net stop/start but nothing changes and syslod do not say anything about why the static route has not been added.. and for this reason I must always do it manually...
Here rests one who was not what he wanted and didn't want what he was
KapilRaj
Honored Contributor

Re: static route

I think you can add routes through set_parms ??

Give it a try please

Kaps
Nothing is impossible
Sanjay Kumar Suri
Honored Contributor

Re: static route

Will it be possible for you to reboot? Check if /sbin/init.d/net get executed when the sytem boots.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
jpcast_real
Regular Advisor

Re: static route

I have rebooted but nothing has changed
Here rests one who was not what he wanted and didn't want what he was
Fabio Ettore
Honored Contributor

Re: static route

Hi,

it is strange that you cannot add a route.
Are you sure that does command work fine?
Are you sure that can system reach 139.16.240.111?

# route add net 174.1.0.0 netmask 255.255.0.0 139.16.240.111 1
# echo $?

Last command should report 0; values different than 0 mean a problem.

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
Sanjay Kumar Suri
Honored Contributor

Re: static route

I have another input. Can you re-enter the lines after deleting the existing ones to rule out any control character in the file?

Is your gatway local or remote (1 show it is remote)

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
V.Tamilvanan
Honored Contributor

Re: static route

Hi,
Can you try by removing the line which is commented in between the set of commands in /etc/rc.config.d/netconf.

#ROUTE_DESTINATION[1]="174.1.0.0"
jpcast_real
Regular Advisor

Re: static route

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="255.255.0.0"
ROUTE_GATEWAY[0]=139.16.240.1
ROUTE_COUNT[0]=1

ROUTE_DESTINATION[0]="174.1.0.0"
ROUTE_MASK[0]="255.255.0.0"
ROUTE_GATEWAY[0]="139.16.240.111"
ROUTE_COUNT[0]="1"

With this configuration everything has worked . But I do not understand is the purpose of the number [0] in the routes
Here rests one who was not what he wanted and didn't want what he was
Fabio Ettore
Honored Contributor

Re: static route

Ok, then Tamil deserves 10 points!
[0] just is an index for routes, really don't worry for that. If you will add another route take attention to add it with [2].

Best regards,
Ettore
WISH? IMPROVEMENT!
jpcast_real
Regular Advisor

Re: static route

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="255.255.0.0"
ROUTE_GATEWAY[0]=139.16.240.1
ROUTE_COUNT[0]=1

ROUTE_DESTINATION[1]="174.1.0.0"
#ROUTE_DESTINATION[0]="174.1.0.0"
ROUTE_MASK[1]="255.255.0.0"
ROUTE_GATEWAY[1]="139.16.240.111"
ROUTE_COUNT[1]="1"


I get the sollution , It is necessary to write in the netconf the default route first . If you do not have the default route you can not find the new gateway for the route [1] . The order is important

Thanks
Here rests one who was not what he wanted and didn't want what he was
Fabio Ettore
Honored Contributor

Re: static route

Of course l'order is important.
Anyway in your previous post already put default route first then I don't understand what problem was.

Please assign points to those who helped you. (this my post no points please.)

Best regards,
Ettore
WISH? IMPROVEMENT!