Operating System - HP-UX
1837792 Members
10171 Online
110120 Solutions
New Discussion

Re: Assign Default gateway

 
Deepakgrover
New Member

Assign Default gateway

Hi,
Recently i configured HP UX for first time and configured 2 LAN card using SAM but couldnt find a way to configure default gateway IP for one of the card, pls help.
6 REPLIES 6
Peter Leddy_1
Esteemed Contributor

Re: Assign Default gateway

Hi,

If you do a quick search of the forums for "default gateway hp-ux" you will find many threads that will give you the instructions on how to set this up.

Regards,

Peter
Jaime Bolanos Rojas.
Honored Contributor

Re: Assign Default gateway

Deepakgrover,

Here you will find plenty of options to change or configure your default gateway:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1082340&admit=-682735245+1177080929205+28353475

Regards,

Jaime.
Work hard when the need comes out.
Tim Nelson
Honored Contributor

Re: Assign Default gateway

route add default xxx.xxx.xxx.xxx 1

edit /etc/rc.config.d/netconf to make permanent. ( examlples are in this file, towards bottom ).



Torsten.
Acclaimed Contributor

Re: Assign Default gateway

Another option:

set_parms addl_netwrk

see

http://docs.hp.com/en/B2355-60105/set_parms.1M.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
gigiz
Valued Contributor

Re: Assign Default gateway

Hi,
for default gateway configuration:
vi /etc/rc.config.d/netconf

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

whit your gateway ip
Save
and /sbin/init.d/net stop
/sbin/init.d/net start

Best Regards


Matti_Kurkela
Honored Contributor

Re: Assign Default gateway

Default gateway is not really a per-card setting.

In a host with several LAN cards, you should use the route settings to tell which cards should be used to access which networks. The "default gateway" is simply the final entry of the routing table: "if nothing else matched, send to this gateway (using this card)". If you set several default gateways, the one with the smallest hop count is preferred and will be used until it stops working or is overloaded.

Normally, the internet can be reache through only one LAN card (or one aggregate of cards, if you use APA). The gateway in this network is used as the default gateway, because there are too many networks in the internet to list individually. The other LAN cards are usually used to connect to some internal networks, so the amount of necessary manually-defined routes will be small.

Connecting several LAN cards to the same network segment without using APA is not supported and can lead to strange behavior. If you need to present several IP addresses to the network segment, use IP aliases on a single LAN card instead.

MK
MK