1819796 Members
3117 Online
109607 Solutions
New Discussion юеВ

adding route in HP UX

 
Nadine Silue
Advisor

adding route in HP UX



Dears,

I have a collegue on another office trying to access my hp ux server.

I need to add a route to my server with his ip address.

The following are the ip addresses: 10.5.0.0.0 and 10.2.0.0 howw do i go about it.

Can someone help pls.

Nadine
7 REPLIES 7
Laurent Menase
Honored Contributor

Re: adding route in HP UX

Hi Nadine,

You need to know the default gateway address.
on both networks.


You can try also to add your default on the server itself.

then routers on both subnets must know how to go from one subnet to the other.
Johnson Punniyalingam
Honored Contributor

Re: adding route in HP UX

Hi Nadine,

>>I need to add a route to my server with his ip address.<<

Question :- add route static or perm route

if static :- please follow the below command you should have root access to perform this

route add net netmask 1 --> refers "ROUTE_COUNT"

Example :-

route add net 10.1.5.16 netmask 255.255.255.255 10.58.1.120 1

to verfiy

# netstat -rn

Prem route :-

# vi /etc/rc.config.d/netconf

#add the below entries
ROUTE_DESTINATION[0]="10.1.5.16"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="10.58.1.120"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

# inetd -c

to verfiy

# netstat -rn

Rgds,
Johnson
Problems are common to all, but attitude makes the difference
Nadine Silue
Advisor

Re: adding route in HP UX



Thanks, but i have 2 route to add .

I have added the first one in the /etc/rc.config.d/netcong.

Please how do i add the second one.

Nadine

Re: adding route in HP UX

Nadine,

Can you post the output of netstat -rn? It might help us to see what gateway's and routes are currently defined.

Suraj K Sankari
Honored Contributor

Re: adding route in HP UX

Hi,

To add a route this is the command

route add net/host netmask gateway count

where count means
An integer that indicates whether the gateway is a remote host or the local host. If the route leads to a destination through a remote gateway, count should be a number greater than 0. If the route leads to destination and the gateway is the local host, count should be 0. The default for count is zero. The result is not defined if count is negative.


Suraj
sreekanthtm
Trusted Contributor

Re: adding route in HP UX

Hi,

>>>>The following are the ip addresses: 10.5.0.0.0 and 10.2.0.0 howw do i go about it.

The information is not enough to conclude, whats the problem. It seems both of your servers are in the same subnet, and there is no need to add the route.
Please post the o/p of following command (From both servers) to get more specific answer.

#ifconfig
eg: # ifconfig lan0
# netstat -rn

Rgds
Sreekanth
TTr
Honored Contributor

Re: adding route in HP UX

Johnson P. 's reply is the proper way to add extra routes to a server in addition to the default one. But you have to increase the index number in the brackets for each extra route. So you add the following for each new route (note the [1] and [2] as the index. [0] is the default route for your default gateway

ROUTE_DESTINATION[1]="10.1.5.16"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="10.58.1.120"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

ROUTE_DESTINATION[2]="X.X.X.X"
ROUTE_MASK[2]=""
ROUTE_GATEWAY[2]="Y.Y.Y.Y"
ROUTE_COUNT[2]="1"
ROUTE_ARGS[2]=""

You can apply the new routes by "/sbin/init.d/net start"