Linux system Installation Iprouter

Source: Internet
Author: User

In the previous compilation of MPLS into the Linux kernel, it is now necessary to install Iprouter, the installation process is as follows:

1) Download two files of iproute2-2.6.39.tar.gz and Iproute2-v2.6.39-mpls.patch.

Iproute2-2.6.39.tar.gz:

http://pkgs.fedoraproject.org/repo/pkgs/iproute/iproute2-2.6.39.tar.gz/8a3b6bc77c2ecf752284aa4a6fc630a6/ Iproute2-2.6.39.tar.gz

Iproute2-v2.6.39-mpls.patch:

Http://ftp.jaist.ac.jp/pub/sourceforge/m/project/mp/mpls-linux/mpls-linux/Patches/iproute2-v2.6.39-mpls.patch

2) Unzip the iprouter into the/usr/src/linux-2.6.35 directory and copy the Iproute2-v2.6.39-mpls.patch to the directory.

$sudo CPiproute2-2.6. the.Tar. gz/usr/src/linux-2.6. *$ sudo CPIproute2-v2.6.39-mpls.Patch/usr/src/linux-2.6. *$ cd/usr/src/linux-2.6. *$ sudo Tar–ZXF iproute2-2.6. the.Tar. gz

3) put the patch file into the Iprouter

# cd/usr/src/linux-2.6. /iprouter2-2.6.  the  Patch–P1 <. /iproute2-v2. 6.39-mpls. Patch

4) Compiling the Iprouter

$ cd/usr/src/linux-2.6. /iprouter2-2.6.  the  sudo ./configure

Problems that may occur with this process *********

Problem:iptables Modules Directory:not found!

Solution: Place the following part of the Configure file:

Then

Ehco "Using Iptables"

Tables= "Iptables"--------------> Change the iptables here to Xtables

Else

Tables= "Xtables"--------------> Change the xtables here to iptables (this can be changed here)

****************************///

sudo  Make

Problems that may arise ***********

You need to install Bison,flex before executing this command.

sudo Install Bison
sudo Install Flex

Problem:fatal error:db_185.h:no such file or directory

Solution:

Install db-4.6.18.tar.gz, download link:

Http://pkgs.fedoraproject.org/repo/pkgs/pam/db-4.6.18.tar.gz/95768bd92fd48951a427fbab37b9088f/db-4.6.18.tar.gz

After the download is complete, unzip the installation with the following process:

tar -zxf db-4.6. . Tar . gz
$ CD DB-4.6. 18
$ CD Build_unix
sudo .. /dist/configure--prefix= $INSTALLPATH--enable-compat185
sudo Make
sudo Make Install

To find a file:

$ sudoupdated        // manually update the index before locating the file
Locate db_185.h // find db_185.h file

Problem:error:db_185.h:no such file or directory

Solution:

Compile the makefile file, and then locate:

#Path to Db_185.h include

Dbm_include:={rootdir}/usr/include

Change this path to the directory where the Db_185.h is located, db_185.h the directory can use locate location, if Db_185.h is located in:/usr/src/db-4.6.18/build_unix/db_185.h, Then change the above code to:

dbm_include:=/usr/src/db-4.6.18/build_unix/

****************************///

sudo  Make Install

After the final insert is complete, it is now possible to test the success of the installed MPLS, which can be entered in the terminal: MPLS, if this command is not found, there is no successful installation, but it is not necessarily successful.

Now you can do some simple configuration to test it. Use Ifconfig to view the NIC configuration. The sample configuration for a router is as follows:

$ifup eth1
$ifconfigEth1192.168.1.2/24

$mpls Nhlfe Add key0Instructions Push Gen -Nexthop eth1 IPv4192.168.2.2
$ip Route Add192.168.7.0/ -Via192.168.2.2Mpls0x02      //each time you enter this command, the computer crashes immediately, possibly a kernel conflict, this issue is not resolved
$mpls labelspace set Dev eth1 labelspace0
$mpls ILM Add label Gen $Labelspace0
$mpls Nhlfe Add key0Instructions Nexthop eth0 IPv4192.168.1.1
$mpls XC Add Ilm_label gen $Ilm_labelspace0Nhlfe_key0x03

Linux system Installation Iprouter

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.