Unix Technical Forum

question on adding static route

This is a discussion on question on adding static route within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hello, I have two NIC configured as follow: # netstat -nai Name Mtu Network Address Ipkts Ierrs Opkts Oerrs ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 07:42 PM
joe wong
 
Posts: n/a
Default question on adding static route

Hello,

I have two NIC configured as follow:

# netstat -nai
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs
Coll
lan2 1500 10.101.10.0 10.101.10.118 431207 0 471484 0 0
lan0 1500 10.101.66.0 10.101.66.118 17263 0 17285 0 0
lo0 4136 127.0.0.0 127.0.0.1 18461 0 18461 0 0

When I tried to add route:

route add net 192.168.99.0 netmask 255.255.255.0 10.101.66.139 1
add net 192.168.99.0: gateway 10.101.66.139: Network is unreachable

However, I can ping 10.101.66.139:

ping 10.101.66.139
PING 10.101.66.139: 64 byte packets
64 bytes from 10.101.66.139: icmp_seq=0. time=0. ms
64 bytes from 10.101.66.139: icmp_seq=1. time=0. ms
64 bytes from 10.101.66.139: icmp_seq=2. time=0. ms
64 bytes from 10.101.66.139: icmp_seq=3. time=0. ms


What could be the problem here?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 07:42 PM
W Howard
 
Posts: n/a
Default Re: question on adding static route

In article <dq2vvq$hga$1@news.hgc.com.hk>,
joe wong <joewong@tkodog.no-ip.com> wrote:
> I have two NIC configured as follow:
>
># netstat -nai
>Name Mtu Network Address Ipkts Ierrs Opkts Oerrs
>Coll
>lan2 1500 10.101.10.0 10.101.10.118 431207 0 471484 0 0
>lan0 1500 10.101.66.0 10.101.66.118 17263 0 17285 0 0
>lo0 4136 127.0.0.0 127.0.0.1 18461 0 18461 0 0
>
>When I tried to add route:
>
>route add net 192.168.99.0 netmask 255.255.255.0 10.101.66.139 1
>add net 192.168.99.0: gateway 10.101.66.139: Network is unreachable


Does the host at 10.101.66.139 do packet-forwarding? If it won't foward
the packets from its 10.101.66 interface to its 192.168.99 interface,
then the 192.168.66 network is indeed unreachable.

>However, I can ping 10.101.66.139:
>
>ping 10.101.66.139
>PING 10.101.66.139: 64 byte packets
>64 bytes from 10.101.66.139: icmp_seq=0. time=0. ms




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 07:42 PM
Rick Jones
 
Posts: n/a
Default Re: question on adding static route

W Howard <whoward@login3.srv.ualberta.ca> wrote:
> In article <dq2vvq$hga$1@news.hgc.com.hk>,
> joe wong <joewong@tkodog.no-ip.com> wrote:
>> I have two NIC configured as follow:
>>
>># netstat -nai
>>Name Mtu Network Address Ipkts Ierrs Opkts Oerrs
>>Coll
>>lan2 1500 10.101.10.0 10.101.10.118 431207 0 471484 0 0
>>lan0 1500 10.101.66.0 10.101.66.118 17263 0 17285 0 0
>>lo0 4136 127.0.0.0 127.0.0.1 18461 0 18461 0 0
>>
>>When I tried to add route:
>>
>>route add net 192.168.99.0 netmask 255.255.255.0 10.101.66.139 1
>>add net 192.168.99.0: gateway 10.101.66.139: Network is unreachable


> Does the host at 10.101.66.139 do packet-forwarding? If it won't
> foward the packets from its 10.101.66 interface to its 192.168.99
> interface, then the 192.168.66 network is indeed unreachable.


However, the route command will not know that and would not emit an
error. That the route command is emitting an error suggests it
believes that the 10.101.66.139 system is not "local" - all routes on
HP-UX have to be via locally connected systems.

So, I would wonder what the netmask is for lan0 and the full routing
table to know if 10.101.66.139 is indeed local.

>>However, I can ping 10.101.66.139:
>>
>>ping 10.101.66.139
>>PING 10.101.66.139: 64 byte packets
>>64 bytes from 10.101.66.139: icmp_seq=0. time=0. ms


Being pingable does not mean the system is local and so does not mean
the system can be specified as a router to HP-UX.

rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 07:42 PM
Joe Wong
 
Posts: n/a
Default Re: question on adding static route

Hi Rick,

In this case, what should be the netmask and is there any other settings
is required to make 10.101.66.139 "local" to HPUX?

Best regards,

- Joe

On Wed, 11 Jan 2006, Rick Jones wrote:

> W Howard <whoward@login3.srv.ualberta.ca> wrote:
> > In article <dq2vvq$hga$1@news.hgc.com.hk>,
> > joe wong <joewong@tkodog.no-ip.com> wrote:
> >> I have two NIC configured as follow:
> >>
> >># netstat -nai
> >>Name Mtu Network Address Ipkts Ierrs Opkts Oerrs
> >>Coll
> >>lan2 1500 10.101.10.0 10.101.10.118 431207 0 471484 0 0
> >>lan0 1500 10.101.66.0 10.101.66.118 17263 0 17285 0 0
> >>lo0 4136 127.0.0.0 127.0.0.1 18461 0 18461 0 0
> >>
> >>When I tried to add route:
> >>
> >>route add net 192.168.99.0 netmask 255.255.255.0 10.101.66.139 1
> >>add net 192.168.99.0: gateway 10.101.66.139: Network is unreachable

>
> > Does the host at 10.101.66.139 do packet-forwarding? If it won't
> > foward the packets from its 10.101.66 interface to its 192.168.99
> > interface, then the 192.168.66 network is indeed unreachable.

>
> However, the route command will not know that and would not emit an
> error. That the route command is emitting an error suggests it
> believes that the 10.101.66.139 system is not "local" - all routes on
> HP-UX have to be via locally connected systems.
>
> So, I would wonder what the netmask is for lan0 and the full routing
> table to know if 10.101.66.139 is indeed local.
>
> >>However, I can ping 10.101.66.139:
> >>
> >>ping 10.101.66.139
> >>PING 10.101.66.139: 64 byte packets
> >>64 bytes from 10.101.66.139: icmp_seq=0. time=0. ms

>
> Being pingable does not mean the system is local and so does not mean
> the system can be specified as a router to HP-UX.
>
> rick jones
>


--


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 07:42 PM
Rick Jones
 
Posts: n/a
Default Re: question on adding static route

Joe Wong <joewong@tkodog.no-ip.com> wrote:
> In this case, what should be the netmask and is there any other settings
> is required to make 10.101.66.139 "local" to HPUX?


That sounds a bit like putting the cart before the horse - unless you
happen to be the network designer, one cannot just make-up the
netmasks as you go along

The netmask would have to be such that the bitwise AND of the netmask
with the gateway IP or local IP is the same value.

rick jones
--
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 07:42 PM
Joe Wong
 
Posts: n/a
Default Re: question on adding static route

Hi Rick,

Right now, the LAN0 interface is connecting solely to a port on a PIX
device. It is configured as 10.101.66.118, with net mask 255.255.255.0. My
PIX IP is 10.101.66.139. What I tried to do is to config a route for all
traffic to 192.168.99.0 network going to the PIX. As I mentioned before, I
can ping 10.101.66.139 but route add always complain with network
unreachable error..

- Joe


On Thu, 12 Jan 2006, Rick Jones wrote:

> Joe Wong <joewong@tkodog.no-ip.com> wrote:
> > In this case, what should be the netmask and is there any other settings
> > is required to make 10.101.66.139 "local" to HPUX?

>
> That sounds a bit like putting the cart before the horse - unless you
> happen to be the network designer, one cannot just make-up the
> netmasks as you go along
>
> The netmask would have to be such that the bitwise AND of the netmask
> with the gateway IP or local IP is the same value.
>
> rick jones
>


--


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 07:42 PM
Rick Jones
 
Posts: n/a
Default Re: question on adding static route

Joe Wong <joewong@tkodog.no-ip.com> wrote:
> Right now, the LAN0 interface is connecting solely to a port on a
> PIX device. It is configured as 10.101.66.118, with net mask
> 255.255.255.0. My PIX IP is 10.101.66.139. What I tried to do is to
> config a route for all traffic to 192.168.99.0 network going to the
> PIX. As I mentioned before, I can ping 10.101.66.139 but route add
> always complain with network unreachable error..


Hmm, you already said the PIX will respond to pings right?

I presume you cannot just set the PIX as the defeault route because you
have that other subnet on the lan2 interface?

What happens if you drop the netmask part of the route command?

Could you post the output of netstat -rn?

rick jones
--
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 07:42 PM
Joe Wong
 
Posts: n/a
Default Re: question on adding static route

Hi Rick,

Thanks for your many help first. Here is my netstat -rn output:

# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.101.10.118 10.101.10.118 UH 0 lan2 4136
10.101.66.118 10.101.66.118 UH 0 lan0 4136
10.101.10.0 10.101.10.118 U 2 lan2 1500
10.101.66.0 10.101.66.118 U 2 lan0 1500
192.168.99.0 10.101.66.118 U 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.101.10.254 UG 0 lan2 0

Is there anything I can try?

- Joe

> Joe Wong <joewong@tkodog.no-ip.com> wrote:
> > Right now, the LAN0 interface is connecting solely to a port on a
> > PIX device. It is configured as 10.101.66.118, with net mask
> > 255.255.255.0. My PIX IP is 10.101.66.139. What I tried to do is to
> > config a route for all traffic to 192.168.99.0 network going to the
> > PIX. As I mentioned before, I can ping 10.101.66.139 but route add
> > always complain with network unreachable error..

>
> Hmm, you already said the PIX will respond to pings right?
>
> I presume you cannot just set the PIX as the defeault route because you
> have that other subnet on the lan2 interface?
>
> What happens if you drop the netmask part of the route command?
>
> Could you post the output of netstat -rn?
>
> rick jones
>


--


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 07:42 PM
Rick Jones
 
Posts: n/a
Default Re: question on adding static route

Joe Wong <joewong@tkodog.no-ip.com> wrote:
> Hi Rick,


> Thanks for your many help first. Here is my netstat -rn output:


> # netstat -rn
> Routing tables
> Destination Gateway Flags Refs Interface Pmtu
> 127.0.0.1 127.0.0.1 UH 0 lo0 4136
> 10.101.10.118 10.101.10.118 UH 0 lan2 4136
> 10.101.66.118 10.101.66.118 UH 0 lan0 4136
> 10.101.10.0 10.101.10.118 U 2 lan2 1500
> 10.101.66.0 10.101.66.118 U 2 lan0 1500
> 192.168.99.0 10.101.66.118 U 0 lan0 1500
> 127.0.0.0 127.0.0.1 U 0 lo0 0
> default 10.101.10.254 UG 0 lan2 0


> Is there anything I can try?


Have you tried removing the other 192.168.99 route through
10.101.66.118 first?

rick jones
--
The glass is neither half-empty nor half-full. The glass has a leak.
The real question is "Can it be patched?"
these opinions are mine, all mine; HP might not want them anyway...

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvv
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 07:42 PM
joe wong
 
Posts: n/a
Default Re: question on adding static route

Hi Rick,

Yes, I think I did try before. BTW, is this necessay?

10.101.66.0 10.101.66.118 U 2 lan0 1500

- joe
"Rick Jones" <rick.jones2@hp.com> ¼¶¼g©ó¶l¥ó·s»D:AzSxf.1608$Ce3.954@news.cpqcorp.net ...
> Joe Wong <joewong@tkodog.no-ip.com> wrote:
>> Hi Rick,

>
>> Thanks for your many help first. Here is my netstat -rn output:

>
>> # netstat -rn
>> Routing tables
>> Destination Gateway Flags Refs Interface Pmtu
>> 127.0.0.1 127.0.0.1 UH 0 lo0 4136
>> 10.101.10.118 10.101.10.118 UH 0 lan2 4136
>> 10.101.66.118 10.101.66.118 UH 0 lan0 4136
>> 10.101.10.0 10.101.10.118 U 2 lan2 1500
>> 10.101.66.0 10.101.66.118 U 2 lan0 1500
>> 192.168.99.0 10.101.66.118 U 0 lan0 1500
>> 127.0.0.0 127.0.0.1 U 0 lo0 0
>> default 10.101.10.254 UG 0 lan2 0

>
>> Is there anything I can try?

>
> Have you tried removing the other 192.168.99 route through
> 10.101.66.118 first?
>
> rick jones
> --
> The glass is neither half-empty nor half-full. The glass has a leak.
> The real question is "Can it be patched?"
> these opinions are mine, all mine; HP might not want them anyway...
>
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvv
> feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com