1833012 Members
3313 Online
110048 Solutions
New Discussion

Changing Default Gateway

 
Bill Hoffman_1
New Member

Changing Default Gateway

How do I change the default gateway on my HP9000? At present there is no default gateway present for my Ethernet Interface
Always take the shortest Route
12 REPLIES 12
John Carr_2
Honored Contributor

Re: Changing Default Gateway

Hi

to add a new default gateway

route add default 123.123.123.123 1

John
John Carr_2
Honored Contributor

Re: Changing Default Gateway

Hi

also you can edit /etc/netconf file adding the IP for ROUTE_GATEWAY or a host name listed in /etc/hosts or NIS or DNS then issue /sbin/init.d/net stop then /sbin/init.d start

John.
Jeff Schussele
Honored Contributor

Re: Changing Default Gateway

Hi Bill,

To set immediately run
route add default xxx.xxx.xxx.xxx 1

To enable the setting for all susequent boot you need to edit the /etc/rc.config.d/netconf file & enter the ROUTE_DESTINATION[0]=
ROUTE_GATEWAY[0]=
fields to default & the gateway IP (in quotes) respectively.
Note: depending on your network you may need to specify a subnet mask as well.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Bolene
Honored Contributor

Re: Changing Default Gateway

To make it permanent, it has to be added to the /etc/rc.config.d/etherconf file.

The easiest way is to use SAM to change it.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Ron Kinner
Honored Contributor

Re: Changing Default Gateway

route add default ipaddressofdefault 1

Will add it for now.
To make it stick you need to:

vi /etc/rc.config.d/netconf
Add:

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

If you already have some route statements then change the [0] to the next number.

When you reboot it will take.

Ron

S.K. Chan
Honored Contributor

Re: Changing Default Gateway

Since you need to edit /etc/rc.config.d/netconf anyway to make the change permanent, might as well straight away edit it ..

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

And restart "net".
# /sbin/init.d/net stop
# /sbin/init.d/net start
OR
reboot

Make sure check it afterwards..
# netstat -rn
MANOJ SRIVASTAVA
Honored Contributor

Re: Changing Default Gateway

Hi Bill


first do a netstat -nr
route delete default if any.
route add default 10.2.10.1:1 or 2 depending on the HOP count ie the no of active devices in the way .

you should be able to ping to the address.

To make it permanent edit /etc/rc.config.d/netconf file

Manoj Srivastava
Sanjay_6
Honored Contributor

Re: Changing Default Gateway

Hi Bill,

go to SAM --> Networking and communication --> Local Hosts file --> Action --> Configure default Gateway

Hope this helps.

Regds
PIYUSH D. PATEL
Honored Contributor

Re: Changing Default Gateway

Hi,

route add default 123.123.123.123 1

and then make the changes permanent by

edit the /etc/rc.config.d/netconf file & enter the ROUTE_DESTINATION[0]= and ROUTE_GATEWAY[0]= fields to default & the gateway IP respectively.

You can also do it thro SAM.

Just check one more way. Thro this you may not have to edit all the files.

set_parms ip_address

It will ask for the IP address and default gateway and after changing this, you will not have to edit any files.

HTH,
Piysuh




Mladen Despic
Honored Contributor

Re: Changing Default Gateway

To change default gateway, and other networking parameters interactively, run:

set_parms addl_netwrk

Try it, as you can always cancel out if you don't want to make a change.
PIYUSH D. PATEL
Honored Contributor

Re: Changing Default Gateway

Hi,

Sorry.....What Mladen despic told is the right option.

set_parms addl_netwrk

Piyush
charlotte_12
New Member

Re: Changing Default Gateway

hiya bill :)

my default gateway appears offline, and will not let me sign on to msn please could you let me know how i change to online from offline

thanks mate

charlotte

xxx