How to manually create tunnel in the RedHat Environment

Source: Internet
Author: User
Article Title: How to manually create a tunnel in the RedHat environment. 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.
▲Configure ipv6 on RedHat
  
① Re-compile the kernel:
The current version of redhat supports ipv6 (all later versions of kernel after 2.0.x support ipv6), but it is not compiled by default. Therefore, we need to take the following steps to make the machine's kernel support IPv6. The procedure is as follows:
Make menuconfig;
In the optional network options, ipv6 is supported.
Make; make bzImage;
Make modules; make modules_install
Copy./arch/i386/boot/bzImage to a directory, such as/boot.
Modify the/etc/lilo. conf file and start it with the new compiled kernel.
  
② Install tools and software related to ipv6:
When the kernel supports ipv6, you also need to install the corresponding software under ipv6, which mainly includes two:
The first is: the installation process of net-tools-1.52.tar.gz is as follows:
Decompress the package to a directory, usually in the/usr/src directory.
# Tar xzf net-tools-1.52.tar.gz-C/usr/src
Enter the decompressed directory of the package:
# Cdnet-tools-1.52
Make clean;
Make config;
Make; make install
The second is: iputils-ss000418.tar.gz its installation process is as follows:
Decompress the package to a directory (which can be any directory). Generally, the package can be in the/usr/local/src directory.
# Tar xzf iputils-ss000418.tar.gz-C/usr/local/src
Enter the decompressed directory of the package:
# Cd iputils
Make clean;
Make;
  
After the installation is successful, use ifconfig-a to display the local link address of inet6 (success !)
  
▲Build tunnel on two redhat machines that support ipv6
  
To create a tunnel between two or more ipv6 hosts, you must know the v4 address of the ipv6 host and the corresponding v6 address. The following uses our experiment environment as an example to describe how to establish tunnel.
  
The configuration of host A is as follows: 202.112.96.94 (v4) 3ffe: 3201: 1800: 1: 7 (v6)
The configuration of host B is as follows: 202.112.10.142 (v4) 3ffe: 3201: 1800: 2: 7 (v6)
  
Run the following command on host A:/sbin/ifconfig sit0 inet6 tunnel: 202.112.10.142 (for the v6 compatible address of B)
  
/Sbin/ifconfig sit1 up
/Sbin/ifconfig sit1 add 3ffe: 3201: 1800: 1: 7/64 (for the v6 entry address of tunnel in)
/Sbin/route-A inet6 add 3ffe: 3201: 1800: 2: 7/64 (the v6 address of the tunnel peer, which is the v6 portal address in B) sit1
  
# Default route
/Sbin/route-A inet6 add 3ffe:/16 gw 3ffe: 3201: 1800: 2: 7/64 (v6 address of the tunnel peer, This Is The v6 portal address in B) sit1
  
Perform operations on host B. You can run the following command on host:
Ping6 3 FFE: 3201: 1800: 2: 7
To check whether tunnel is successful.
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.