IP : IP 版本 6 (IPv6)

在MPLS VPN的IPv6

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

IP 版本 6 (IPv6) 是设计用于替换 IP 版本 4 (IPv4) 的新 IP 版本,目前在全世界得到了广泛的部署和应用。IPv6 的优点主要在于具有大得多的地址空间,能满足 Internet 扩张和 Internet 设备急剧增加之后的需求。

IPv6 VPN 在 IPv6 接口或子接口上通过 PE 路由器连接到服务提供商 (SP) 骨干网。该站点可支持 IPv4 和 IPv6。每个 IPv6 VPN 都有自己的地址空间,这意味着在不同的 VPN 中由指定地址表示不同的系统。这通过可在 IP 地址开头添加路由区分符的全新 address-family(VPN-IPv6 或 VPNv6 address-family)实现。

一个 VPNv6 地址为 24 字节,以 8 字节的 RD 开始,以 16 字节的 IPv6 地址结束。如果站点支持 IPv4 和 IPv6,则同一 RD 可用于对 IPv4 和 IPv6 地址进行通告。

先决条件

要求

本文档没有任何特定的要求。

注意: 对于IPv6在一些平台的虚拟路由和转发(VRF)支持(例如, 7600系列路由器),您在全局配置方面将需要配置MLS IPv6 VRF

使用的组件

本文档不限于特定的软件和硬件版本。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 有关本文档所用命令的详细信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

ipv6-over-mpls-vpn-01.gif

VRF 配置

CE1 路由器
ipv6 unicast-routing
ipv6 cef
!
interface Serial 0/0
 ipv6 address 2001:1::1/124
!
interface Loopback 0
 ipv6 address ABCD::1/128
!

CE2 路由器
ipv6 unicast-routing
ipv6 cef
!
interface Serial 0/0
 ipv6 address 2001:2::1/124
!
interface Loopback 0
 ipv6 address ABCD::2/128
!

6VPE1 路由器
ipv6 unicast-routing
ipv6 cef
!
mpls label protocol ldp
mpls ldp router-id Loopback 0 force

!
!----- The VRF is defined with vrf definition <vrf-name> and is made IPv6 aware
!

vrf definition CUST1
 rd 1:1
 !
 address-family ipv6
 route-target import 1:1
 route-target export 1:1
 exit-address-family
!
interface Serial 0/0
 vrf forwarding CUST1
 ipv6 address 2001:1::2/124
!
interface Loopback 0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!

6VPE2 路由器
ipv6 unicast-routing
ipv6 cef
!
mpls label protocol ldp
mpls ldp router-id Loopback 0 force
!
vrf definition CUST1
 rd 1:1
 !
 address-family ipv6
 route-target import 1:1
 route-target export 1:1
 exit-address-family
!
interface Serial 0/0
 vrf forwarding CUST1
 ipv6 address 2001:2::2/124
!
interface Loopback 0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 1 area 0
!

多协议 BGP (MP-BGP) 配置

在 6VPE 路由器上为 iBGP 连接配置了 Address-family VPNv6。在 6VPE 和 CE 路由器之间具有 eBGP 连接。

CE1 路由器
router bgp 65101
 neighbor 2001:1::2 remote-as 100
 !
 address-family ipv6
 neighbor 2001:1::2 activate
 network ABCD::1/128
 exit-address-family
!

6VPE1 路由器
router bgp 100
 neighbor 3.3.3.3 remote-as 100
 neighbor 3.3.3.3 update-source Loopback 0
 !
 address-family vpnv6
 neighbor 3.3.3.3 activate
 exit-address-family
 !
 address-family ipv6 vrf CUST1
 neighbor 2001:1::1 remote-as 65101
 neighbor 2001:1::1 activate
 redistribute connected
 exit-address-family
!

CE2 路由器
router bgp 65102
 neighbor 2001:2::2 remote-as 100
 !
 address-family ipv6
 neighbor 2001:2::2 activate
 network ABCD::2/128
 exit-address-family
!

6VPE2 路由器
router bgp 100
 neighbor 1.1.1.1 remote-as 100
 neighbor 1.1.1.1 update-source Loopback 0
 !
 address-family vpnv6
 neighbor 1.1.1.1 activate
 exit-address-family
 !
 address-family ipv6 vrf CUST1
 neighbor 2001:2::1 remote-as 65102
 neighbor 2001:2::1 activate
 redistribute connected
 exit-address-family
!

验证

BGP 下一跳地址

6VPE2# 
show bgp vpnv6 unicast vrf CUST1
BGP table version is 30, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf CUST1)
*>i2001:1::/124     ::FFFF:1.1.1.1           0    100      0 ?
*> 2001:2::/124     ::                       0         32768 ?
*>iABCD::1/128      ::FFFF:1.1.1.1           0    100      0 65101 i
*> ABCD::2/128      2001:2::1                0             0 65102 i

6VPE2# show bgp vpnv6 unicast vrf CUST1 ABCD::1/128
BGP routing table entry for [1:1]ABCD::1/128, version 30
Paths: (1 available, best #1, table CUST1)
  Advertised to update-groups:
        2
  65101
    ::FFFF:1.1.1.1 (metric 3) from 1.1.1.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Extended Community: RT:1:1
      mpls labels in/out nolabel/20

附加标签

当 6VPE 路由器收到来自所连 CE 路由器的数据包时,它会在与该 CE 路由器对应的 VRF 表中查找数据包 IPv6 目标地址。从而找到 VPNv6 路由。VPNv6 路由具有相关的 MPLS 标签(顶部标签)和相关的 BGP 下一跳标签(底部标签)。

6VPE2# show bgp vpnv6 unicast vrf CUST1 ABCD::1/128
BGP routing table entry for [1:1]ABCD::1/128, version 30
Paths: (1 available, best #1, table CUST1)
  Advertised to update-groups:
        2
  65101
    ::FFFF:1.1.1.1 (metric 3) from 1.1.1.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Extended Community: RT:1:1
      mpls labels in/out nolabel/20

6VPE2# 
show ip cef 1.1.1.1
1.1.1.1/32
  nexthop 10.2.2.1 FastEthernet2/0 label 16

6VPE2# 
show ipv6 cef vrf CUST1 ABCD::1/128 detail
ABCD::1/128, epoch 0
  recursive via 1.1.1.1 label 20
    nexthop 10.2.2.1 FastEthernet2/0 label 16

向 CE 路由器发出通告的 IPv6 前缀

show ipv6 route bgp 命令显示路由器获取的 BGP 路由。

CE1# show ipv6 route bgp
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
B   2001:2::/124 [20/0]
     via FE80::C808:17FF:FE2C:0, Serial0/0
B   ABCD::2/128 [20/0]
     via FE80::C808:17FF:FE2C:0, Serial0/0
CE2# show ipv6 route bgp
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
B   2001:1::/124 [20/0]
     via FE80::C809:14FF:FEB4:0, Serial0/0
B   ABCD::1/128 [20/0]
     via FE80::C809:14FF:FEB4:0, Serial0/0

故障排除

使用本部分可排除配置故障。

BGP 功能协商

MP-BGP 用于在 MP_REACH NLRI 中通告 IPv6 VPN 路由。

注意: 使用的地址族标识符/后续地址族标识符 (AFI/SAFI) 为 2/128。AFI 的值为 2,代表 IPv6;SAFI 的值为 128,代表标记为 VPNv6 的 MPLS。

debug ip bgp

21:10:10.387: BGP: 3.3.3.3 went from Active to OpenSent
21:10:10.391: BGP: 3.3.3.3 sending OPEN, version 4, my as: 100, holdtime 180
    seconds
21:10:10.395: BGP: 3.3.3.3 send message type 1, length (incl. header) 61
21:10:10.579: BGP: 3.3.3.3 rcv message type 1, length (excl. header) 42
21:10:10.579: BGP: 3.3.3.3 rcv OPEN, version 4, holdtime 180 seconds
21:10:10.583: BGP: 3.3.3.3 rcv OPEN w/ OPTION parameter len: 32
21:10:10.583: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability)
    len 6
21:10:10.583: BGP: 3.3.3.3 OPEN has CAPABILITY code: 1, length 4
21:10:10.587: BGP: 3.3.3.3 OPEN has MP_EXT CAP for afi/safi: 1/1
21:10:10.587: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability)
    len 6
21:10:10.587: BGP: 3.3.3.3 OPEN has CAPABILITY code: 1, length 4
21:10:10.587: BGP: 3.3.3.3 OPEN has MP_EXT CAP for afi/safi: 2/128
21:10:10.591: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability)
    len 2
21:10:10.591: BGP: 3.3.3.3 OPEN has CAPABILITY code: 128, length 0
21:10:10.591: BGP: 3.3.3.3 OPEN has ROUTE-REFRESH capability(old) for all
    address-families
21:10:10.591: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability)
    len 2
21:10:10.595: BGP: 3.3.3.3 OPEN has CAPABILITY code: 2, length 0
21:10:10.595: BGP: 3.3.3.3 OPEN has ROUTE-REFRESH capability(new) for all 
    address-families
21:10:10.595: BGP: 3.3.3.3 rcvd OPEN w/ optional parameter type 2 (Capability)
    len 6
21:10:10.595: BGP: 3.3.3.3 OPEN has CAPABILITY code: 65, length 4
21:10:10.599: BGP: 3.3.3.3 OPEN has 4-byte ASN CAP for: 100
BGP: 3.3.3.3 rcvd OPEN w/ remote AS 100, 4-byte remote AS 100
21:10:10.599: BGP: 3.3.3.3 went from OpenSent to OpenConfirm
21:10:10.603: BGP: 3.3.3.3 went from OpenConfirm to Established
21:10:10.603: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Up
21:10:11.547: %BGP-5-ADJCHANGE: neighbor 2001:1::1 vpn vrf CUST1 Up
6VPE1# show bgp vpnv6 unicast all neighbors
BGP neighbor is 3.3.3.3,  remote AS 100, internal link
  BGP version 4, remote router ID 3.3.3.3
  BGP state = Established, up for 00:05:32
  Last read 00:00:30, last write 00:00:20, hold time is 180, keepalive interval
      is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(new)
    New ASN Capability: advertised and received
    Address family IPv4 Unicast: advertised and received
    Address family VPNv6 Unicast: advertised and received

    !
    !---output omitted
    !

BGP neighbor is 2001:1::1,  vrf CUST1,  remote AS 65101, external link
  BGP version 4, remote router ID 10.210.0.1
  BGP state = Established, up for 00:05:54
  Last read 00:00:54, last write 00:00:43, hold time is 180, keepalive interval
      is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(new)
    New ASN Capability: advertised
    Address family IPv6 Unicast: advertised and received

    !
    !---output omitted
    !

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 112085