Operating System - HP-UX
1838105 Members
3629 Online
110124 Solutions
New Discussion

two or more routes on unix

 
SOLVED
Go to solution
Wolfram Knorr
Occasional Advisor

two or more routes on unix

Hi Experts,

i have a problem with my two routes on my unix.
I have a gateway and a cisco-router to a different net over isdn.
Both routes won`t work, only one is still chooseable.
(sorry for my english faults)

Here are the details from my netconf file:
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=140.171.149.149
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]="140.171.149.255"
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

#default routeROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=140.171.149.253
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

# Cisco KVS-Router
ROUTE_DESTINATION[1]="host 193.23.100.20"
ROUTE_MASK[1]="255.255.254.0"
ROUTE_GATEWAY[1]="140.171.149.178"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

i connect to KVS through my netscape and then i examine with netstat -rn.

here is the result:
cad19:root:/etc/rc.config.d>netstat -rn
Routing tables
Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 0 lo0 4136
140.171.149.149 140.171.149.149 UH 0 20893 lan0 4136
193.23.100.20 140.171.149.223 UGH 0 0 lan0 1500
140.171.137.150 140.171.149.223 UGH 0 0 lan0 1500
140.171.149.0 140.171.149.149 U 2 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
default 140.171.149.253 UG 0 0 lan0 1500

My problem is right now, that the connection to the CISCO-KVS is going through the default gateway, but not through the cisco-router (140.171.149.174, netmask 255.255.254.0). Default gateway is 140.171.149.253, netmask 255.255.255.0.

if i reset the cisco, then it runs for a while, but not from the first try on.

I have a remote WS on a different location with similar (ip: 140.171.151.134, netm. 255.255.255.0, gateway 140.171.151.253) entries, and it runs without any problems.
But it won`t in my network
What is my mistake??

I think the entries must be o.k., but it drives crazy to reset the cisco more then once a day.

Thanks for your help.


resistance is futile
6 REPLIES 6
Massimo Bianchi
Honored Contributor
Solution

Re: two or more routes on unix

Hi,
could you post your /etc/rc.config.d/netconf ?

May be you have started some daemon like gated...
BTW,

in the post the following it's just ONE line.... it is only a problem of the screen ?
#defaultrouteROUTE_DESTINATION[0]=default


Massimo
Massimo Bianchi
Honored Contributor

Re: two or more routes on unix

Hi,
anothe note:

# Cisco KVS-Router
ROUTE_DESTINATION[1]="host 193.23.100.20"
ROUTE_MASK[1]="255.255.254.0"
ROUTE_GATEWAY[1]="140.171.149.178"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

why a route mask so large, for just ONE HOST ? May be you wanted to add a net.

ROUTE_DESTINATION[1]="net 193.23.100.20"

Massimo
Sridhar Bhaskarla
Honored Contributor

Re: two or more routes on unix

Hi,

193.23.100.20 140.171.149.223 UGH 0 0 lan0 1500
140.171.137.150 140.171.149.223 UGH 0 0 lan0 1500

What is 140.171.149.223?. Shouldn't it be .149? It was not listed in your netconf. Was it a typo? Do you have other route entries in your netconf?

Delete that route and add the route manually a nd see if it works.

route add host 193.23.100.20 netmask 255.255.254.0 140.171.149.178 1

Make sure you don't have 'gated' running on the box.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Wolfram Knorr
Occasional Advisor

Re: two or more routes on unix

hi ,

@massimo

i tried it with
ROUTE_DESTINATION[1]="net 193.23.100.20"
and with
ROUTE_DESTINATION[1]="host 193.23.100.20"
but both won`t work.
and in the netconf i didn`t start the gated daemon


@Sridhar

*.223 is the i-net router at&t for our wan, it`s routed through *.253

although i added manually the route with the command you`ve shown, but i have the same effect described above : i have to reset my router for the connection.


@ both of you
in the netconf-file the default route is set to default as shown in the manpages.
as well as shown by "netstat -rnv" the routing tables are o.k.
cad19:root:/sbin/rc2.d>netstat -rnv
Routing tables
Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1/255.255.255.255
127.0.0.1 UH 0 0 lo0 4136
140.171.149.149/255.255.255.255
140.171.149.149 UH 0 7885 lan0 4136
140.171.149.0/255.255.255.0
140.171.149.149 U 2 0 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 0 lo0 4136
193.23.100.0/255.255.254.0
140.171.149.178 UG 0 0 lan0 1500

Attached is the netconf-file.

Thanks in advance
Wolfram
resistance is futile
Adam J Markiewicz
Trusted Contributor

Re: two or more routes on unix

Hi
>>
*.223 is the i-net router at&t for our wan, it`s routed through *.253
<<
Wrong!
as its addres is
140.171.149.223
it perfectly fits subnet
140.171.149.0/255.255.255.0
so it goes directly into local subnet.

Mayby that's related to your problem?

Good luck
Adam
I do everything perfectly, except from my mistakes
Wolfram Knorr
Occasional Advisor

Re: two or more routes on unix

HI everybody,


i figured out the problem:

It was my router, it hangs on only one connection, and i tried all post as well as i did my changes. At least the router wasn`t configured to handle more then two connections at one time.

I also figured out, that .253 is needed because we have two ip-ranges *.*.148.* and *.*.149.* and it`s the bridge for other ip-range (*.*.148.*) cause we have sample scripts that make it possible to copy data to a file server in *.*.148.*

Thanks for all your help

Wolfram
resistance is futile