zoukankan      html  css  js  c++  java
  • Linux GRE Tunnel

    /sbin/modprobe ip_gre
    /sbin/iptunnel add tun0 mode gre remote 114.141.167.167 local 114.55.73.157
    /sbin/ifconfig tun0 122.115.74.170
    /sbin/route add 202.177.205.249/32 tun0
    /sbin/route add 72.46.244.231/32 tun0
    route -n

    删除

    /sbin/iptunnel del tun0

     

    要在Linux上创建GRE隧道,需要ip_gre内核模块,它是GRE通过IPv4隧道的驱动程序。

    2. 查看是否有加载ip_gre模块

    3. 创建步骤

    环境如下:

    host A :  121.207.22.123

    host B: 111.2.33.28

    在host A上面:

    创建一个GRE类型隧道设备gre0, 并设置对端IP为111.2.33.28。隧道数据包将被从121.207.22.123也就是本地IP地址发起,其TTL字段被设置为255。隧道设备分配的IP地址为10.10.10.1,掩码为255.255.255.0。

    在host B上面:

    此时,host A 和 host B 建立起GRE隧道了。

    4. 检测连通性

    5. 撤销GRE隧道

    在任一一端操作下面命令

  • 相关阅读:
    jqurey技术总结
    ie浏览器兼容问题小结
    FIS的合并压缩技术
    对js中数组的一些总结
    浅谈如何面向对象进行封装
    13th week blog
    12th week blog
    11th week blog
    10th week blog
    9th Week blog
  • 原文地址:https://www.cnblogs.com/syother/p/7149066.html
Copyright © 2011-2022 走看看