Operating System - HP-UX
1753794 Members
7071 Online
108799 Solutions
New Discussion юеВ

want to add destination & gateway

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

want to add destination & gateway

I want to add destination & gateway. the file is netconf. but how to add this entry inthe file.
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: want to add destination & gateway

Hi Jack,

Add them like this.

ROUTE_DESTINATION[x]="192.168.10.0"
ROUTE_GATEWAY[x]="192.166.10.1"
ROUTE_COUNT[x]="1"
ROUTE_MASK[x]="255.255.255.0"

Where 'x' is the index. Look at other "ROUTE" entries in the file and use the next number.

ROUTE_DESTINATION is either a network or a host. The example I gave is network. ROUTE_COUNT is the number of the hops system has to make to reach the gateway. If the gateway is nothing but another interface on the system, it is 0. If it is directly reachable (on the same subnet) then it's 1 and so on.

ROUTE_MASK - get it from your network folks. With an appropriate netmask, you can cover multiple networks in the same route. Make sure your gateway supports it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Stf
Esteemed Contributor

Re: want to add destination & gateway

For example:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="128.1.0.1"
ROUTE_COUNT[0]=""
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]="net 192.1.1"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="128.1.0.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

GATED=0

ROUTE_DESTINATION may be "default" for default route, "net" for an entire net routing, or "host" for a specific host.

ROUTE_COUNT may be 1 if the route requires hops accross one or more gateways, and 0 for hosts on your local network.

Stf ;-)
Jack_126
Frequent Advisor

Re: want to add destination & gateway

Thanks for prompt reply.

The query closed.


Thanks again

Regards
Jack