LOGO

Set Default Route on Solaris | Network Configuration

December 1, 2006
Set Default Route on Solaris | Network Configuration

Configuring the Default Route in Solaris

Establishing the default route within a Solaris operating system is a straightforward process. For temporary route adjustments, the route command provides a convenient solution.

Temporary Route Configuration

To implement a temporary default route, utilize the following syntax: route add default . This command directs network traffic to the specified IP address.

For instance, to set the default route to 192.168.1.1, the command would be:

route add default 192.168.1.1

Persistent Route Configuration

To ensure the default route remains active even after system reboots, configuration must be made within the /etc/defaultrouter file.

The following command will write the desired IP address to this file:

echo 192.168.1.1 > /etc/defaultrouter

This modification guarantees that the specified IP address will be consistently used as the default route upon system startup.

Solaris Zones and Route Configuration

It's important to note that Solaris 10 incorporates "zones," which also offer capabilities for configuring network routing. Further documentation detailing zone-specific route configuration will be provided in subsequent articles.

#Solaris#default route#network configuration#routing#solaris networking#set default gateway