Linux cent OS 6.4 builds GRE tunnel

Source: Internet
Author: User

Loading GRE Modules

Modprobe Ip_gre


Create a tunnel named office

IP tunnel addoffice mode GRE remote 111.206.164.122 local 111.206.0.88 TTL 255

IP Link Set officeup


Add an IP address for tunnel

IP Add add10.100.100.1/30 Dev Office


Create a routing table with a table name of 136

IP route add default via 103.246.132.61 table 136


To create a policy that specifies the route table 136 when the local source IP is 192.168.50.0/24 out-of-the-way

IP rule Add from192.168.50.0/24 Dev office table 136


Add static route to point to tunnel

IP route add103.246.135.0/24 via 10.100.100.2 Dev Office

IP route add192.168.50.0/24 via 10.100.100.2 Dev Office

# IP Tunnel show View tunnel Information

GRE0:GRE/IP Remote any local any TTL inherit Nopmtudisc

OFFICE:GRE/IP Remote 111.206.164.122 local 111.206.0.88 TTL 255


This article is from the "LIHONGWEIBJ" blog, make sure to keep this source http://lihongweibj.blog.51cto.com/6235038/1657436

Linux cent OS 6.4 builds GRE tunnel

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.