Operating System - HP-UX
1754294 Members
3126 Online
108813 Solutions
New Discussion юеВ

Problem with static routes 11i

 
Oscar Garcia
Regular Advisor

Problem with static routes 11i

Hi dear experts,

I have a problem creating an static route for lan1 card. I have created the route using "add route" and it looks like this, with netstat -rn:
172.22.250.0 172.22.6.65 UG 0 lan1 0
I understand this means whatever in the range 172.22.250.x will go thru the router 172.22.6.65. I am interested to reach the 172.22.250.3 host. But ping has been disable so I just can use trace route and this is what I've got:
# traceroute 172.22.250.3
traceroute: Warning: Multiple interfaces found; using 172.22.6.67 @ lan1
traceroute to 172.22.250.3 (172.22.250.3), 30 hops max, 40 byte packets
1 172.22.6.65 (172.22.6.65) 2.785 ms !X * 1.322 ms !X

People from the remote host does see this side... what could be wrong?

Now, checking the /etc/rc.config.d/netconf I have a mess:

ROUTE_DESTINATION[1]="195.218.40.1"
ROUTE_GATEWAY[1]=192.168.0.235
ROUTE_COUNT[1]=1
IP_ADDRESS[1]=172.22.6.67
SUBNET_MASK[1]=255.255.255.240
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=172.22.6.79
INTERFACE_STATE[1]=up

Do I need to change any of those indexes?

And to add a bit more to my confusion also when I do the netstat -rn I find:
172.22.6.64 172.22.6.67 U 2 lan1 1500
I guessed somebody created wrongly but how can I delete it? the "route delete host 172.22.6.64 172.22.6.67" command comes with:
delete host 172.22.6.64: gateway 172.22.6.67: no such route

I will very much appreciate any help. Thanks
7 REPLIES 7
Ivan Ferreira
Honored Contributor

Re: Problem with static routes 11i

Hi Oscar. Unless you have another working interface (check with ifconfig lan0), you could modify your netconf file to look like this:

INTERFACE_NAME[0]="lan1"
IP_ADDRESS[0]="172.22.6.67"
SUBNET_MASK[0]="255.255.255.240"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]="172.22.250.0"
ROUTE_GATEWAY[0]=172.22.6.65
ROUTE_COUNT[0]=1

The route add command should be:

route add 172.22.250.0 172.22.6.65 1

The netstat output for the route to host 172.22.6.64, shows G in their flags, so is a route managed by this host, that could be an IP alias.

The netconf configuration that you posted, is all the file or just part of it?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Problem with static routes 11i

Shalom,

Note that many networks that block ping, block traceroute, which means when all is said and done this may hang.

You should be able to specify which network interface(perhaps the netconf above) is primary and therefore be able to do your test.

The alterantive, which probalby is unacceptable is to down the second interface and then test.

Most machines have a built in LAN card that if hooked up can cause multi interface results.

ioscan -fnC lan

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
Oscar Garcia
Regular Advisor

Re: Problem with static routes 11i

Hello and thanks for your answers. Yes I forgot to tell you the server has 2 network cards and ioscan shows:
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
lan 0 0/0/0/0 btlan CLAIMED INTERFACE HP PCI 10/100Base-TX Core
/dev/diag/lan0 /dev/ether0 /dev/lan0
lan 1 0/3/0/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/1
00Base-TX Addon
/dev/diag/lan1 /dev/ether1 /dev/lan1
Steven E. Protter
Exalted Contributor

Re: Problem with static routes 11i

You have two lan cards hooked up, hence your original results.

You can change the default gateway to the lan you are testing and ten perhaps the traceroute will use the correct lan.

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
Oscar Garcia
Regular Advisor

Re: Problem with static routes 11i

I managed to delete 172.22.6.64 172.22.6.67 U 2 lan1 1500, using "route delete net...".
It seems that part of the whole problem was a loosy connection...
Anyway, what means the indexes [1] [2}, etc? I am pretty confused with that stuff...

Cheers!
Eberhard Maehr
Occasional Advisor

Re: Problem with static routes 11i

Hi Oscar,

the index reflects the configuration of your interface cards. If you have several network intefaces you must have more entries like that in your /etc/rc.config.d/netconf
IP_ADDRESS[1]=172.22.6.67
SUBNET_MASK[1]=255.255.255.240
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=172.22.6.79
INTERFACE_STATE[1]=up
with different indexes [0] for lan0 and so on.
In the routing configuration part of the netconf file, the index is used to setup several routes.

Hope this helps
Eberhard
Eberhard Maehr
Occasional Advisor

Re: Problem with static routes 11i

Hi Oscar,

the index reflects the configuration of your interface cards. If you have several network interfaces you must have more entries like that in your /etc/rc.config.d/netconf
IP_ADDRESS[1]=172.22.6.67
SUBNET_MASK[1]=255.255.255.240
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=172.22.6.79
INTERFACE_STATE[1]=up
with different indexes [0] for lan0 and so on.
In the routing configuration part of the netconf file, the index is used to setup several routes.

Hope this helps
Eberhard