Wednesday, 18 December 2019

route config for solaris11

Configuring Persistent Routes

Because the /etc/defaultrouter file is deprecated in Oracle Solaris 11, you can no longer manage routes (default or otherwise) by using this file. Using the route command is the only way that you can manually add a route to a system. To make the changes persist across reboots, use the –p option with the route command.
# route -p add default ip-address
For example, you would add a route to network 203.0.113.0, which has its gateway as the border router, as follows:
# route -p add -net 203.0.113.0/24 -gateway 203.0.113.150
add net 203.0.113.0: gateway 203.0.113.150
View routes that were created by the using the previous command as follows:
# route -p show
Also, note that after an installation, you can no longer determine a system's default route by checking the /etc/defaultrouter file. To display the currently active routes on a system, use the netstat command with the following options:
# netstat -rn

No comments:

Post a Comment