配置IETF模式的DS-TE示例(RDM模型)
本例描述了配置IETF模式的DS-TE的过程。
组网需求
如图3-27所示,MPLS骨干网的PE和P节点运行IS-IS协议实现互通,P节点不支持MPLS LDP。PE1和PE2接入VPN-A和VPN-B。PE3和PE4之间需要建立经过PE1、PE2和P节点的LDP LSP。
VPN-A的流量分为EF、AF两者类型;VPN-B流量分为EF、AF、BE三种类型;LDP LSP中的流量为BE类型。各流量的QoS需求如下:
数据流 |
带宽 |
---|---|
VPN-A的EF流 |
100Mbit/s |
VPN-A的AF流 |
50Mbit/s |
VPN-B的EF流 |
100Mbit/s |
VPN-B的AF流 |
50Mbit/s |
VPN-B的BE流 |
50Mbit/s |
LDP LSP的BE流 |
50Mbit/s |
要求:在PE1和PE2之间建立DS-TE隧道传递以上流量,并满足各流量的QoS需求。带宽约束模型要求为RDM,允许CTi抢占低优先级的CTj的带宽(0≤i<j≤7),以确保高优先级CT的带宽。
配置思路
采用如下的思路配置IETF模式的DS-TE示例(RDM模型):
- VPN-A和VPN-B的流量类型部分相同(都有EF流和AF流),需要用两条TE隧道分别承载VPN-A和VPN-B。
- VPN-B和LDP LSP的流量类型也有部分相同,因此也需要用不同隧道承载。
- VPN-A和LDP LSP的流量类型各不相同,且流量类型共有3种,使用同一条TE隧道承载。
- 建立两条RSVP-TE隧道Tunnel1和Tunnel2。其中,每个隧道配置单个CT,对应的优先级都为0。
- 两条隧道的路径一样,因此链路上BCi带宽应不小于所有TE隧道的CTi~CT7带宽的总和,且链路的最大可预留带宽应不小于BC0带宽。所以,链路可预留带宽≥BC0的带宽=400Mbit/s。
- 两条TE隧道的同类型业务,带宽要求一样,因此配置TE隧道时使用CT模板。
数据准备
为完成此配置例,需准备如下的数据:
- PE和P节点上的LSR ID
- TE隧道的Tunnel接口编号
- TE-Class映射表
- 各链路的最大可预留带宽值及链路上各BC的带宽值
- VPN-A和VPN-B的VPN实例名称、Route-Distinguisher、VPN-Target、隧道策略名称
操作步骤
- 在PE和P节点上配置各接口IP地址,并配置IS-IS,实现PE和P的互通
具体配置过程略。
完成此步骤后,PE1、P、PE2之间应能建立IS-IS邻居关系,执行display ip routing-table命令可以看到PE之间学习到对方的Loopback1路由。
- 在所有PE和P节点上配置LSR-ID、使能MPLS,并在PE1、PE2和P上使能MPLS TE和RSVP-TE,在所有PE上使能MPLS
LDP
# 配置PE3。
<PE3> system-view
[~PE3] mpls lsr-id 4.4.4.9 [*PE3] mpls [*PE3] commit [~PE3-mpls] quit [*PE3] mpls ldp [*PE3] commit [~PE3-mpls-ldp] quit [~PE3] interface gigabitethernet 0/1/0 [*PE3-GigabitEthernet0/1/0] mpls [*PE3-GigabitEthernet0/1/0] mpls ldp [*PE3-GigabitEthernet0/1/0] commit [~PE3-GigabitEthernet0/1/0] quit
# 配置PE1。
<PE1> system-view
[~PE1] mpls lsr-id 1.1.1.9 [*PE1] mpls [*PE1-mpls] mpls te [*PE1-mpls] mpls rsvp-te [*PE1-mpls] commit [~PE1-mpls] quit [*PE1] mpls ldp [*PE1-mpls-ldp] commit [~PE1-mpls-ldp] quit [~PE1] interface gigabitethernet 0/3/0 [*PE1-GigabitEthernet0/3/0] mpls [*PE1-GigabitEthernet0/3/0] mpls te [*PE1-GigabitEthernet0/3/0] mpls rsvp-te [*PE1-GigabitEthernet0/3/0] commit [~PE1-GigabitEthernet0/3/0] quit [~PE1] interface gigabitethernet 0/1/8 [*PE1-GigabitEthernet0/1/8] mpls [*PE1-GigabitEthernet0/1/8] mpls ldp [*PE1-GigabitEthernet0/1/8] commit [~PE1-GigabitEthernet0/1/8] quit
# 配置P。
<P> system-view
[~P] mpls lsr-id 2.2.2.9 [*P] mpls [*P-mpls] mpls te [*P-mpls] mpls rsvp-te [*P-mpls] commit [~P-mpls] quit [~P] interface gigabitethernet 0/1/0 [*P-GigabitEthernet0/1/0] mpls [*P-GigabitEthernet0/1/0] mpls te [*P-GigabitEthernet0/1/0] mpls rsvp-te [*P-GigabitEthernet0/1/0] commit [~P-GigabitEthernet0/1/0] quit [~P] interface gigabitethernet 0/2/0 [*P-GigabitEthernet0/2/0] mpls [*P-GigabitEthernet0/2/0] mpls te [*P-GigabitEthernet0/2/0] mpls rsvp-te [*P-GigabitEthernet0/2/0] commit [~P-GigabitEthernet0/2/0] quit
# 配置PE2。
<PE2> system-view
[~PE2] mpls lsr-id 3.3.3.9 [*PE2] mpls [*PE2-mpls] mpls te [*PE2-mpls] mpls rsvp-te [*PE2-mpls] commit [~PE2-mpls] quit [*PE2] mpls ldp [*PE2-mpls] commit [~PE2-mpls] quit [~PE2] interface gigabitethernet 0/3/0 [*PE2-GigabitEthernet0/3/0] mpls [*PE2-GigabitEthernet0/3/0] mpls te [*PE2-GigabitEthernet0/3/0] mpls rsvp-te [*PE2-GigabitEthernet0/3/0] commit [~PE2-GigabitEthernet0/3/0] quit [~PE2] interface gigabitethernet 0/1/8 [*PE2-GigabitEthernet0/1/8] mpls [*PE2-GigabitEthernet0/1/8] mpls ldp [*PE2-GigabitEthernet0/1/8] commit [~PE2-GigabitEthernet0/1/8] quit
# 配置PE4。
<PE4> system-view
[~PE4] mpls lsr-id 5.5.5.9 [*PE4] mpls [*PE4-mpls] commit [~PE4-mpls] quit [*PE4] mpls ldp [*PE4-mpls] commit [~PE4-mpls-ldp] quit [~PE4] interface gigabitethernet 0/1/0 [*PE4-GigabitEthernet0/1/0] mpls [*PE4-GigabitEthernet0/1/0] mpls ldp [*PE4-GigabitEthernet0/1/0] commit [~PE4-GigabitEthernet0/1/0] quit
完成此步骤后,在PE1、PE2或P节点上执行display mpls rsvp-te interface命令,可查看使能了RSVP的接口及RSVP相关信息。在PE1、PE2、PE3或PE4上执行命令display mpls ldp lsp,可发现PE3和PE1之间,以及PE2和PE4之间存在一条LDP LSP。
- 在PE1、PE2和P上配置IS-IS TE,并使能CSPF
# 在所有节点上配置IS-IS TE,并在TE隧道入节点上使能CSPF。
# 配置PE1。
[~PE1] isis 1 [~PE1-isis-1] cost-style wide [*PE1-isis-1] traffic-eng level-1-2 [*PE1-isis-1] commit [~PE1-isis-1] quit [~PE1] mpls [~PE1-mpls] mpls te cspf [*PE1-mpls] commit
# 配置P。
[~P] isis 1 [~P-isis-1] cost-style wide [*P-isis-1] traffic-eng level-1-2 [*P-isis-1] commit [~P-isis-1] quit
# 配置PE2。
[~PE2] isis 1 [~PE2-isis-1] cost-style wide [*PE2-isis-1] traffic-eng level-1-2 [*PE2-isis-1] commit [~PE2-isis-1] quit [~PE2] mpls [~PE2-mpls] mpls te cspf [*PE2-mpls] commit [~PE2-mpls] quit
完成此步骤后,在PE或P节点上执行display isis lsdb命令,可查看IS-IS链路状态数据库信息。
- 在PE1、PE2和P节点上配置DS-TE模式和带宽约束模型
# 配置PE1。
[~PE1] mpls [~PE1-mpls] mpls te ds-te mode ietf [*PE1-mpls] mpls te ds-te bcm rdm [*PE1-mpls] commit [~PE1-mpls] quit
# 配置P。
[~P] mpls [~P-mpls] mpls te ds-te mode ietf [*P-mpls] mpls te ds-te bcm rdm [*P-mpls] commit [~P-mpls] quit
# 配置PE2。
[~PE2] mpls [~PE2-mpls] mpls te ds-te mode ietf [*PE2-mpls] mpls te ds-te bcm rdm [*PE2-mpls] commit [~PE2-mpls] quit
完成此步骤后,在PE或P节点上执行display mpls te ds-te summary命令,可查看DS-TE的配置信息。以PE1为例:
[~PE1] display mpls te ds-te summary DS-TE IETF Supported :YES DS-TE MODE :IETF Bandwidth Constraint Model :RDM TEClass Mapping (configured): TE-Class ID Class Type Priority TE-Class 0 0 0 TE-Class 1 1 0 TE-Class 2 2 0 TE-Class 3 3 0 TE-Class 4 0 7 TE-Class 5 1 7 TE-Class 6 2 7 TE-Class 7 3 7
- 在PE和P节点上配置链路带宽
# 配置PE1。
[~PE1] interface gigabitethernet 0/3/0 [~PE1-GigabitEthernet0/3/0] mpls te bandwidth max-reservable-bandwidth 400000 [*PE1-GigabitEthernet0/3/0] mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 [*PE1-GigabitEthernet0/3/0] commit [~PE1-GigabitEthernet0/3/0] quit
# 配置P。
[~P] interface gigabitethernet 0/1/0 [~P-GigabitEthernet0/1/0] mpls te bandwidth max-reservable-bandwidth 400000 [*P-GigabitEthernet0/1/0] mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 [*P-GigabitEthernet0/1/0] commit [~P-GigabitEthernet0/1/0] quit [~P] interface gigabitethernet 0/2/0 [~P-GigabitEthernet0/2/0] mpls te bandwidth max-reservable-bandwidth 400000 [*P-GigabitEthernet0/2/0] mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 [~P-GigabitEthernet0/2/0] quit
# 配置PE2。
[~PE2] interface gigabitethernet 0/3/0 [~PE2-GigabitEthernet0/3/0] mpls te bandwidth max-reservable-bandwidth 400000 [*PE2-GigabitEthernet0/3/0] mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 [~PE2-GigabitEthernet0/3/0] quit
完成此步骤后,在PE上执行命令,可查看接口的BC带宽分配情况。以PE1为例:
[~PE1] display mpls te link-administration bandwidth-allocation interface gigabitethernet 0/3/0 Link ID: GigabitEthernet0/3/0 Bandwidth Constraint Model : Russian Dolls Model (RDM) Physical Link Bandwidth(Kbits/sec) : - Maximum Link Reservable Bandwidth(Kbit/sec): 400000 Reservable Bandwidth BC0(Kbit/sec) : 400000 Reservable Bandwidth BC1(Kbit/sec) : 300000 Reservable Bandwidth BC2(Kbit/sec) : 200000 Reservable Bandwidth BC3(Kbit/sec) : 0 Reservable Bandwidth BC4(Kbit/sec) : 0 Reservable Bandwidth BC5(Kbit/sec) : 0 Reservable Bandwidth BC6(Kbit/sec) : 0 Reservable Bandwidth BC7(Kbit/sec) : 0 Downstream Bandwidth (Kbit/sec) : 0 IPUpdown Link Status : UP PhysicalUpdown Link Status : UP ---------------------------------------------------------------------- TE-CLASS CT PRIORITY BW RESERVED BW AVAILABLE DOWNSTREAM (Kbit/sec) (Kbit/sec) RSVPLSPNODE COUNT ---------------------------------------------------------------------- 0 0 0 0 400000 0 1 1 0 0 300000 0 2 2 0 0 200000 0 3 0 7 0 400000 0 4 1 7 0 300000 0 5 2 7 0 200000 0 6 - - - - - 7 - - - - - 8 - - - - - 9 - - - - - 10 - - - - - 11 - - - - - 12 - - - - - 13 - - - - - 14 - - - - - 15 - - - - - ----------------------------------------------------------------------
- 在PE上配置TE-Class映射表
# 配置PE1。
[~PE1] te-class-mapping [~PE1-te-class-mapping] te-class0 class-type ct0 priority 0 description For-BE [*PE1-te-class-mapping] te-class1 class-type ct1 priority 0 description For-AF [*PE1-te-class-mapping] te-class2 class-type ct2 priority 0 description For-EF [*PE1-te-class-mapping] commit [~PE1-te-class-mapping] quit
# 配置PE2。
[~PE2] te-class-mapping [~PE2-te-class-mapping] te-class0 class-type ct0 priority 0 description For-BE [*PE2-te-class-mapping] te-class1 class-type ct1 priority 0 description For-AF [*PE2-te-class-mapping] te-class2 class-type ct2 priority 0 description For-EF [*PE2-te-class-mapping] commit [~PE2-te-class-mapping] quit
完成此步骤后,在PE上执行display mpls te ds-te te-class-mapping命令,可查看TE-Class映射表的信息。以PE1为例:
[~PE1] display mpls te ds-te te-class-mapping TE-Class ID Class Type Priority Description TE-Class0 0 0 For-BE TE-Class1 1 0 For-AF TE-Class2 2 0 For-EF TE-Class3 - - - TE-Class4 - - - TE-Class5 - - - TE-Class6 - - - TE-Class7 - - -
- 在PE上配置显式路径
# 配置PE1。
[~PE1] explicit-path path1 [*PE1-explicit-path-path1] next hop 10.10.1.2 [*PE1-explicit-path-path1] next hop 10.11.1.2 [*PE1-explicit-path-path1] next hop 3.3.3.9 [*PE1-explicit-path-path1] commit [~PE1-explicit-path-path1] quit
# 配置PE2。
[~PE2] explicit-path path1 [*PE2-explicit-path-path1] next hop 10.11.1.1 [*PE2-explicit-path-path1] next hop 10.10.1.1 [*PE2-explicit-path-path1] next hop 1.1.1.9 [*PE2-explicit-path-path1] commit [~PE2-explicit-path-path1] quit
完成此步骤后,在PE上执行display explicit-path命令,可查看显式路径信息。以PE1为例:
[~PE1] display explicit-path path1 Path Name : path1 Path Status : Enabled 1 10.10.1.2 Strict Include 2 10.11.1.2 Strict Include 3 3.3.3.9 Strict Include
- 在PE上配置Tunnel接口
# 配置PE1。
[~PE1] interface tunnel1 [*PE1-Tunnel1] description For VPN-A & Non-VPN [*PE1-Tunnel1] ip address unnumbered interface loopback 1 [*PE1-Tunnel1] tunnel-protocol mpls te [*PE1-Tunnel1] destination 3.3.3.9 [*PE1-Tunnel1] mpls te tunnel-id 1 [*PE1-Tunnel1] mpls te signal-protocol rsvp-te [*PE1-Tunnel1] mpls te path explicit-path path1 [*PE1-Tunnel1] mpls te priority 0 0 [*PE1-Tunnel1] mpls te bandwidth ct0 50000 [*PE1-Tunnel1] mpls te reserved-for-binding [*PE1-Tunnel1] commit [~PE1-Tunnel1] quit [~PE1] interface tunnel2 [*PE1-Tunnel2] description For VPN-B [*PE1-Tunnel2] ip address unnumbered interface loopback 1 [*PE1-Tunnel2] tunnel-protocol mpls te [*PE1-Tunnel2] destination 3.3.3.9 [*PE1-Tunnel2] mpls te tunnel-id 2 [*PE1-Tunnel2] mpls te signal-protocol rsvp-te [*PE1-Tunnel2] mpls te path explicit-path path1 [*PE1-Tunnel2] mpls te priority 0 0 [*PE1-Tunnel2] mpls te bandwidth ct0 50000 [*PE1-Tunnel2] mpls te reserved-for-binding [*PE1-Tunnel2] commit [~PE1-Tunnel2] quit
# 配置PE2。
[~PE2] interface tunnel1 [*PE2-Tunnel1] description For VPN-A & Non-VPN [*PE2-Tunnel1] ip address unnumbered interface loopback 1 [*PE2-Tunnel1] tunnel-protocol mpls te [*PE2-Tunnel1] destination 1.1.1.9 [*PE2-Tunnel1] mpls te tunnel-id 1 [*PE2-Tunnel1] mpls te signal-protocol rsvp-te [*PE2-Tunnel1] mpls te path explicit-path path1 [*PE2-Tunnel1] mpls te priority 0 0 [*PE2-Tunnel1] mpls te bandwidth ct0 50000 [*PE2-Tunnel1] mpls te reserved-for-binding [*PE2-Tunnel1] commit [~PE2-Tunnel1] quit [~PE2] interface tunnel2 [*PE2-Tunnel2] description For VPN-B [*PE2-Tunnel2] ip address unnumbered interface loopback 1 [*PE2-Tunnel2] tunnel-protocol mpls te [*PE2-Tunnel2] destination 1.1.1.9 [*PE2-Tunnel2] mpls te tunnel-id 2 [*PE2-Tunnel2] mpls te signal-protocol rsvp-te [*PE2-Tunnel2] mpls te path explicit-path path1 [*PE2-Tunnel2] mpls te priority 0 0 [*PE2-Tunnel2] mpls te bandwidth ct0 50000 [*PE2-Tunnel2] mpls te reserved-for-binding [*PE2-Tunnel2] commit [~PE2-Tunnel2] quit
在PE上执行display interface tunnel interface-number命令,可发现Tunnel接口为Up状态。以PE1的Tunnel1为例:
[~PE1] display interface tunnel1 Tunnel1 current state : UP(ifindex: 27) Line protocol current state : UP Description: For VPN-A & Non-VPN Route Port,The Maximum Transmit Unit is 1500 Internet Address is unnumbered, using address of LoopBack0(1.1.1.9/32) Encapsulation is TUNNEL, loopback not set Tunnel destination 3.3.3.9 Tunnel up/down statistics 0 Tunnel ct0 bandwidth is 0 Kbit/sec Tunnel protocol/transport MPLS/MPLS, ILM is disabled primary tunnel id is 0x0, secondary tunnel id is 0x0 Current system time: 2017-07-19 06:46:59 0 seconds output rate 0 bits/sec, 0 packets/sec 0 seconds output rate 0 bits/sec, 0 packets/sec 0 packets output, 0 bytes 0 output error 0 output drop Last 300 seconds input utility rate: -- Last 300 seconds output utility rate: --
在PE上执行display mpls te te-class-tunnel命令,可查看TE-CLASS关联的TE隧道。以PE1为例:
[~PE1] display mpls te te-class-tunnel all ------------------------------------------------------------------------ No. CT priority status tunnel name tunnel commit ------------------------------------------------------------------------ 1 0 0 Valid Tunnel1 Yes 2 0 0 Valid Tunnel2 Yes
- 在PE之间建立MP-IBGP对等体,PE与CE之间建立EBGP对等体
# 配置PE1。
[~PE1] bgp 100 [*PE1-bgp] peer 3.3.3.9 as-number 100 [*PE1-bgp] peer 3.3.3.9 connect-interface loopback 1 [*PE1-bgp] ipv4-family vpnv4 [*PE1-bgp-af-vpnv4] peer 3.3.3.9 enable [*PE1-bgp-af-vpnv4] commit [~PE1-bgp-af-vpnv4] quit [~PE1-bgp] ipv4-family vpn-instance vpna [*PE1-bgp-vpna] peer 10.1.1.1 as-number 65410 [*PE1-bgp-vpna] import-route direct [*PE1-bgp-vpna] commit [~PE1-bgp-vpna] quit [~PE1-bgp] ipv4-family vpn-instance vpnb [*PE1-bgp-vpnb] peer 10.2.1.1 as-number 65420 [*PE1-bgp-vpnb] import-route direct [*PE1-bgp-vpnb] commit [~PE1-bgp-vpnb] quit
PE2的配置与PE1类似,配置过程省略。# 配置CE1。
[~CE1] bgp 65410 [*CE1-bgp] peer 10.1.1.2 as-number 100 [*CE1-bgp] import-route direct [*CE1-bgp] commit
另外3个CE(CE2~CE4)配置与CE1配置类似,配置过程省略。配置完成后,在PE上执行display bgp vpnv4 all peer命令,可以看到PE之间的BGP对等体关系已建立,并达到Established状态。
[~PE1] display bgp vpnv4 all peer BGP local router ID : 1.1.1.9 Local AS number : 100 Total number of peers : 3 Peers in established state : 3 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 3.3.3.9 4 100 12 18 0 00:09:38 Established 0 Peer of vpn instance: VPN-Instance vpna, Router ID 1.1.1.9: 10.1.1.1 4 65410 25 25 0 00:17:57 Established 1 VPN-Instance vpnb, Router ID 1.1.1.9: 10.2.1.1 4 65420 21 22 0 00:17:10 Established 1
- 在PE上配置隧道策略
# 配置PE1。
[~PE1] tunnel-policy policya [*PE1-tunnel-policy-policya] tunnel binding destination 3.3.3.9 te tunnel 1 [*PE1-tunnel-policy-policya] commit [~PE1-tunnel-policy-policya] quit [~PE1] tunnel-policy policyb [*PE1-tunnel-policy-policyb] tunnel binding destination 3.3.3.9 te tunnel 2 [*PE1-tunnel-policy-policyb] commit [~PE1-tunnel-policy-policyb] quit
# 配置PE2。
[~PE2] tunnel-policy policya [*PE2-tunnel-policy-policya] tunnel binding destination 1.1.1.9 te tunnel 1 [*PE2-tunnel-policy-policya] commit [~PE2-tunnel-policy-policya] quit [~PE2] tunnel-policy policyb [*PE2-tunnel-policy-policyb] tunnel binding destination 1.1.1.9 te tunnel 2 [*PE2-tunnel-policy-policyb] commit [~PE2-tunnel-policy-policyb] quit
- 在PE上配置VPN实例,将CE接入PE
# 配置PE1。
[~PE1] ip vpn-instance vpna [*PE1-vpn-instance-vpna] ipv4-family [*PE1-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*PE1-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*PE1-vpn-instance-vpna-af-ipv4] tnl-policy policya [*PE1-vpn-instance-vpna-af-ipv4] commit [~PE1-vpn-instance-vpna-af-ipv4] quit [~PE1-vpn-instance-vpna] quit [~PE1] ip vpn-instance vpnb [*PE1-vpn-instance-vpna] ipv4-family [*PE1-vpn-instance-vpnb-af-ipv4] route-distinguisher 100:2 [*PE1-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both [*PE1-vpn-instance-vpnb-af-ipv4] tnl-policy policyb [*PE1-vpn-instance-vpnb-af-ipv4] commit [~PE1-vpn-instance-vpnb-af-ipv4] quit [~PE1-vpn-instance-vpnb] quit [~PE1] interface gigabitethernet 0/1/0 [*PE1-GigabitEthernet0/1/0] ip binding vpn-instance vpna [*PE1-GigabitEthernet0/1/0] ip address 10.1.1.2 24 [*PE1-GigabitEthernet0/1/0] commit [~PE1-GigabitEthernet0/1/0] quit [*PE1] interface gigabitethernet 0/2/0 [*PE1-GigabitEthernet0/2/0] ip binding vpn-instance vpnb [*PE1-GigabitEthernet0/2/0] ip address 10.2.1.2 24 [*PE1-GigabitEthernet0/2/0] commit [~PE1-GigabitEthernet0/2/0] quit
# 配置PE2。
[~PE2] ip vpn-instance vpna [*PE2-vpn-instance-vpna] ipv4-family [*PE2-vpn-instance-vpna-af-ipv4] route-distinguisher 200:1 [*PE2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*PE2-vpn-instance-vpna-af-ipv4] tnl-policy policya [*PE2-vpn-instance-vpna-af-ipv4] commit [~PE2-vpn-instance-vpna-af-ipv4] quit [~PE2-vpn-instance-vpna] quit [~PE2] ip vpn-instance vpnb [*PE2-vpn-instance-vpnb] ipv4-family [*PE2-vpn-instance-vpnb-af-ipv4] route-distinguisher 200:2 [*PE2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both [*PE2-vpn-instance-vpnb-af-ipv4] tnl-policy policyb [*PE2-vpn-instance-vpnb-af-ipv4] commit [~PE2-vpn-instance-vpnb-af-ipv4] quit [~PE2-vpn-instance-vpnb] quit [~PE2] interface gigabitethernet 0/1/0 [*PE2-GigabitEthernet0/1/0] ip binding vpn-instance vpna [*PE2-GigabitEthernet0/1/0] ip address 10.3.1.2 24 [*PE2-GigabitEthernet0/1/0] commit [~PE2-GigabitEthernet0/1/0] quit [~PE2] interface gigabitethernet 0/2/0 [*PE2-GigabitEthernet0/2/0] ip binding vpn-instance vpnb [*PE2-GigabitEthernet0/2/0] ip address 10.4.1.2 24 [*PE2-GigabitEthernet0/2/0] commit [~PE2-GigabitEthernet0/2/0] quit
# 配置各CE的接口IP地址,配置过程略。
配置完成后,在PE上执行display ip vpn-instance verbose命令可以看到VPN实例的配置情况。各PE能ping通自己接入的CE。
配置文件
PE1的配置文件
# sysname PE1 # ip vpn-instance vpna ipv4-family route-distinguisher 100:1 tnl-policy policya vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # ip vpn-instance vpnb ipv4-family route-distinguisher 100:2 tnl-policy policyb vpn-target 222:2 export-extcommunity vpn-target 222:2 import-extcommunity #
mpls lsr-id 1.1.1.9 mpls mpls te mpls te ds-te mode ietf mpls rsvp-te # mpls ldp # mpls ldp remote-peer pe1tope2 remote-ip 3.3.3.9 # explicit-path path1 next hop 10.10.1.2 next hop 10.11.1.2 next hop 3.3.3.9 # te-class-mapping te-class0 class-type ct0 priority 0 description For-BE te-class1 class-type ct1 priority 0 description For-AF te-class2 class-type ct2 priority 0 description For-EF # interface Tunnel1 description For VPN-A & Non-VPN ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 1 mpls te priority 0 mpls te bandwidth ct0 50000 .mpls te reserved-for-binding mpls te path explicit-path path1 mpls te igp advertise mpls te igp metric absolute 1 commit mpls # interface Tunnel2 description For VPN-B ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 2 mpls te priority 0 mpls te bandwidth ct0 50000 .mpls te reserved-for-binding mpls te path explicit-path path1 commit # bgp 100 peer 3.3.3.9 as-number 100 peer 3.3.3.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.9 enable # ipv4-family vpnv4 policy vpn-target peer 3.3.3.9 enable # ipv4-family vpn-instance vpna peer 10.1.1.1 as-number 65410 import-route direct # ipv4-family vpn-instance vpnb peer 10.2.1.1 as-number 65420 import-route direct # isis 1 is-level level-1 cost-style wide traffic-eng level-1 # tunnel-policy policya tunnel binding destination 3.3.3.9 te Tunnel1 # tunnel-policy policyb tunnel binding destination 3.3.3.9 te Tunnel2 # return
P的配置文件
# sysname P # mpls lsr-id 2.2.2.9 mpls mpls te mpls te ds-te mode ietf mpls rsvp-te # interface GigabitEthernet1/0/0 undo shutdown ip address 10.10.1.2 255.255.255.0 mpls mpls te mpls te bandwidth max-reservable-bandwidth 400000 mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 mpls rsvp-te # interface GigabitEthernet2/0/0 undo shutdown ip address 10.11.1.1 255.255.255.0 mpls mpls te mpls te bandwidth max-reservable-bandwidth 400000 mpls te bandwidth bc0 400000 bc1 300000 bc2 200000 mpls rsvp-te # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # isis 1 is-level level-1 cost-style wide traffic-eng level-1 # return
PE2的配置文件
# sysname PE2 # ip vpn-instance vpna ipv4-family route-distinguisher 200:1 tnl-policy policya vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # ip vpn-instance vpnb ipv4-family route-distinguisher 200:2 tnl-policy policyb vpn-target 222:2 export-extcommunity vpn-target 222:2 import-extcommunity #
mpls lsr-id 3.3.3.9 mpls mpls te mpls te ds-te mode ietf mpls te rsvp-te # mpls ldp # mpls ldp remote-peer pe2tope1 remote-ip 1.1.1.9 # explicit-path path1 next hop 10.10.1.1 next hop 10.11.1.1 next hop 1.1.1.9 # te-class-mapping te-class0 class-type ct0 priority 0 description For-EF te-class1 class-type ct1 priority 0 description For-AF te-class2 class-type ct2 priority 0 description For-BE # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # interface Tunnel1 description For VPN-A & Non-VPN ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.9 mpls te tunnel-id 1 mpls te priority 0 mpls te bandwidth ct0 50000 .mpls te reserved-for-binding mpls te path explicit-path path1 commit # interface Tunnel2 description For VPN-B ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.9 mpls te tunnel-id 2 mpls te priority 0 mpls te bandwidth ct0 50000 .mpls te reserved-for-binding mpls te path explicit-path path1 commit # bgp 100 peer 1.1.1.9 as-number 100 peer 1.1.1.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.9 enable # ipv4-family vpnv4 policy vpn-target peer 1.1.1.9 enable # ipv4-family vpn-instance vpna peer 10.3.1.1 as-number 65430 import-route direct # ipv4-family vpn-instance vpnb peer 10.4.1.1 as-number 65440 import-route direct # isis 1 is-level level-1 cost-style wide traffic-eng level-1 # tunnel-policy policya tunnel binding destination 1.1.1.9 te Tunnel1 # tunnel-policy policyb tunnel binding destination 1.1.1.9 te Tunnel2 # return
- PE3的配置文件
# sysname PE3 # mpls lsr-id 4.4.4.9 mpls # mpls ldp # interface GigabitEthernet0/1/0 undo shutdown ip address 10.5.1.2 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 4.4.4.9 255.255.255.255 # isis 1 is-level level-1 cost-style wide traffic-eng level-1 # return
PE4的配置文件
# sysname PE4 # mpls lsr-id 5.5.5.9 mpls # mpls ldp # interface GigabitEthernet0/1/0 undo shutdown ip address 10.6.1.2 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 5.5.5.9 255.255.255.255 # isis 1 is-level level-1 cost-style wide traffic-eng level-1 # return
CE1的配置文件
# sysname CE1 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.1.1.1 255.255.255.0 # bgp 65410 peer 10.1.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.2 enable # return
CE2的配置文件
# sysname CE2 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.2.1.1 255.255.255.0 # bgp 65420 peer 10.2.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.2.1.2 enable # return
CE3的配置文件
# sysname CE3 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.3.1.1 255.255.255.0 # bgp 65430 peer 10.3.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.3.1.2 enable # return
CE4的配置文件
# sysname CE4 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.4.1.1 255.255.255.0 # bgp 65440 peer 10.4.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.4.1.2 enable # return