Enable linux routing

Source: Internet
Author: User
Article title: enable the linux routing function. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

High-order routers can be connected to different hardware devices and can be translated into many different packaging formats. The price is not cheap either! In this section, we do not want to discuss such high-level things. we only discuss the simplest router function in the Ethernet: connecting two different domains. Hey! This function is available in Linux! Just as the route table is provided by the core functions of Linux, and the packet forwarding capability is also provided by the core of Linux, how can we start this packet forwarding? It's easy. just do this:

[Root @ linux ~] # Echo "1">/proc/sys/net/ipv4/ip_forward

The above action is to enable the core packet forwarding capability of Linux. You can write the preceding commands to/etc/rc. d/rc. local to enable the packet forwarding function when Linux is started, or by modifying/etc/sysctl. conf to enable startup packet forwarding:

[Root @ linux ~] # Vi/etc/sysctl. conf # Modify the following settings correctly! Net. ipv4.ip _ forward = 1 [root @ linux ~] # Sysctl-p <= make the setting take effect immediately

Sysctl is a command used to directly modify core parameters during core work. for more functions, see man sysctl. Don't doubt! Your Linux has the simplest router function.

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.