To compile MPLS into the Linux kernel

Source: Internet
Author: User

System environment: Linux kernel 2.6.35. (This environment is the one in the previous article that replaced the Ubuntu kernel)

The compilation process is as follows:

1) First, you need to download the patch file: Linux-kernel-v2.6.35-mpls1.980.patch. Download Link:

Http://ftp.jaist.ac.jp/pub/sourceforge/m/project/mp/mpls-linux/mpls-linux/Patches/linux-kernel-v2.6.35.13-mpls1.980.patch

Or:

http://zh.sourceforge.jp/projects/sfnet_mpls-linux/downloads/mpls-linux/Patches/linux-kernel-v2.6.35.13-mpls1.980.patch/

2) Copy the downloaded patch file to the/usr/src/directory. Then hit the file into the kernel and enter the following command:

# CP Linux-kernel-v2. 6.35-mpls1. 980. Patch /USR/SRC      // copy files to/usr/src directory  /usr/src/linux-2.6.                                           //  First go to the kernel home directory Patch -P1 <. /linux-kernel-v2. 6.35-mpls1. 980. Patch // load the patch file into the kernel file. 

3) re-compile the kernel

$ cd/usr/src/linux-2.6.  * $ sudo make menuconfig

At this point, the terminal will pop up a configuration interface, select the MPLS option, and then save the exit.

Networking Options--->

Mulitprtocol Label Switching

Ip:mplssuppor

In addition, it is recommended that MPLS be compiled directly into the Linux kernel instead of module compilation, and if the module is selected, it may not be loaded automatically after the system compiles, which may cause the MPLS service to fail to start.

That is, when you select the option associated with MPLS, select Y, which is: "*", which indicates that the system kernel is compiled. Instead of selecting M, this represents the module.

4) Compile the kernel again and enter the following command in turn.

$sudo  MakeMrproper//clean up old files that have been compiled before, and if you are compiling for the first time, do not. $ sudo  Make                //the process takes a longer time to recompile the kernel. There may be a problem with using this command directly, you can use: sudo make config_debug_section_mismatch=y$ sudo  Make Install     $ sudo  MakeModules//compiling the module$ sudo  MakeModules_install//Mounting Module

After the compilation is complete, the MPLS module is installed.

Note that there may be various errors in compiling the kernel, the solution to the error can refer to this blog: Ubuntu system kernel Replacement

To compile MPLS into the Linux kernel

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.