Currently I'm running a FreeBSD 9.1 and the default gateway is already configured in the
defaultrouter = "10.0.0.1"
But now I want to change the default gateway without rebooting the system, is this possible?
migrated from serverfault.com Aug 21 '13 at 2:02
This question came from our site for system and network administrators.
You can add a new default route and remove the old one using either the
Change 192.0.2.1 to your desired default gateway. The default gateway needs to be on one of networks you have a direct connection to. You can change your IP address in a similar manner.
To make the change permanent, update your network configuration files in
At least one of these commands should be available on any Unix derived O/S. Different versions may work slightly differently. Check the
It's very easy, you only need to type the next commands:
You gonna need to replace the '192.168.0.1' with the IP of your choice.
And to check the changes you can use 'netstat':
This command show the routing table of the system.
Hope this help you.