Thanks
Change Default Gateway Linux Command
Change Default Gateway Linux Command
Post Description: change default gateway linux command Linux Hosting
Post Tags:
This Post Has Been Viewed 27208 Times Since Thu Aug 24, 2006 5:53 pm Author hostman with 10 replies
Post Description: change default gateway linux command Linux Hosting
Post Tags:
This Post Has Been Viewed 27208 Times Since Thu Aug 24, 2006 5:53 pm Author hostman with 10 replies
Change Default Gateway Linux Command
Advertise On This Page
Does anyone know how to change my default gateway in the command link in the linux shell?
Thanks
Thanks
Leave Your Comments
Share
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.

Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums

BBCODE:
Webmasters - Exchange Links With Us. Add related websites to this topic
Links Related to : Change Default Gateway Linux Command
Comments and replies About Change Default Gateway Linux Command
:: 1 :: Reply #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:
It will show something like this:
Code:
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:
Please note in this example i am using Redhat/Fedora distribution.
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
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 :: Reply #13881 Reply By oorangeboy On Fri Aug 03, 2007 8:20 am
worked like a charm thanks.
:: 3 :: Reply #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?
:: 4 :: Reply #61310 Reply By snehal On Fri Jul 11, 2008 2:28 pm
u can even try.
route add default gw 192.168.0.1
replace 192.168.0.1 with your ip, to delete route replace "add" with "delete"
route add default gw 192.168.0.1
replace 192.168.0.1 with your ip, to delete route replace "add" with "delete"
:: 5 :: Reply #83765 Reply By hoavn On Thu Nov 27, 2008 11:14 pm
thanks you very much. it's useful with me.
:: 6 :: Reply #98799 Reply By wallpaperama On Mon Mar 30, 2009 6:23 pm

if you have fedora or redhat or centos you can just send this command and select network from the list, there you can change the default gateway too.
the command to get the utility as in my pictures is this:
LINUX SHELL COMMAND:
hope the image helps
the command to get the utility as in my pictures is this:
LINUX SHELL COMMAND:
setup
hope the image helps
:: 7 :: Reply #99710 Reply By sharid On Tue Apr 07, 2009 8:48 pm
please sir i am sharid from india, how can i change my network gateway through command
:: 8 :: Reply #113724 Reply By Nagaraj On Tue Aug 25, 2009 2:44 am
pls send it
:: 9 :: Reply #115525 Reply By maruf On Mon Sep 14, 2009 4:29 am

please send my linux related information every day
:: 10 :: Reply #115781 Reply By Josh On Thu Sep 17, 2009 1:49 pm
great! see the below url also
basilvarghese.co.cc/linux-networkin
basilvarghese.co.cc/linux-networkin
