Set up a simple router in Linux

Source: Internet
Author: User
Set up a simple router in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Many X servers have built-in routing functions, that is, even Windows series can be built into a simple router.
Vrouters deployed on Unix and Linux have two advantages:

1. The price is relatively low. The routing service can be an auxiliary service of the host.

2. A vro with strong self-control and firewall functions can be set up.

Sco unix contains 3 daemon.

Routed gated irdd supports different protocols.

For example, routed only supports rip.

The routed daemon uses/etc/route ways to initialize static routes.

When the vro is started, routed loads the file and broadcasts its route table.

To find other rip-based routers (which is no different from cisco ).

If you want to set it, you can view the comment of gateways.

The format of each line in the/etc/gateways file is as follows:

Net | host name1 gateway name2 metric val active | passive | external

Val indicates the number of routers that pass through the vro.

Active is the information exchanged with other routers.

Passive is the same as above. It is a non-profit exchange.

Instance:

In the following example, I did this on SCO 5.05 last year.

As I have been very busy recently, please take care of the basic area.

Thank you first. I am very willing to help you with similar network setup problems.

1. Configure two NICs, one of which is 202.23.25.20. Received from the ISP 202.23.25.27.

The other is the Intranet address: 10.10.10.17 Intranet: 10.10.10.16 ~ 30

2. edit/etc/gateways.

Add:

Net 202.23.25.27 gateway 10.10.10.17 metric 1 active

Net 10.10.10.16 gateway 202.23.25.20 metric 1 active

3. inconfig command for setting the IP packet direction.

# Inconfig-v ipforwording 1

# Inconfig-v ipnonlocalsrcroute 1

# Inconfig-v ipsendredirects 1

4 routed process. Write a program in the/etc/rc2.d directory. Add a static route.

Route add default 202.23.25.27

5. Check the configuration.

# Netstate-rn

You can see everything you have done ~

This post is very useful, especially when a proxy-level firewall is set up on this simple router.
Related Article

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.