Operating System - HP-UX
1834936 Members
2269 Online
110071 Solutions
New Discussion

Re: Setting up a default gateway

 
SOLVED
Go to solution

Setting up a default gateway

Does anyone know what configuration file houses the default gateway address / configuration? I have HP-UX 10.20 /11.0, Compaq Tru64, and Solaris running here, and we just cut our network over to a routed environment last weekend, and I need to set up a gateway now. Is anyone familiar with setting up a gateway on any of these platforms? I'm going to start poking around the man pages, but the HP forum is always the BEST place to start! Any help will be much appreciated. As always, thank you in advance.
7 REPLIES 7
Wilfred Chau_1
Respected Contributor
Solution

Re: Setting up a default gateway

For HPUX, you can set it at /etc/rc.config.d/netconf

Assume you configure your nic at [0].

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="gateway IP"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

Now at the console,
# route -f

then,

# /sbin/init.d/net start

do a netstat -rn to make sure it is in place.
Patrick Wallek
Honored Contributor

Re: Setting up a default gateway

You have the answer for HP-UX.

For Sun Solaris you need to put the IP address of your default gateway into the file /etc/defaultgateway
# cat /etc/defaultgateway
123.123.123.1
Patrick Wallek
Honored Contributor

Re: Setting up a default gateway

I'm a bonehead!!!!

I hit submit and realized I told you the wrong file! The correct file is /etc/defaultrouter for Sun Solaris.

# cat /etc/defaultrouter
123.123.123.1
SHABU KHAN
Trusted Contributor

Re: Setting up a default gateway

Hi,

For SOLARIS...

The file is /etc/defaultrouter where you put your Gateway IP address..

For more information check out the Answerbook on Solaris servers:

http://yourfullyqualifiedhostname:8888

-Shabu
Darrell Allen
Honored Contributor

Re: Setting up a default gateway

Hi,

One thing to add about /etc/rc.config.d: be careful of creating backup versions of files in this directory. /etc/rc.config (called by /sbin/rc when changing run level) will skip files with any of the following 4 characters in the filename: .,~#
All others will be executed. Thus netconf.bak will not be executed but netconfOLD will be. And since the shell sorts in ascending, ascii order, netconfOLD will be executed after netconf.

Take a look at /etc/rc.config.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)

Re: Setting up a default gateway

Patrick, right on for solaris! Thank you.

Re: Setting up a default gateway

Wilfred,

Your suggestion worked like a champ. Thanks so much.