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>
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.
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.
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 12/1/06