Change Default Gateway Linux Command



Change Default Gateway Linux Command
 (380) Click. Work. Collect
Change Default Gateway Linux Command
Post Description:
Post Tags: change, default, gateway, linux, command
This Post Has Been Viewed 15034 Times Since Thu Aug 24, 2006 5:53 pm Posted By hostman with 3 replies
Change Default Gateway Linux Command
Does anyone know how to change my default gateway in the command link in the linux shell?

Thanks

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Change Default Gateway Linux Command




:: 1 :: #95 - Reply By hostman On Thu Aug 24, 2006 6:02 pm
If you want to chage the default gateway in linux using the linux shell, do this:

Execute this comand to display your network configuration:

     Code:
cat /etc/sysconfig/network


It will show something like this:

     Code:
NETWORKING=yes
HOSTNAME=host.domain.com
GATEWAY=210.96.156.101


In this example, my gateway is set to 210.96.156.101 If you want to change it, user your favorite editor and edit, then save it. I like using nano or VI. if you find vi hard to master, use nano, its much easier to use. if you are going to us nano, execute this command to edit:


     Code:
nano /etc/sysconfig/network


Please note in this example i am using Redhat/Fedora distribution.
:: 2 :: #13881 - Reply By oorangeboy On Fri Aug 03, 2007 8:20 am
worked like a charm thanks.
:: 3 :: #54851 - Reply By tebza On Fri May 23, 2008 3:21 am
i want to change a default gateway on my linux client, what should i type in the command shell?