|Skip Navigation Links|
|Exit Print View|
|Transitioning From Oracle Solaris 10 to Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library|
The /etc/defaultrouter file is deprecated in Oracle Solaris 11. You can no longer manage routes (default or otherwise) by using this file. Also, after an installation, you cannot determine a system's default route by checking this file. Instead, choose from the following methods to determine the system's default route.
You can configure route information for a system in the following ways:
For any currently active NCP (fixed or reactive), use the route command with the -p option to persistently add a route:
# route -p add default ip-address
Because this command applies the specified route to the currently active NCP, the default route is removed and potentially replaced, if the active NCP changes.
Note - This behavior is true for all types of network configuration, not just the default route settings.
For routes that are created by using this method, use the route -p show command to display all of the static routes that are associated with the currently active NCP:
# route -p show
Display the currently active routes on a system (applies to both types of NCPs) by using the netstat command:
# netstat -rn
Create a single, per-interface default route for any reactive NCP (active or non-active) by using the netcfg command. See Example 7-9.
Display the default route for the NCP, as follows:
# netcfg "select ncp MY-STATIC; select ncu ip e1000g0; get ipv4-default-route" ipv4-default-route "10.80.226.1"
Default routes that are created with the netcfg command can also be viewed by using the netstat -rn command, but only when the relevant NCP is active. Routes that are created in this way cannot be viewed by using the route -p show command.