Three configuration methods for solaris Static Routing

Source: Internet
Author: User

How can we perform a valid solaris static route? What should I pay special attention to When configuring solaris Static Routing? Next we will give a comprehensive explanation of these issues. We all know that to add a default route in solaris, you only need to edit the vi/etc/defaultrouter file. The content is your default gateway.

The command route can be used to add solaris static routes. For specific parameters, see manual of route (1. The following is a simple example of adding or deleting a solaris static route. After execution, the route table takes effect immediately. You can run the command # netstat-r to view the route table. However, after the system restarts, it will become invalid. That is to say, after restarting the system, I need to re-run the routeadd command. To save this trouble, we can compile a script to run the command automatically after the system is started. This is also the idea of solution Below.

Solaris static route solutionA:

Edit the file solutionA under/etc/init. d.
The content is routeadd-netdestinationnext-specified metric.
Then chmod0777/etc/init. d/solutionA makes the file executable.
Then, lnsolutionA/etc/rc2.d/S100solutionA under/etc/init. d/enables solutionA to be started after the system is started.

Solaris static route solutionB:

ViS100solutionB under/etc/rc2.d
The content is routeadd-netdestinationnext-specified metric.
In comparison, solutionA is better.

Solaris static route solutionC:

Edit the/etc/gateways file.
File Format
Netdest. netgatewayroutermetriccnt [passive] [active]
For example:
Net128.50.0.0gatewaysword-rmetric1passive
Use
Host128.50.0.0gatewaysword-rmetric1passive
How to add a default static route
Edit the/etc/defaultrouter content to the default IP address of the gateway.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.