配置CCC本地连接接入L3VPN示例
CCC(Circuit Cross Connect)本地连接支持通过VE-Group接入L3VPN。
配置思路
采用如下的思路配置CCC本地连接接入L3VPN的基本功能:
- 配置各设备IP地址。
- 配置PE1和PE2之间的公网路由,并发布loopback接口地址。
- 在PE1和PE2上使能MPLS、MPLS LDP。并在PE1上使能MPLS L2VPN。
- 在PE1上配置CCC本地连接
- PE1和PE2上配置L3VPN
操作步骤
- 配置各设备IP地址。具体配置过程略,详细请参考配置文件。
- 配置PE1和PE2之间的公网路由,并发布loopback接口地址。本举例以IS-IS为例,具体配置过程略,详细请参考配置文件。
- 在PE1和PE2上使能MPLS、MPLS LDP。并在PE1上使能MPLS L2VPN。具体配置过程略,详细请参考配置文件。
- 在PE1上配置CCC本地连接
- PE1和PE2上配置L3VPN
- 验证配置结果。CE1和CE2之间能够相互ping通。以CE1为例:
<CE1> ping 10.10.2.1
PING 10.10.2.1: 56 data bytes, press CTRL_C to break
Reply from 10.10.2.1: bytes=56 Sequence=1 ttl=255 time=180 ms
Reply from 10.10.2.1: bytes=56 Sequence=2 ttl=255 time=60 ms
Reply from 10.10.2.1: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 10.10.2.1: bytes=56 Sequence=4 ttl=255 time=70 ms
Reply from 10.10.2.1: bytes=56 Sequence=5 ttl=255 time=60 ms
--- 10.10.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/76/180 ms
配置文件
CE1的配置文件
# sysname CE1 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 # bgp 65010 peer 10.1.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.2 enable # return
PE1的配置文件
# sysname PE1 # ip vpn-instance VPN1 ipv4-family route-distinguisher 200:1 apply-label per-instance vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # mpls lsr-id 4.4.4.4 mpls # mpls l2vpn # mpls ldp isis 1 network-entity 10.0000.0000.0004.00 # interface GigabitEthernet1/0/1 undo shutdown ip address 10.10.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/0 undo shutdown # interface Virtual-Ethernet1/0/0 ve-group 1 l2-terminate # interface Virtual-Ethernet1/0/0.1 vlan-type dot1q 100 # interface Virtual-Ethernet1/0/1 ve-group 1 l3-access # interface Virtual-Ethernet1/0/1.1 vlan-type dot1q 100 ip binding vpn-instance VPN1 ip address 10.1.1.2 255.255.255.0 # ccc ccc-ve interface GigabitEthernet1/0/0 out-interface Virtual-Ethernet1/0/0.1 # interface LoopBack0 ip address 4.4.4.4 255.255.255.255 isis enable 1 # bgp 100 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable # ipv4-family vpnv4 policy vpn-target peer 2.2.2.2 enable # ipv4-family vpn-instance VPN1 import-route direct peer 10.1.1.1 as-number 65010 # return
PE2的配置文件
# sysname PE2 # ip vpn-instance VPN1 ipv4-family route-distinguisher 200:1 apply-label per-instance vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # mpls lsr-id 2.2.2.2 mpls # mpls ldp # isis 1 network-entity 10.0000.0000.0003.00 # interface GigabitEthernet1/0/1 undo shutdown ip binding vpn-instance VPN1 ip address 10.10.2.2 255.255.255.0 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.10.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 isis enable 1 # bgp 100 peer 4.4.4.4 as-number 100 peer 4.4.4.4 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 4.4.4.4 enable # ipv4-family vpnv4 policy vpn-target peer 4.4.4.4 enable # ipv4-family vpn-instance VPN1 import-route direct peer 10.10.2.1 as-number 65020 # return
CE2的配置文件
# sysname CE2 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.10.2.1 255.255.255.0 # bgp 65020 peer 10.10.2.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.10.2.2 enable # return