Default Gateway Linux

RegisterLogin
Default Gateway Linux
Post Description: we will show you what command to use in your linux shell terminal to setup your default gateway should you need to change it. setting up the network configuration is pretty strait forward and the command for changing your network default gateway ip addres
Tags: default, gateway, linux
This Post Was Posted On May 02, 2010 By Webune Support #3441
if you just purchased a linux dedicated linud with Webune we will show you what command to use in your linux shell terminal to setup your default gateway should you need to change it. setting up the network configuration is pretty strait forward and the command for changing your network default gateway ip address is very easy, just send this command when you are logged in as root:

# route add default gw 192.168.1.1

in the example above, we added 192.168.1.1 our out default gateway,

now you can just restart your network for the changes to take affect

# /etc/init.d/network restart
Leave Your Comments
alex
#3901 1
gateway address you can manually set the gateway via the route command. to set it permanently,
you need to adjust a configuration file, which may be the same configuration file that holds other options or another file, such as /etc/sysconfig/network/routes. in either case,
the option is likely to be called gateway. the gateway isn’t necessary on a system that isn’t connected
to a wider network—that is, if the system works only on a local network that contains
no routers.
May 02, 2010 Reply Report abuse
webune
#3900 2
you can also change it in this file:

/etc/sysconfig/network-scripts/ifcfg-eth0
May 02, 2010 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 2:08 am
Powered by: Webune Forums V3