Setting the default route on Solaris is easy. If you are trying to just set the route temporarily you can use the route command:

route add default <ipaddress>

Example:

route add default 192.168.1.1

If you want the route to be persisted when you reboot the system, you will need to set the route in the /etc/defaultrouter file.

/etc/defaultrouter

Example:

echo 192.168.1.1 > /etc/defaultrouter

Note that Solaris 10 includes “zones” that can also configure this same behavior. There will be more articles covering this in the future.

Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »