Steps Change The Default Route or Gateway on Solaris :
1. Edit /etc/defaultrouter
-This configuration will apply after next reboot.
[root@SolarisServer ~]# vi /etc/defaultrouter
192.168.2.1
Proceed to change the ip to your preferred/new ip address of your gateway and save.
2. Run the following command to delete and add the default route.
-This will apply the configuration with immediate effect. Assume that the existing gateway 192.168.1.1 will be change to 172.19.1.1.
[root@SolarisServer ~]# route delete default 172.19.1.1
[root@SolarisServer ~]# route add default 172.19.1.1
How to Change The Default Route or Gateway on Solaris