1829107 Members
2666 Online
109986 Solutions
New Discussion

Default Gateway

 
SOLVED
Go to solution
Bona_1
Frequent Advisor

Default Gateway

How do I set up or adjust a default gateway on HP-UX? I am sure I have exhausted all the options available to me using SAM.

thanks
11 REPLIES 11
Pete Randall
Outstanding Contributor
Solution

Re: Default Gateway

Set up the following entries in /etc/rc.config.d/netconf:

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=NNN.NNN.NNN.NNN
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

Then reboot.


Pete

Pete
Mark Grant
Honored Contributor

Re: Default Gateway

"route add default gateway xxx.xxx.xxx.xxx" [count]

If it is a remote gateway then "count" should be 1, otherwuse ignore it.
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: Default Gateway

Actually, it might be most prudent to test it with Mark's "route add", and then make the permanent changes to /etc/rc.config.d/netconf as I said.


Pete

Pete
Elmar P. Kolkman
Honored Contributor

Re: Default Gateway

Also make sure your gateway is pingable... If not, you need to disable the probing of the gateway, using:
ndd -set /dev/ip ip_ire_gw_probe 0

Otherwise the gateway will work untill the gateway is unsucessfully probed.
Every problem has at least one solution. Only some solutions are harder to find.
Bona_1
Frequent Advisor

Re: Default Gateway

Hi. Thanks so far. But for some strange reason, the /etc/* directories and files are read-only. Any ideas? I have been able to do a route-add though.

Thanks
Mark Grant
Honored Contributor

Re: Default Gateway

Assuming you are root, you can still write them with "vi" by going ":w!" after pressing escape.
Never preceed any demonstration with anything more predictive than "watch this"
Robert-Jan Goossens
Honored Contributor

Re: Default Gateway

Yes the files in /etc/rc.config.d/ are read only, but you can edit the netconf file and close it with :wq!
Brian Hackley
Honored Contributor

Re: Default Gateway

Bona,

By now you've probably set your default gateway by manually confirguring files?

If using SAM (I am looking at the Terminal
version not the GUI Version)
Select "Networking/Communications"
"Hosts"
"Local Hosts File"
(Lists of hosts comes up)
ACTIONS -> "Add default gateway"

HTH,
-> Brian Hackley
Ask me about telecommuting!
The Valspar Corporation
Occasional Contributor

Re: Default Gateway

Can also use set_parms addl_network. But it sounds like your already set.
Senthil Kumar .A_1
Honored Contributor

Re: Default Gateway

hello bono,

the best way to change the default gateway through sam is....
1)in sam click the network & communications icon.
2) click on internet addresses icon.
3)go to action there you will find the option you wanted namely, (modify default gateway)..


you can also edit /etc/rc.config.d/netconf

good luck,

senthil
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Mei Jiao
Respected Contributor

Re: Default Gateway

If you choose to edit /etc/rc.config.d/netconf file, you can run the command to re-read the netconf file:
# /sbin/init.d/net start

Then, check system's routing table:
# netstat -rn