SUMMARY: Changing default gateway under Solaris 2.3

From: Marco Pineda (
Date: Sat Jul 09 1994 - 01:51:49 CDT

This was easy. Edit the file /etc/defaultrouter to contain the name or
IP address of the gateway. This will set it from boot time on. To reset
immediately use the 'route' command.

# route delete net default <oldgateway>
# route add net default <newgateway>

Please check the 'route' man page for specifics.

Someone mentioned that it might be a good idea to do 'route -f' to flush
the routing table before deleting the old default gateway entry and adding
a new one.

I have succeeded in getting connectivity by applying the second solution
(using route). I have also edited the /etc/defaultrouter file to
contain the correct gateway but have yet to reboot the machine so I
cannot say or certain yet if that will work.

Many thanks to the following: (Eckhard Rueggeberg) (Lou Jones)
Markus Storm <> (Mauro Jorge Atalla)
grevemes@VTC.TACOM.Army.Mil (Steven Grevemeyer)
Ted Nolan SRI Ft Gordon <> (John Justin Hough) (ANDY KUMEDA)
Francis Hsu <francis@red-branch.MIT.EDU> (Michael G. DeLooze)

* Be vague... be very vague. | *
* "Carpe Cibum" | Marco Pineda *

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:05 CDT