H3C ISATAP 隧道和 6to4 隧道相结合使用的典型配置举例 Copyright 2017 新华三技术有限公司版权所有, 保留一切权利 非经本公司书面许可, 任何单位和个人不得擅自摘抄 复制本文档内容的部分或全部, 并不得以任何形式传播 本文档中的信息可能变动, 恕不另行通知
目录 1 简介 1 2 配置前提 1 3 ISATAP 隧道和 6to4 隧道相结合使用的典型配置举例 1 3.1 组网需求 1 3.2 配置思路 2 3.3 使用版本 2 3.4 配置注意事项 2 3.5 配置步骤 2 3.6 验证配置 5 3.7 配置文件 5 4 相关资料 7 i
1 简介 本文档介绍了 ISATAP 隧道和 6to4 隧道相结合使用的典型配置举例 2 配置前提 本文档中的配置均是在实验室环境下进行的配置和验证, 配置前设备的所有参数均采用出厂时的缺省配置 如果您已经对设备进行了配置, 为了保证配置效果, 请确认现有配置和以下举例中的配置不冲突 本文假设您已了解 ISATAP 隧道和 6to4 隧道的相关特性 3 ISATAP 隧道和 6to4 隧道相结合使用的典型配置举例 3.1 组网需求 如图 3-1 所示, 要求 : 通过配置 6to4 隧道使各 6to4 网络分支机构与总部中的主机能够互通 Device A 提供 ISATAP 接入服务使一些 IPv4 网络中的双协议栈主机可以访问总部 图 3-1 ISATAP 隧道和 6to4 隧道相结合使用的配置组网图 设备 接口 IP 地址 设备 接口 IP 地址 Device A Vlan-int10 2.1.1.1/24 Device B Vlan-int10 3.1.1.1/24 1
设备 接口 IP 地址 设备 接口 IP 地址 Vlan-int20 2002:0201:0101:1::1/64 Vlan-int20 2002:0301:0101:1::1/64 Vlan-int30 2002:0201:0101:2::1/64 Vlan-int30 2002:0301:0101:2::1/64 Tunnel 1 3001::1/64 Tunnel 1 3001::2/64 Tunnel 2 2001::5EFE:0201:0101/64 3.2 配置思路 组网中的 6to4 网络可以表示为 2002:IPv4 地址 ::/64, 其中内嵌在 IPv6 地址中的 IPv4 地址作为 6to4 隧道中封装后的 IPv4 报文头中的目的 IP 地址 组网中的 ISATAP 主机地址的 IPv6 前缀可通过向 ISATAP 路由器发送请求得到,IPv4 地址作为接口 ID, 其格式为 :Prefix:0:5EFE:IPv4-destination-address 该 IPv4 地址可以作为 ISATAP 隧道的目的端地址 为保证同一网络中的主机使用相同的地址前缀, 在 Device A 和 Device B 上取消对 RA 消息发布的抑制, 使得网络中的主机可以通过 Device A 和 Device B 发布的 RA 消息获取地址前缀等信息 3.3 使用版本 本举例是在 S7500X-CMW710-R7536P05 版本上进行配置和验证的 3.4 配置注意事项 隧道封装后的报文不能根据目的地址和路由表进行第二次三层转发, 需要将封装后的报文发送给业务环回组, 由业务环回组将报文回送给转发模块后, 再进行三层转发 因此, 需要创建 tunnel 类型的业务环回组, 以实现隧道报文的接收和发送 3.5 配置步骤 配置之前, 请确保网关设备之间 IPv4 报文路由可达 (1) 配置 Device A 配置接口 Vlan-interface10 的 IP 地址 <DeviceA> system-view [DeviceA] vlan 10 [DeviceA-vlan10] port GigabitEthernet 1/0/1 [DeviceA-vlan10] quit [DeviceA] interface vlan-interface 10 [DeviceA-Vlan-interface10] ip address 2.1.1.1 24 [DeviceA-Vlan-interface10] quit 请参考以上方法配置图 3-1 中 Device A 其它接口的 IP 地址, 配置步骤这里省略 2
创建业务环回组 1, 并配置服务类型为 tunnel [DeviceA] service-loopback group 1 type tunnel 将接口 GigabitEthernet1/0/4 加入业务环回组 1 [DeviceA] interface gigabitethernet 1/0/4 [DeviceA-GigabitEthernet1/0/4] port service-loopback group 1 [DeviceA-GigabitEthernet1/0/4] quit 创建模式为 6to4 隧道的接口 Tunnel1 [DeviceA] interface tunnel 1 mode ipv6-ipv4 6to4 配置 Tunnel1 接口的 IPv6 地址 [DeviceA-Tunnel1] ipv6 address 3001::1/64 配置 Tunnel1 接口的源接口为 Vlan-interface10( 封装后的 IPv4 报文头中的源 IP 地址为配置的源接口的 IP 地址 ) [DeviceA-Tunnel1] source vlan-interface 10 [DeviceA-Tunnel1] quit 配置到目的地址 2002:0301:0101::/48, 下一跳为 Tunnel1 接口的静态路由 [DeviceA] ipv6 route-static 2002:0301:0101:: 48 tunnel 1 创建模式为 ISATAP 隧道的接口 Tunnel2 [DeviceA] interface tunnel 2 mode ipv6-ipv4 isatap 配置 Tunnel2 接口的 IPv6 地址 [DeviceA-Tunnel2] ipv6 address 2001::5EFE:0201:0101 64 配置 Tunnel2 接口的源接口为 Vlan-interface10( 封装后的 IPv4 报文头中的源 IP 地址为配置的源接口的 IP 地址 ) [DeviceA-Tunnel2] source vlan-interface 10 [DeviceA-Tunnel2] quit 配置到目的地址 2001::/16, 下一跳为 Tunnel2 接口的静态路由 [DeviceA] ipv6 route-static 2001:: 16 tunnel 2 取消对 RA 消息发布的抑制, 使主机可以通过交换机发布的 RA 消息获取地址前缀等信息 [DeviceA] interface Tunnel 2 [DeviceA-Tunnel2] [DeviceA-Tunnel2] quit [DeviceA] interface vlan-interface 20 [DeviceA-Vlan-interface20] [DeviceA-Vlan-interface20] quit [DeviceA] interface vlan-interface 30 [DeviceA-Vlan-interface30] [DeviceA-Vlan-interface30] quit (2) 配置 Device B 配置接口 Vlan-interface10 的 IP 地址 <DeviceB> system-view [DeviceB] vlan 10 [DeviceB-vlan10] port GigabitEthernet 1/0/1 [DeviceB-vlan10] quit [DeviceB] interface vlan-interface 10 [DeviceB-Vlan-interface10] ip address 3.1.1.1 24 [DeviceB-Vlan-interface10] quit 3
请参考以上方法配置图 3-1 中 Device B 其它接口的 IP 地址, 配置步骤这里省略 创建业务环回组 1, 并配置服务类型为 tunnel [DeviceB] service-loopback group 1 type tunnel 将接口 GigabitEthernet1/0/4 加入业务环回组 1 [DeviceB] interface gigabitethernet 1/0/4 [DeviceB-GigabitEthernet1/0/4] port service-loopback group 1 [DeviceB-GigabitEthernet1/0/4] quit 创建模式为 6to4 隧道的接口 Tunnel1 [DeviceB] interface tunnel 1 mode ipv6-ipv4 6to4 配置 Tunnel1 接口的 IPv6 地址 [DeviceB-Tunnel1] ipv6 address 3001::2/64 配置 Tunnel1 接口的源接口为 Vlan-interface10( 封装后的 IPv4 报文头中的源 IP 地址为配置的源接口的 IP 地址 ) [DeviceB-Tunnel1] source vlan-interface 10 [DeviceB-Tunnel1] quit 配置到目的地址 2002:0201:0101::/48, 下一跳为 Tunnel1 接口的静态路由 [DeviceB] ipv6 route-static 2002:0201:0101:: 48 tunnel 1 取消对 RA 消息发布的抑制, 使主机可以通过交换机发布的 RA 消息获取地址前缀等信息 [DeviceB] interface vlan-interface 20 [DeviceB-Vlan-interface20] [DeviceB-Vlan-interface20] quit [DeviceB] interface vlan-interface 30 [DeviceB-Vlan-interface30] [DeviceB-Vlan-interface30] quit (3) 配置 ISATAP 主机 ISATAP 主机上的具体配置与主机的操作系统有关, 下面仅以 Windows XP 操作系统为例进行说明 在主机上安装 IPv6 协议 C:\>ipv6 install 配置 ISATAP 隧道 C:\>netsh interface ipv6 isatap set router 2.1.1.1 完成上述配置后, 查看 ISATAP 接口的信息 C:\>ipv6 if 2 Interface 2: Automatic Tunneling Pseudo-Interface Guid {48FCE3FC-EC30-E50E-F1A7-71172AEEE3AE} does not use Neighbor Discovery uses Router Discovery routing preference 1 EUI-64 embedded IPv4 address: 1.1.1.2 router link-layer address: 2.1.1.1 preferred global 2001::5efe:1.1.1.2, life 29d23h59m46s/6d23h59m46s (public) preferred link-local fe80::5efe:1.1.1.2, life infinite link MTU 1500 (true link MTU 65515) current hop limit 255 reachable time 42500ms (base 30000ms) retransmission interval 1000ms 4
DAD transmits 0 default site prefix length 48 我们可以看到主机获取了 2001::/64 的前缀, 自动生成全球单播地址 2001::5efe:1.1.1.2, 同时还有一行信息 uses Router Discovery 表明主机启用了路由器发现 查看主机上的 IPv6 路由信息 C:\>ipv6 rt 2001::/64 -> 2 pref 1if+8=9 life 29d23h59m43s (autoconf) ::/0 -> 2/fe80::5efe:1.1.1.1 pref 1if+256=257 life 29m43s (autoconf) 3.6 验证配置 完成以上配置之后,Host A 与 Host B 可以互相 Ping 通 D:\>ping6 -s 2002:0201:0101:1::2 2002:0301:0101:1::2 Pinging 2002:0301:0101:1::2 from 2002:0201:0101:1::2 with 32 bytes of data: Reply from 2002:0301:0101:1::2: bytes=32 time=13ms Reply from 2002:0301:0101:1::2: bytes=32 time=1ms Reply from 2002:0301:0101:1::2: bytes=32 time=1ms Reply from 2002:0301:0101:1::2: bytes=32 time<1ms Ping statistics for 2002:0301:0101:1::2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 13ms, Average = 3ms 在 ISATAP 主机上 Ping Host A 的地址, 可以 Ping 通 C:\Documents and Settings\Administrator>pingv6 2002:0201:0101:1::2 Pinging 2002:0201:0101:1::2 with 32 bytes of data: Reply from 2002:0201:0101:1::2: time=33ms Reply from 2002:0201:0101:1::2: time=32ms Reply from 2002:0201:0101:1::2: time=32ms Reply from 2002:0201:0101:1::2: time=33ms Ping statistics for 2002:0201:0101:1::2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 32ms, Maximum = 33ms, Average = 32ms 3.7 配置文件 Device A service-loopback group 1 type tunnel 5
vlan 10 vlan 20 vlan 30 interface Vlan-interface10 ip address 2.1.1.1 255.255.255.0 interface Vlan-interface20 ipv6 address 2002:201:101:1::1/64 interface Vlan-interface30 ipv6 address 2002:201:101:2::1/64 interface GigabitEthernet1/0/1 port access vlan 10 interface GigabitEthernet1/0/2 port access vlan 20 interface GigabitEthernet1/0/3 port access vlan 30 interface GigabitEthernet1/0/4 port service-loopback group 1 interface Tunnel1 mode ipv6-ipv4 6to4 source Vlan-interface10 ipv6 address 3001::1/64 interface Tunnel2 mode ipv6-ipv4 isatap source Vlan-interface10 ipv6 address 2001::5EFE:201:101/64 ipv6 route-static 2001:: 16 Tunnel2 ipv6 route-static 2002:301:101:: 48 Tunnel1 Device B service-loopback group 1 type tunnel 6
vlan 10 vlan 20 vlan 30 interface Vlan-interface10 ip address 3.1.1.1 255.255.255.0 interface Vlan-interface20 ipv6 address 2002:301:101:1::1/64 interface Vlan-interface30 ipv6 address 2002:301:101:2::1/64 interface GigabitEthernet1/0/1 port access vlan 10 interface GigabitEthernet1/0/2 port access vlan 20 interface GigabitEthernet1/0/3 port access vlan 30 interface GigabitEthernet1/0/4 port service-loopback group 1 interface Tunnel1 mode ipv6-ipv4 6to4 source Vlan-interface10 ipv6 address 3001::2/64 ipv6 route-static 2002:201:101:: 48 Tunnel1 4 相关资料 H3C S7500X 系列交换机三层技术 -IP 业务配置指导 -R7536P05 H3C S7500X 系列交换机三层技术 -IP 业务命令参考 -R7536P05 7