1826398 Members
3459 Online
109692 Solutions
New Discussion

Re: Defaut Gateway

 
Paolo Paparella_1
New Member

Defaut Gateway

Hello,
I have a problem with Default Gateway in my server.
I have used the command 'route' for add the gateway, but in this away I must every morning to do this.
How and Where I can write the Gateway in definitive way?

Thanks
Paolo Paparella
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: Defaut Gateway

Paolo,

You don't to add it everyday. You can define it in your /etc/rc.config.d/netconf file like below.

ROUTE_DESTINATION[i]="default"
ROUTE_GATEWAY[i="aa.xx.yy.zz"
ROUTE_COUNT[i="1"

Where i is your default lan interface usually "0".

You can do a /sbin/init.d/net stop and /sbin/init.d/net start to activate.

For subsequent reboots, the system will add the gateway for you.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Defaut Gateway

Also, if you do not want to play with files, you can use

set_parms addl_network to add the default gateway.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Shahul
Esteemed Contributor

Re: Defaut Gateway

Hi

There are different ways to set default gateway. I hope set_parms is the safest way to do this.

#set_parms addl_netwrk

Now it will ask for default gateway, gateway hostname and subnet address. Set it properly. Then go to /etc/rc.config.d directory. Checkup the default gateway entry is changed to the new one which U given in netconf file.

Another way is run sam->networking and communication->network addresses->action. Here U can see the option for changing th default gateway.

Best of luck

Shahul
Sanjay_6
Honored Contributor

Re: Defaut Gateway

Ravi_8
Honored Contributor

Re: Defaut Gateway

Hi,
you can do this in 2 ways. make the entry in /etc/rc.config.d/netconf file for the parameters ROUTE_GATEWAY[0]="x.x.x.x"
ROUTE_COUNT[0]="1"
x.x.x.x is your default gateway and reboot the machine.

Or you can also do it by command
#set_parms addl_netwrk


never give up
harry d brown jr
Honored Contributor

Re: Defaut Gateway

You must be rebooting your server every night, correct? Follow the above advise and make the changes to the netconf file. If you aren't rebooting every night, then you have some other issue.
Live Free or Die
James Odak
Valued Contributor

Re: Defaut Gateway

set_parms only works on the primary card, if you have more then one card or only use a card not setup as primary set_parms will not help you
surest bet is to edit the netconf file as mentioned above, where [#] #=the card that is enabled