首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置6/4隧道服务器

设置6/4隧道服务器
EN

Server Fault用户
提问于 2013-02-04 22:33:05
回答 2查看 12K关注 0票数 3

我想建立一个IPv6 6中的IPv6 4 SIT隧道服务器。我已经梳理过Ubuntu IPv6 wiki页面,但是所有的东西都是为了作为客户端连接到隧道,而不是托管一个。我想使用6in4,因为它是相当简单/通用的,似乎是协商大多数家庭路由器/防火墙没有问题。

这将主要由我们的sysadmin工作人员使用,以便在本机不支持IPv6的DSL/电缆连接上从家里访问它。我想亲自管理这件事的原因有两个:

  1. 我发现像飓风电隧道这样的隧道速度很慢,偶尔也不可靠。
  2. 我不喜欢我们的交通通过他的网络。我们有自己的核心公交网络和IPv6分配从成熟,所以我们可以利用它!

这将由5-10个用户同时使用。

我所拥有的可以作为主机使用的设备:

  • 思科ISRs
  • 思科ASAs
  • 杜松子
  • Linux/Windows服务器(理想情况下是Ubuntu)

提前谢谢。

EN

回答 2

Server Fault用户

回答已采纳

发布于 2013-02-04 22:54:28

如果我没有弄错的话,坐就是对称的:两边都是一样的。

配置应该非常简单:

思科IOS:

代码语言:javascript
复制
interface Tunnel0
 description 6in4 to <client>
 no ip address
 ipv6 enable
 ipv6 address 2001:db8:::1/64
 tunnel source <local ipv4>
 tunnel destination <client ipv4 addr>
 tunnel mode ipv6ip

Juniper JunOS

代码语言:javascript
复制
interfaces {
   ip-0/1/0 {
      unit 0 {
         tunnel {
            source <local ipv4>;
            destination <client ipv4 addr>;
         }
         family inet6 {
            address 2001:db8::1/64;
         }
      }
   }
}

Linux iproute2:

代码语言:javascript
复制
ip tunnel add tun-6in4 mode sit remote <client ipv4 addr> local <local ipv4> 
ip link set tun-6in4  up
ip addr add 2001:db8:::1/64 dev tun-6in4

我在ASA配置方面没有经验,但它也应该是可行的。

然而,有几个缺点,其中6/4:

  • N个节点在枢纽节点上的隧道
  • 为动态IP客户端更新对等ip没有简单的方法。

您可能想了解一下动态VPN技术,例如OpenVPN (解决问题2,尽管设备将动态生成)或tinc (解决两者都解决),或者任何其他能够用tap设备封装以太网(因此是IPv6)的技术。

票数 8
EN

Server Fault用户

发布于 2013-02-05 02:00:07

给一个ISP的员工家庭连接到IPv6是非常重要的。

6in4是对称的,所以你在两端以同样的方式设置隧道(在它们之间形成一个虚拟的“电缆”)。然后按照通常的方式进行路由:“客户”端使用隧道作为默认网关,而“服务器”将前缀沿着相应的隧道路由。最后一位可能需要一些(手动或自动)重新分配的路由。

在Cisco中,在路由协议配置中使用redistribute static是一种简单的方法,但您可能需要筛选重新分发。我通常重新分配‘客户’路线在BGP。它保持IGP (如ISIS或OSPF)更干净,这将有助于你的核心在链接关闭或失败后的收敛速度。而BGP提供了更好的过滤选项。例如,将社区附加到重新分配的路由。

对petrus给出的答案做一些扩展。我会给出思科的表示法,但这将在其他操作系统中以同样的方式工作。

您可以有编号和无编号的链接。编号的链接可能使调试更容易,但它使您的寻址计划更加复杂。在这两种情况下,您都必须将一些地址空间委托给用户。链接上的地址只在链接上使用,用户可能也需要有链接后面的网络地址。因此,将/56/48路由到链接中。

让我们从一个没有编号的链接开始。使用ipv6 enable创建链接,以便在链接上创建链接本地地址。在“服务器”端这样的东西:

代码语言:javascript
复制
interface Tunnel1
 description 6in4 to <client-1>
 no ip address
 ipv6 enable
 tunnel source <local ipv4>
 tunnel destination <client-1 ipv4 addr>
 tunnel mode ipv6ip

interface Tunnel2
 description 6in4 to <client-2>
 no ip address
 ipv6 enable
 tunnel source <local ipv4>
 tunnel destination <client-2 ipv4 addr>
 tunnel mode ipv6ip

ipv6 route 2001:db8:a001::/48 Tunnel 1
ipv6 route 2001:db8:a002::/48 Tunnel 2

router bgp 65530
 address-family ipv6
  redistribute static

在“客户”方面:

代码语言:javascript
复制
interface Tunnel1
 description 6in4 to <server>
 no ip address
 ipv6 enable
 tunnel source <client-1 ipv4>
 tunnel destination <server ipv4 addr>
 tunnel mode ipv6ip

interface FastEthernet0/0
 ipv6 address 2001:db8:a001:1::1/64

ipv6 route ::/0 Tunnel 1

现在编号的链接也是一样的。好处是您可以更容易地平移隧道的另一个端点。在“服务器”端这样的东西:

代码语言:javascript
复制
interface Tunnel1
 description 6in4 to <client-1>
 no ip address
 ipv6 address 2001:db8:0:a001::1/64
 tunnel source <local ipv4>
 tunnel destination <client-1 ipv4 addr>
 tunnel mode ipv6ip

interface Tunnel2
 description 6in4 to <client-2>
 no ip address
 ipv6 address 2001:db8:0:a002::1/64
 tunnel source <local ipv4>
 tunnel destination <client-2 ipv4 addr>
 tunnel mode ipv6ip

ipv6 route 2001:db8:a001::/48 2001:db8:0:a001::2
ipv6 route 2001:db8:a002::/48 2001:db8:0:a002::2

router bgp 65530
 address-family ipv6
  redistribute static
  redistribute connected

在“客户”方面:

代码语言:javascript
复制
interface Tunnel1
 description 6in4 to <server>
 no ip address
 ipv6 address 2001:db8:0:a001::2/64
 tunnel source <client-1 ipv4>
 tunnel destination <server ipv4 addr>
 tunnel mode ipv6ip

interface FastEthernet0/0
 ipv6 address 2001:db8:a001:1::1/64

ipv6 route ::/0 2001:db8:0:a001::1

为了方便起见,我选择2001:db8:0:a001::/64作为与委托2001:db8:a001::/48相关的点对点链接。你可以选择任何你喜欢的前缀,但是保持一个像IPv6一样大的地址空间可以帮助你识别.

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/475375

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档