• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

SUSE FAQ 系列 -- ip/ip 或 ip/gre 隧道设置

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 37次 | 进入软件测试论坛讨论

领测软件测试网 如何设置ip/ip或ip/gre tunnel构建VPN

Q:如何设置ip/ip或ip/gre tunnel构建VPN        
A:通过ip/ip或ip/gre tunnel能够通过两个tunnel网关连接两个私有的网络
    例如:
                    Public Network
        ------------------------------------
        | 10.71.101.100/24               | 10.71.101.200/24
    GRE Router A                    GRE Router B
        | 192.168.0.1/24                  | 192.168.10.1/24
        |                                        |
    ---------------------                 --------------------        
    | Private Network A |            | Private Network B |
    |                           |            |                           |
   ClientA1           ClientAn       ClientB1            ClientBm
      192.168.0.10/24                   192.168.10.10/24
 
    如果没有设置tunnel,Private Network A是没有办法访问Private Network B中的机器的,设置
    了tunnel之后,两个Private Network中的机器互相访问了。
 
    所需的设置是主要是在两个GRE Router上设置的
    GRE Router A的设置 (gre):
    # modprobe ipgre
    # ip tunnel add.netb mode gre remote 10.71.101.200 local 10.71.101.100 ttl 255
    # ip link set netb up
    # ip addr add 192.168.0.1 dev netb 
    # ip route add 192.168.10.0/24 dev netb      
 
    GRE Router B的设置 (gre):
    # modprobe ipgre
    # ip tunnel add neta mode gre remote 10.71.101.100 local 10.71.101.200 ttl 255
    # ip link set neta up
    # ip addr add 192.168.10.1 dev neta 
    # ip route add 192.168.0.0/24 dev neta
 
   在Private Network A上的主机设置:
   # route add default gw 192.168.0.1     
 
    在Private Network B上的主机设置:
   # route add default gw 192.168.10.1     
 
    对ip/ip tunnel的设置可以通过加载ipip模块,并将ip tunnel命令中的mode改为ipip加以实现。
 
 

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网