Operating System - HP-UX
1833838 Members
2090 Online
110063 Solutions
New Discussion

Re: PB add a permanant route

 
attawhid
Occasional Advisor

PB add a permanant route

I have 2 HP server
serv1 ip address 192.1.1.1 netmask 255.255.255.192 getway 192.1.1.62
serv2 ip address 192.1.1.100 netmask 255.255.255.192 getway 192.1.1.126
I want to add a permanant route in both servers to the network 172.30.173.0/24 via the getway 192.1.1.40.

By adding the following bloc in the file /etc/rc.config.d/netconf in serv1
ROUTE_DESTINATION[2]="net 172.30.173.0"
ROUTE_MASK[2]=255.255.255.0
ROUTE_GATEWAY[2]=192.1.1.40
ROUTE_COUNT[1]=1
ROUTE_ARGS[n]=""
i can ping 172.30.173.1 and i can see the route in the result of netstat -r

I tryied to the same in serv2 but in vain. even if that i can ping 192.1.1.40 from serv2 the message error is
"
add net 172.30.173: gateway 192.1.1.40: Network is unreachable
"

Help me PLZ ;)
NB serv1 and 192.1.1.40 are in the same physical.

BRs,
attawhid


8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: PB add a permanant route

Shalom,

I can think of two things to look at.

1) The second server is not on the same physical network or its network port switch settings block the second gateway.

2) There is something else in /etc/rc.config.d/netconf that is interfering with this route.

Maybe read through carefully or copy them to a directory together and run diff on them.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
attawhid
Occasional Advisor

Re: PB add a permanant route

Shalom,

Sorry there is a mistake in the text, the correct one is
ROUTE_DESTINATION[2]="net 172.30.173.0"
ROUTE_MASK[2]=255.255.255.0
ROUTE_GATEWAY[2]=192.1.1.40
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""

The server serv2 is in an other physical network.
attawhid
Occasional Advisor

Re: PB add a permanant route

I run the "diff" command for the two netconf files, the differences are in HOSTNAME, IP_ADDRESS[0] and the ROUTE_GATEWAY[0]

Sandman!
Honored Contributor

Re: PB add a permanant route

Imho further clarification since your earlier posts are somewhat confusing. Post the routing table with the "netstat -rn" command and IP's of server1 and server2 alongwith their netmasks; unless the ones you have already posted are correct. In any case going over them would help.

~thanks
attawhid
Occasional Advisor

Re: PB add a permanant route

serv1 hostname is enms1
serv2 hostname is enms2
Here the results of "netstat -rn" in both servers:
_____________________________________________
enms1,sys,root # netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
195.1.1.1 195.1.1.1 UH 0 lan0 4136
195.1.1.100 195.1.1.62 UGH 0 lan0 0
195.1.1.0 195.1.1.1 U 2 lan0 1500
172.30.173.0 195.1.1.40 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 195.1.1.62 UG 0 lan0 0
enms1,sys,root #
__________________________________________
enms2,sys,root # netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
195.1.1.100 195.1.1.100 UH 0 lan0 4136
195.1.1.64 195.1.1.100 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 195.1.1.126 UG 0 lan0 0
enms2,sys,root #
enms2,sys,root # ping 195.1.1.40
PING 195.1.1.40: 64 byte packets
64 bytes from 195.1.1.40: icmp_seq=0. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=1. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=2. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=3. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=4. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=5. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=6. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=7. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=8. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=9. time=3. ms
64 bytes from 195.1.1.40: icmp_seq=10. time=3. ms

----195.1.1.40 PING Statistics----
11 packets transmitted, 11 packets received, 0% packet loss
round-trip (ms) min/avg/max = 3/3/3
enms2,sys,root #
________________________________________


attawhid
Occasional Advisor

Re: PB add a permanant route

Dear all,

I have fixed this issue!
the problem was in the routers configurations ;)

Thanks for all,
attawhid
Occasional Advisor

Re: PB add a permanant route

i have updated the routers (four) configuration with the new route.
and now it's OK i can access the network 172.30.173.0 machines.

bye
Sandman!
Honored Contributor

Re: PB add a permanant route

Could you also post the "route add" command you issued on server2 to add network number 172.30.173.0 to the routing table. The solution might be as simple as adding an indirect route to 192.1.1.40 thru the default gateway on server2 i.e.

# route add host 192.1.1.40 netmask 255.255.255.192 192.1.1.126 1

see if running the above command on server2 fixes the problem.

~hope it helps