how to change my gateway

Rashkae ubuntu at tigershaunt.com
Thu Apr 3 05:06:55 UTC 2008


stin wang wrote:
> i make some mistake about my gateway setting,it should be set to
> 172.18.20.126, but i enter as 172.18.20.64
> 
> so i want to correct it.
> 
> first method i tried, i use gui to change it ,and i restart network ,but
> route is still 172.18.20.64
> 2 method i tried, sudo gedit /etc/network/interfaces
> 
> auto lo
> iface lo inet loopback
> 
> iface eth0 inet static
> address 172.18.20.87
> netmask 255.255.255.224
> gateway 172.18.20.64
> 
> auto eth0
> 
> i change gateway to 172.18.20.126 and then
> sudo /etc/init.d/networking restart
> but it said siccaddrt:no such process
> failed to bring up eth0
> 
> how to fix it
> 
> 

There's probably a proper debian way to do it.  In a pinch, a restart
should fix it once you've made the changes to the config file.  But
there's always good ol' fashioned way

sudo route add default gw 172.18.20.126




More information about the ubuntu-users mailing list