01-MSR系列路由器6PE配置举例
本章节下载: 01-MSR系列路由器6PE配置举例 (153.28 KB)
MSR系列路由器6PE的典型配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍在MPLS网络中使用6PE的典型配置举例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解6PE的特性。
如图1所示,MPLS骨干网为IPv4网络,CE 1和CE 2为IPv6站点,在PE路由器上运行IPv4和IPv6双栈协议,分别与骨干网和CE站点连接。现要求:在PE路由器上使能6PE,使得CE间通过MPLS网络相互转发报文。
图1 MSR路由器6PE配置举例组网图
设备 |
接口 |
IP地址/IPv6地址 |
设备 |
接口 |
IP地址/IPv6地址 |
CE 1 |
Loop0 |
1.1.1.1/32 |
CE 2 |
Loop0 |
4.4.4.4/32 |
|
Loop0 |
2001:1:5:2::28:0/128 |
|
Loop0 |
2001:1:5:5::28:0/128 |
6PE 1 |
Loop0 |
2.2.2.2/32 |
6PE 2 |
Loop0 |
3.3.3.3/32 |
|
Loop0 |
2001:1:5:4::1/128 |
|
Loop0 |
2001:1:5:3::1/128 |
|
GE0/0 |
192.168.1.1/24 |
|
GE0/0 |
192.168.1.2/24 |
为了使IPv6 CE站点的报文转发至MPLS骨干网中,需要在6PE上将BGP IPv6地址族路由与CE到6PE的IPv6路由相互重分布到对方中去。
本举例是在Release 2311版本上进行配置和验证的。
· IPv6网络中的6PE和CE设备,需要先使能IPv6转发功能。
· 6PE之间的IPv4/MPLS连接需要建立成功。
· 为节约IPv6地址的使用,连接6PE和CE的接口IPv6地址可使用auto link-local地址。
# 全局开启IPv6功能。
<CE1>system-view
[CE1] ipv6
# 配置接口地址,使能OSPFv3协议。
[CE1] interface loopback 0
[CE1-LoopBack0] ipv6 address 2001:1:5:2::28:0/128
[CE1-LoopBack0] ip address 1.1.1.1 255.255.255.255
[CE1-LoopBack0] ospfv3 1 area 0.0.0.1
[CE1-LoopBack0] quit
[CE1] interface ethernet 0/1
[CE1-Ethernet0/1] ipv6 address auto link-local
[CE1-Ethernet0/1] ospfv3 1 area 1
[CE1-Ethernet0/1] quit
# 配置OSPFv3的Router ID。
[CE1]ospfv3 1
[CE1-ospfv3-1]router-id 1.1.1.1
[CE1-ospfv3-1]quit
# 全局开启IPv6功能。
<CE2>system-view
[CE2] ipv6
# 配置接口地址,使能OSPFv3协议。
[CE2] interface loopback 0
[CE2-LoopBack0] ipv6 address 2001:1:5:5::28:0/128
[CE2-LoopBack0] ip address 4.4.4.4 255.255.255.255
[CE2-LoopBack0] ospfv3 1 area 0.0.0.1
[CE2-LoopBack0] quit
[CE2] interface ethernet 0/1
[CE2-Ethernet0/1] port link-mode route
[CE2-Ethernet0/1] ipv6 address auto link-local
[CE2-Ethernet0/1] ospfv3 1 area 0.0.0.1
[CE2-Ethernet0/1] quit
# 配置OSPFv3的Router ID。
[CE]ospfv3 1
[CE2-ospfv3-1]router-id 4.4.4.4
[CE2-ospfv3-1]quit
# 全局开启IPv6功能。
<6PE1> system-view
[6PE1] ipv6
# 配置接口IP地址,使能OSPFv3协议。
[6PE1] interface loopback 0
[6PE1-LoopBack0] ipv6 address 2001:1:5:4::1/128
[6PE1-LoopBack0] ip address 2.2.2.2 255.255.255.255
[6PE1-LoopBack0] ospfv3 1 area 0.0.0.1
[6PE1-LoopBack0] quit
[6PE1] interface ethernet 0/1
[6PE1-Ethernet0/1] ipv6 address auto link-local
[6PE1-Ethernet0/1] ospfv3 1 area 0.0.0.1
[6PE1-Ethernet0/1] quit
[6PE1] interface ethernet 0/0
[6PE1-Ethernet0/0] ip address 192.168.1.1 255.255.255.0
[6PE1-Ethernet0/0] quit
# 配置OSPFv3的Router ID。
[6PE1] ospfv3 1
[6PE1-ospfv3-1] router-id 2.2.2.2
[6PE1-ospfv3-1] quit
# 配置OSPF路由协议,触发LSP的建立。
[6PE1] ospf 1
[6PE1-ospf-1] area 0.0.0.0
[6PE1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[6PE1-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[6PE1-ospf-1-area-0.0.0.0] quit
[6PE1-ospf-1] quit
# 配置Router ID及MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[6PE1] router id 2.2.2.2
[6PE1] mpls lsr-id 2.2.2.2
[6PE1] mpls
[6PE1-mpls] lsp-trigger all
[6PE1-mpls] mpls ldp
[6PE1-mpls-ldp] quit
# 在接口Ethernet0/0配置MPLS和MPLS LDP功能,建立LDP LSP。
[6PE1] interface ethernet0/0
[6PE1-Ethernet0/0] mpls
[6PE1-Ethernet0/0] mpls ldp
[6PE1-Ethernet0/0] quit
# 配置BGP路由协议,在6PE之间建立MP-IBGP,并将IPv6的直连和OSPFv3路由重分布到BGP IPv6地址族中。
[6PE1] bgp 100
[6PE1-bgp] peer 3.3.3.3 as-number 100
[6PE1-bgp] peer 3.3.3.3 connect-interface loopback 0
[6PE1-bgp] ipv6-family
[6PE1-bgp-af-ipv6] import-route direct
[6PE1-bgp-af-ipv6] import-route ospfv3 1
[6PE1-bgp-af-ipv6] undo synchronization
[6PE1-bgp-af-ipv6] peer 3.3.3.3 enable
[6PE1-bgp-af-ipv6] peer 3.3.3.3 label-route-capability
[6PE1-bgp-af-ipv6] quit
[6PE1-bgp] quit
# 配置OSPFv3路由重分布到BGP中。
[6PE1] ospfv3 1
[6PE1-ospfv3-1] import-route bgp4+
[6PE1-ospfv3-1] quit
# 全局开启IPv6功能。
<6PE2> system-view
[6PE2] ipv6
# 配置接口IP地址,使能OSPFv3协议。
[6PE2] interface loopback 0
[6PE2-LoopBack0] ipv6 address 2001:1:5:3::1/128
[6PE2-LoopBack0] ip address 3.3.3.3 255.255.255.255
[6PE2-LoopBack0] ospfv3 1 area 0.0.0.1
[6PE2-LoopBack0] quit
[6PE2] interface ethernet 0/1
[6PE2-Ethernet0/1] ipv6 address auto link-local
[6PE2-Ethernet0/1] ospfv3 1 area 0.0.0.1
[6PE2-Ethernet0/1] quit
[6PE2] interface ethernet 0/0
[6PE2-Ethernet0/0] port link-mode route
[6PE2-Ethernet0/0] ip address 192.168.1.2 255.255.255.0
# 配置OSPFv3的Router ID。
[6PE2] ospfv3 1
[6PE2-ospfv3-1] router-id 3.3.3.3
[6PE2-ospfv3-1] quit
# 配置OSPF路由协议,触发LSP的建立。
[6PE2] ospf 1
[6PE2-ospf-1] area 0.0.0.0
[6PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[6PE2-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[6PE2-ospf-1-area-0.0.0.0] quit
[6PE2-ospf-1] quit
# 配置Router ID及MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[6PE2] router id 3.3.3.3
[6PE2] mpls lsr-id 3.3.3.3
[6PE2] mpls
[6PE2-mpls] lsp-trigger all
[6PE2-mpls] mpls ldp
[6PE2-mpls-ldp] quit
# 在接口Ethernet0/1配置MPLS和MPLS LDP功能,建立LDP LSP。
[6PE2] interface ethernet0/0
[6PE2-Ethernet0/0] mpls
[6PE2-Ethernet0/0] mpls ldp
[6PE2-Ethernet0/0] quit
# 配置BGP路由协议,在6PE之间建立MP-IBGP,并将IPv6的直连和OSPFv3路由重分布到BGP IPv6地址族中。
[6PE2] bgp 100
[6PE2-bgp] peer 2.2.2.2 as-number 100
[6PE2-bgp] peer 2.2.2.2 connect-interface loopback 0
[6PE2-bgp] ipv6-family
[6PE2-bgp-af-ipv6] import-route direct
[6PE2-bgp-af-ipv6] import-route ospfv3 1
[6PE2-bgp-af-ipv6] peer 2.2.2.2 enable
[6PE2-bgp-af-ipv6] peer 2.2.2.2 label-route-capability
[6PE2-bgp-af-ipv6] quit
[6PE2-bgp] quit
# 配置OSPFv3路由重分布到BGP中。
[6PE2] ospfv3 1
[6PE2-ospfv3-1] import-route bgp4+
[6PE2-ospfv3-1] quit
# 在路由器6PE 1使用display mpls lsp命令可查看LSP信息,显示本地IPv6路由和本地分配的标签。
<6PE1> display mpls lsp
--------------------------------------------------------------------------
LSP Information: LDP LSP
--------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
3.3.3.3/32 NULL/3 -/Eth0/0
2.2.2.2/32 3/NULL -/InLoop0
--------------------------------------------------------------------------
LSP Information: BGP IPV6 LSP
--------------------------------------------------------------------------
FEC : ::1
In Label : 1025 Out Label : NULL
In Interface : ----- Out Interface: -----
Vrf Name :
FEC : FE80::20F:E2FF:FE78:1FD9
In Label : 1026 Out Label : NULL
In Interface : ----- Out Interface: -----
Vrf Name :
# 在路由器6PE 1使用display bgp ipv6 routing-table命令查看IPv6路由信息,在IPv6路由表中显示有BGP4+的路由。
<6PE1> display bgp ipv6 routing-table
Total Number of Routes: 4
BGP Local router ID is 2.2.2.2
Status codes: * - valid, ^ - VPN best, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
* > Network : 2001:1:5:2::28:0 PrefixLen : 128
NextHop : :: LocPrf :
PrefVal : 0 Label : NULL
MED : 1
Path/Ogn: ?
* >i Network : 2001:1:5:3::1 PrefixLen : 128
NextHop : ::FFFF:3.3.3.3 LocPrf : 100
PrefVal : 0 Label : 1025
MED : 0
Path/Ogn: ?
* > Network : 2001:1:5:4::1 PrefixLen : 128
NextHop : :: LocPrf :
PrefVal : 0 Label : NULL
MED : 0
Path/Ogn: ?
* >i Network : 2001:1:5:5::28:0 PrefixLen : 128
NextHop : ::FFFF:3.3.3.3 LocPrf : 100
PrefVal : 0 Label : 1026
MED : 1
Path/Ogn: ?
# 在CE 1上可以Ping通CE 2的IPv6地址(LoopBack0接口上的IPv6地址)。
<CE1> ping ipv6 2001:1:5:5::28:0
PING 2001:1:5:5::28:0 : 56 data bytes, press CTRL_C to break
Reply from 2001:1:5:5::28:0
bytes=56 Sequence=0 hop limit=62 time = 1 ms
Reply from 2001:1:5:5::28:0
bytes=56 Sequence=1 hop limit=62 time = 1 ms
Reply from 2001:1:5:5::28:0
bytes=56 Sequence=2 hop limit=62 time = 1 ms
Reply from 2001:1:5:5::28:0
bytes=56 Sequence=3 hop limit=62 time = 1 ms
Reply from 2001:1:5:5::28:0
bytes=56 Sequence=4 hop limit=62 time = 3 ms
--- 2001:1:5:5::28:0 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/3 ms
· CE 1:
#
sysname CE1
#
router id 1.1.1.1
#
ipv6
#
interface LoopBack0
ipv6 address 2001:1:5:2::28:0/128
ip address 1.1.1.1 255.255.255.255
ospfv3 1 area 0.0.0.1
#
interface Ethernet0/1
ipv6 address auto link-local
ospfv3 1 area 0.0.0.1
#
ospfv3 1
router-id 1.1.1.1
area 0.0.0.1
#
· CE 2:
#
sysname CE2
#
router id 4.4.4.4
#
ipv6
#
interface LoopBack0
ipv6 address 2001:1:5:5::28:0/128
ip address 4.4.4.4 255.255.255.255
ospfv3 1 area 0.0.0.1
#
interface Ethernet0/1
port link-mode route
ipv6 address auto link-local
ospfv3 1 area 0.0.0.1
#
ospfv3 1
router-id 4.4.4.4
area 0.0.0.1
#
· 6PE 1:
#
sysname 6PE1
#
router id 2.2.2.2
#
ipv6
#
mpls lsr-id 2.2.2.2
#
mpls
lsp-trigger all
#
mpls ldp
#
interface LoopBack0
ipv6 address 2001:1:5:4::1/128
ip address 2.2.2.2 255.255.255.255
ospfv3 1 area 0.0.0.1
#
interface Ethernet0/0
ip address 192.168.1.1 255.255.255.0
mpls
mpls ldp
#
interface Ethernet0/1
ipv6 address auto link-local
ospfv3 1 area 0.0.0.1
#
bgp 100
undo synchronization
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
#
ipv6-family
import-route direct
import-route ospfv3 1
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 label-route-capability
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ospfv3 1
router-id 2.2.2.2
import-route bgp4+
area 0.0.0.1
#
· 6PE 2:
#
sysname 6PE2
#
router id 3.3.3.3
#
ipv6
#
mpls lsr-id 3.3.3.3
#
password-recovery enable
#
mpls
lsp-trigger all
#
mpls ldp
#
interface LoopBack0
ipv6 address 2001:1:5:3::1/128
ip address 3.3.3.3 255.255.255.255
ospfv3 1 area 0.0.0.1
#
interface Ethernet0/0
port link-mode route
ip address 192.168.1.2 255.255.255.0
mpls
mpls ldp
#
interface Ethernet0/1
port link-mode route
ipv6 address auto link-local
ospfv3 1 area 0.0.0.1
#
bgp 100
undo synchronization
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
#
ipv6-family
import-route direct
import-route ospfv3 1
undo synchronization
peer 2.2.2.2 enable
peer 2.2.2.2 label-route-capability
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ospfv3 1
router-id 3.3.3.3
import-route bgp4+
area 0.0.0.1
#
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!