配置CCC本地连接示例
CCC(Circuit Cross Connect)本地连接是在两个本地CE之间建立的连接,即,两个CE连在同一个PE上。PE的作用类似二层交换机,可以直接完成交换,不需要配置LSP。
配置思路
采用如下的思路配置CCC本地连接的基本功能:
在PE上配置MPLS基本能力,使能MPLS L2VPN。
在PE上创建一条从CE1到CE2的本地连接。CCC本地连接是双向的,因此只需要创建一条连接。
操作步骤
- 配置CE
# 配置CE1。
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit
[~CE1] interface gigabitethernet 1/0/0
[*CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 24
[*CE1-GigabitEthernet1/0/0] undo shutdown
[*CE1-GigabitEthernet1/0/0] commit
[~CE1-GigabitEthernet1/0/0] quit
# 配置CE2。
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] interface gigabitethernet 1/0/0
[*CE2-GigabitEthernet1/0/0] ip address 10.1.1.2 24
[*CE2-GigabitEthernet1/0/0] undo shutdown
[*CE2-GigabitEthernet1/0/0] commit
[~CE2-GigabitEthernet1/0/0] quit
- 配置PE
# 配置LSR ID,使能MPLS和MPLS L2VPN。
<HUAWEI> system-view
[~HUAWEI] sysname PE
[*HUAWEI] commit
[~PE] interface loopback 1
[*PE-LoopBack1] ip address 1.1.1.9 32
[*PE-LoopBack1] quit
[*PE] mpls lsr-id 1.1.1.9
[*PE] mpls
[*PE-mpls] quit
[*PE] mpls l2vpn
[*PE-l2vpn] quit
[*PE] interface gigabitethernet 1/0/0
[*PE-GigabitEthernet1/0/0] undo shutdown
[*PE-GigabitEthernet1/0/0] quit
[*PE] interface gigabitethernet 2/0/0
[*PE-GigabitEthernet2/0/0] undo shutdown
[*PE-GigabitEthernet2/0/0] commit
[~PE-GigabitEthernet2/0/0] quit
# 创建CE1到CE2的本地连接。
[~PE] ccc ce1-ce2 interface gigabitethernet 1/0/0 out-interface gigabitethernet 2/0/0
[*PE] commit
- 验证配置结果
配置完成后,在PE上查看CCC连接信息,可以看到建立了一条CCC本地连接,状态为UP。
<PE> display vll ccc
total ccc vc : 1 local ccc vc : 1, 1 up remote ccc vc : 0, 0 up name: ce1-ce2, type: local, state: up, intf1: GigabitEthernet1/0/0 (up),access-port: false intf2: GigabitEthernet2/0/0 (up),access-port: false VC last up time : 2012/03/08 05:13:10 VC total up time: 0 days, 0 hours, 0 minutes, 14 seconds
在PE上执行命令display l2vpn ccc-interface vc-type all,可以看到VC Type为CCC,状态为up。
<PE> display l2vpn ccc-interface vc-type all
Total ccc-interface of CCC: 2 up (2), down (0) Interface Encap Type State VC Type GigabitEthernet1/0/0 ethernet up ccc GigabitEthernet2/0/0 ethernet up ccc
<CE1> ping 10.1.1.2
PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=4 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=2 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/1/4 ms
配置文件
CE1的配置文件
# sysname CE1 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 # return
PE的配置文件
# sysname PE # mpls lsr-id 1.1.1.9 # mpls # mpls l2vpn # interface GigabitEthernet1/0/0 undo shutdown # interface GigabitEthernet2/0/0 undo shutdown # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ccc ce1-ce2 interface GigabitEthernet1/0/0 out-interface GigabitEthernet2/0/0 # return
CE2的配置文件
# sysname CE2 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.2 255.255.255.0 # return