Operating System - HP-UX
1837123 Members
10878 Online
110112 Solutions
New Discussion

How to add default gateway

 
Binu_5
Regular Advisor

How to add default gateway

Hi

Can any help me in adding default gateway and
subnetmask permanatly in hpux11

Thanks
Binu
4 REPLIES 4
Suraj Singh_1
Trusted Contributor

Re: How to add default gateway

Method 1:
Use SAM --> Networking and Communication --> Network Interface Cards, select the card for which you want to Gateway/Netmask, select Actions --> Modify.

Make any desired changes, and you are done.

Method 2:

Edit /etc/rc.config.d/netconf and make desired changes, something like:
HOSTNAME="sliam33"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="10.216.169.133"
SUBNET_MASK[0]="255.255.248.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""

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

Regards,
Suraj
What we cannot speak about we must pass over in silence.
renarios
Trusted Contributor

Re: How to add default gateway

Hi Binu,

Try
# delete it from netconf
route delete default 1

# add a new one
route add default 1

# change netconf file using a script
./changeKeys.sh /etc/rc.config.d/netconf ROUTE_GATEWAY[0] ""

# stop
/sbin/init.d/net stop

# restart service
/sbin/init.d/net start

Cheerio,

Renarios
Nothing is more successfull as failure
Saravanan_15
Advisor

Re: How to add default gateway

Hi Binu,
You add through "route" command also. For Ex:

#route add default 192.168.252.193 netmask 255.255.255.0



Regards,
Saravanan M
Naveej.K.A
Honored Contributor

Re: How to add default gateway

Hi Binu,

Another way would be to "play it safe"

Use the set_parms addl_netwrk command and you key in the values which you want the system to have, even after a reboot.

Also, Please do assign points to who have answered your question;

http://forums1.itrc.hp.com/service/forums/pageList.do?userId=CA1271811&listType=unassigned&forumId=1

Regards,
--Naveej
practice makes a man perfect!!!