LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Edit command for Gateway Route Logged in as root (https://www.linuxquestions.org/questions/linux-newbie-8/edit-command-for-gateway-route-logged-in-as-root-4175468149/)

imran shaikh2 07-02-2013 07:09 AM

Edit command for Gateway Route Logged in as root
 
hi
can you please hlp with the command to edit
gateway ip
I`ve added gateway ip address with
route default add gw 192.168.xxx.xxx
now I want to edit and make changes please help

chrism01 07-02-2013 07:13 AM

Which distro do you have?
Code:

cat /etc/*release*

imran shaikh2 07-02-2013 07:13 AM

Quote:

Originally Posted by chrism01 (Post 4982442)
Which distro do you have?
Code:

cat /etc/*release*

]



unbuntu 12.04

TB0ne 07-02-2013 08:48 AM

Quote:

Originally Posted by imran shaikh2 (Post 4982437)
hi
can you please hlp with the command to edit gateway ip
I`ve added gateway ip address with route default add gw 192.168.xxx.xxx now I want to edit and make changes please help

Ok...so you already know the command; where is the problem?? Read the man page on the route command.

Delete the gateway you put in previously with a "route del" command, then add the new default gateway command in with the command you first ran.

Madhu Desai 07-02-2013 09:08 AM

First remove old default gateway
Code:

# route del default gw 192.168.old.old <interface>
Then, add new gateway
Code:

# route add default gw 192.168.new.new <interface>
Finally, check
Code:

# route


All times are GMT -5. The time now is 11:29 PM.