Operating System - HP-UX
1819802 Members
3437 Online
109607 Solutions
New Discussion юеВ

Re: how to get the route for a particualar host(ipaddress)

 
Soma_1
Occasional Advisor

how to get the route for a particualar host(ipaddress)

Iam using "route get " in Solaris to get the route for a ipAddress. The output of this command is attached as a seperate doc. I get the interface through which I can access the ipAddress.

Can some one suggest me an equivalent of this in HPUX.

Thank You,
e-somu.
7 REPLIES 7
Wieslaw Krajewski
Honored Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi,

You can check route table running

netstat -r
or
netstat -rn

To check route to the specific detination you can run

/usr/contrib/bin/traceroute IP_address

Rgds
Permanent training makes master
Michael Tully
Honored Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi,

The equivalent command in HP-UX is the
'traceroute' command. An example of
the usage is:

# /usr/contrib/bin/traceroute 10.10.20.1

To check your existing route information

# /usr/bin/netstat -rn

HTH
Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi:

You might also find the '-o' of 'ping' useful. A summary of routes taken is issued when the ping terminates. See 'man 1M ping'.

...JRF...
Magdi KAMAL
Respected Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi Soma,

The command is :

traceroute {?}

more info. by typing :
man traceroute for options.


Magdi
Ravi_8
Honored Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi,
#traceroute hostname/ip
never give up
Soma_1
Occasional Advisor

Re: how to get the route for a particualar host(ipaddress)

Hi guys,
Thanks for your response, but the information that I can get with "traceroute " is not enough for me, my machine has more than one interface how can I findout which interface is used to reach this ipaddress.
Also I cant use ping because I have a firewall preventing it.
Thanks
esomu.
Michael Tully
Honored Contributor

Re: how to get the route for a particualar host(ipaddress)

Hi,

Unfortunately I don't think that there is
a man page for this but there is a usage
statement that will appear as follows:

Usage: traceroute [-dnrv] [-w wait] [-m max_ttl] [-p port#] [-q nqueries] [-s src_addr] host [data size]

I don't have a system that has more than
one LAN card so I can't actually test this
but you can try this:

# traceroute -s host

Also what does your netstat -rn output show?

Regards
Michael
Anyone for a Mutiny ?