配置跨域Martini VLL示例-OptionA
组网需求
如图4-31,运营商MPLS网络为用户提供L2VPN服务,其中PE1和PE2作为用户接入设备分别接入了运营商不同的自治域AS100及AS200,后续可能会接入新的用户。现要求一种适当的VPN方案,为用户提供安全的VPN服务,在接入新用户时配置简单。
缺省情况下,设备上全局使能链路类型自协商功能,若L2VPN使用Vlanif接口作为AC接口,则与该功能相冲突,需要先在系统视图下执行lnp disable命令去使能链路类型自协商功能。
使用lnp disable命令之后,设备重启前对业务没有影响,设备重启后只有命令port default vlan指定的VLAN二层转发可通,其他VLAN二层转发不通。缺省情况下,接口的配置是port default vlan 1,即只有VLAN 1二层转发可通。
配置思路
因为用户接入设备分别接入了运营商不同的自治域AS100及AS200,要提供VPN服务,必定为跨域的方式。考虑到需要在接入新用户时配置简单,建议采用配置跨域Martini VLL(OptionA)来满足用户需求。
采用如下的思路配置跨域Martini VLL(OptionA)的基本功能:
在骨干网上运行IGP协议,使同一个AS域内的各设备能互通。
在骨干网上配置MPLS基本能力,在同一AS域内的PE与ASBR_PE之间建立动态LSP隧道。如果PE与ASBR_PE非直连,建立LDP远程会话。
在同一个AS的PE与ASBR_PE之间建立MPLS L2VC连接。
操作步骤
- 按图4-31配置各接口所属VLAN和VLANIF接口的IP地址
以CE1为例。
# 配置CE1。CE2、PE1、PE2、ASBR_PE1和ASBR_PE2的配置与CE1类似,此处不再赘述。
<HUAWEI> system-view [HUAWEI] sysname CE1 [CE1] vlan batch 10 [CE1] interface vlanif 10 [CE1-Vlanif10] ip address 192.168.1.1 255.255.255.0 [CE1-Vlanif10] quit [CE1] interface gigabitethernet 1/0/0 [CE1-GigabitEthernet1/0/0] port link-type trunk [CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 [CE1-GigabitEthernet1/0/0] quit
- 配置骨干网的IGP
在MPLS骨干网上配置IGP协议,实现骨干网PE和ASBR_PE的互通。
本例中采用IS-IS,以PE1为例。
# 配置PE1。PE2、ASBR_PE1和ASBR_PE2的配置与PE1类似,此处不再赘述。
[PE1] isis 1 [PE1-isis-1] is-level level-1-2 [PE1-isis-1] network-entity 10.0000.0000.0001.00 [PE1-isis-1] quit [PE1] interface vlanif 20 [PE1-Vlanif20] isis enable 1 [PE1-Vlanif20] quit [PE1] interface loopback 0 [PE1-LoopBack0] ip address 1.1.1.9 32 [PE1-LoopBack0] isis enable 1 [PE1-LoopBack0] quit
配置完成后,ASBR_PE与本AS的PE之间应能建立IS-IS邻居,执行display isis peer命令可以看到邻居达到UP状态,PE之间能学习到对方的Loopback地址。
以PE1的显示为例:
[PE1] display isis peer Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI ------------------------------------------------------------------------------- 0000.0000.0002 Vlanif20 0000.0000.0001.01 Up 21s L1(L1L2) 64 0000.0000.0002 Vlanif20 0000.0000.0001.01 Up 21s L2(L1L2) 64 Total Peer(s): 2
ASBR_PE与本AS内的PE之间应能互相ping通。
以PE1的显示为例:
[PE1] ping 2.2.2.9 PING 2.2.2.9: 56 data bytes, press CTRL_C to break Reply from 2.2.2.9: bytes=56 Sequence=1 ttl=255 time=180 ms Reply from 2.2.2.9: bytes=56 Sequence=2 ttl=255 time=90 ms Reply from 2.2.2.9: bytes=56 Sequence=3 ttl=255 time=60 ms Reply from 2.2.2.9: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 2.2.2.9: bytes=56 Sequence=5 ttl=255 time=100 ms --- 2.2.2.9 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/98/180 ms
- 使能MPLS,配置动态LSP
在MPLS骨干网上配置MPLS基本能力。同一AS域内的PE与ASBR_PE之间建立动态LDP LSP。
# 配置PE1。PE2、ASBR_PE1和ASBR_PE2的配置与PE1类似,此处不再赘述。
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface vlanif 20 [PE1-Vlanif20] mpls [PE1-Vlanif20] mpls ldp [PE1-Vlanif20] quit
完成此步骤,同一AS域内的PE与ASBR_PE之间存在LSP隧道。
以ASBR_PE1为例:
[ASBR_PE1] display mpls ldp session LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) A '*' before a session means the session is being deleted. ------------------------------------------------------------------------------ PeerID Status LAM SsnRole SsnAge KASent/Rcv ------------------------------------------------------------------------------ 1.1.1.9:0 Operational DU Active 0000:00:19 79/79 ------------------------------------------------------------------------------ TOTAL: 1 session(s) Found.
- 配置MPLS L2VC连接
在PE和ASBR PE上配置L2VC连接,并接入CE。
# 配置PE1。由于本举例使用Vlanif接口作为AC接口,执行以下步骤前必须在系统视图下执行lnp disable命令。如果现网环境不能去使能链路类型自协商功能,请使用非Vlanif接口作为AC接口。
[PE1] mpls l2vpn [PE1-l2vpn] quit [PE1] interface vlanif 10 [PE1-Vlanif10] mpls l2vc 2.2.2.9 100 [PE1-Vlanif10] quit
# 配置ASBR_PE1。由于本举例使用Vlanif接口作为AC接口,执行以下步骤前必须在系统视图下执行lnp disable命令。如果现网环境不能去使能链路类型自协商功能,请使用非Vlanif接口作为AC接口。
[ASBR_PE1] mpls l2vpn [ASBR_PE1-l2vpn] quit [ASBR_PE1] interface vlanif 30 [ASBR_PE1-Vlanif30] mpls l2vc 1.1.1.9 100 [ASBR_PE1-Vlanif30] quit
# 配置ASBR_PE2。由于本举例使用Vlanif接口作为AC接口,执行以下步骤前必须在系统视图下执行lnp disable命令。如果现网环境不能去使能链路类型自协商功能,请使用非Vlanif接口作为AC接口。
[ASBR_PE2] mpls l2vpn [ASBR_PE2-l2vpn] quit [ASBR_PE2] interface vlanif 30 [ASBR_PE2-Vlanif30] mpls l2vc 4.4.4.9 100 [ASBR_PE2-Vlanif30] quit
# 配置PE2。由于本举例使用Vlanif接口作为AC接口,执行以下步骤前必须在系统视图下执行lnp disable命令。如果现网环境不能去使能链路类型自协商功能,请使用非Vlanif接口作为AC接口。
[PE2] mpls l2vpn [PE2-l2vpn] quit [PE2] interface vlanif 50 [PE2-Vlanif50] mpls l2vc 3.3.3.9 100 [PE2-Vlanif50] quit
- 验证配置结果
在PE上查看L2VPN连接信息,可以看到建立了一条L2VC,VC State为UP。
以PE1和ASBR_PE2的显示为例:
[PE1] display mpls l2vc interface vlanif 10 *client interface : Vlanif10 is up Administrator PW : no session state : up AC status : up VC state : up Label state : 0 Token state : 0 VC ID : 100 VC type : VLAN destination : 2.2.2.9 local group ID : 0 remote group ID : 0 local VC label : 23552 remote VC label : 23552 local AC OAM State : up local PSN OAM State : up local forwarding state : forwarding local status code : 0x0 remote AC OAM state : up remote PSN OAM state : up remote forwarding state: forwarding remote status code : 0x0 ignore standby state : no BFD for PW : unavailable VCCV State : up manual fault : not set active state : active forwarding entry : exist link state : up local VC MTU : 1500 remote VC MTU : 1500 local VCCV : alert ttl lsp-ping bfd remote VCCV : alert ttl lsp-ping bfd local control word : disable remote control word : disable tunnel policy name : -- PW template name : -- primary or secondary : primary load balance type : flow Access-port : false Switchover Flag : false VC tunnel/token info : 1 tunnels/tokens NO.0 TNL type : lsp , TNL ID : 0x10031 Backup TNL type : lsp , TNL ID : 0x0 create time : 1 days, 22 hours, 15 minutes, 9 seconds up time : 0 days, 22 hours, 54 minutes, 57 seconds last change time : 0 days, 22 hours, 54 minutes, 57 seconds VC last up time : 2010/10/09 19:26:37 VC total up time : 0 days, 22 hours, 54 minutes, 57 seconds CKey : 16 NKey : 15 PW redundancy mode : frr AdminPw interface : -- AdminPw link state : -- Diffserv Mode : uniform Service Class : be Color : -- DomainId : -- Domain Name : --
[ASBR_PE2] display mpls l2vc interface vlanif 30 *client interface : Vlanif30 is up Administrator PW : no session state : up AC status : up VC state : up Label state : 0 Token state : 0 VC ID : 100 VC type : VLAN destination : 4.4.4.9 local group ID : 0 remote group ID : 0 local VC label : 23552 remote VC label : 23552 local AC OAM State : up local PSN OAM State : up local forwarding state : forwarding local status code : 0x0 remote AC OAM state : up remote PSN OAM state : up remote forwarding state: forwarding remote status code : 0x0 ignore standby state : no BFD for PW : unavailable VCCV State : up manual fault : not set active state : active forwarding entry : exist link state : up local VC MTU : 1500 remote VC MTU : 1500 local VCCV : alert ttl lsp-ping bfd remote VCCV : alert ttl lsp-ping bfd local control word : disable remote control word : disable tunnel policy name : -- PW template name : -- primary or secondary : primary load balance type : flow Access-port : false Switchover Flag : false VC tunnel/token info : 1 tunnels/tokens NO.0 TNL type : lsp , TNL ID : 0x10031 Backup TNL type : lsp , TNL ID : 0x0 create time : 1 days, 22 hours, 15 minutes, 9 seconds up time : 0 days, 22 hours, 54 minutes, 57 seconds last change time : 0 days, 22 hours, 54 minutes, 57 seconds VC last up time : 2010/10/09 19:26:37 VC total up time : 0 days, 22 hours, 54 minutes, 57 seconds CKey : 17 NKey : 18 PW redundancy mode : frr AdminPw interface : -- AdminPw link state : -- Diffserv Mode : uniform Service Class : be Color : -- DomainId : -- Domain Name : --
CE1和CE2能够相互Ping通。
以CE1的显示为例:
[CE1] ping 192.168.1.2 PING 192.168.1.2: 56 data bytes, press CTRL_C to break Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=172 ms Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=156 ms Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=156 ms Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=156 ms Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=156 ms --- 192.168.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 156/159/172 ms
配置文件
CE1的配置文件
# sysname CE1 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 10 # return
PE1的配置文件
使用lnp disable命令之后,设备重启前对业务没有影响,设备重启后只有命令port default vlan指定的VLAN二层转发可通,其他VLAN二层转发不通。缺省情况下,接口的配置是port default vlan 1,即只有VLAN 1二层转发可通。
# sysname PE1 # vlan batch 10 20 # lnp disable # mpls lsr-id 1.1.1.9 mpls # mpls l2vpn # mpls ldp # isis 1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 mpls l2vc 2.2.2.9 100 # interface Vlanif20 ip address 20.1.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 20 # interface LoopBack0 ip address 1.1.1.9 255.255.255.255 isis enable 1 # return
ASBR_PE1的配置文件
使用lnp disable命令之后,设备重启前对业务没有影响,设备重启后只有命令port default vlan指定的VLAN二层转发可通,其他VLAN二层转发不通。缺省情况下,接口的配置是port default vlan 1,即只有VLAN 1二层转发可通。
# sysname ASBR_PE1 # vlan batch 20 30 # lnp disable # mpls lsr-id 2.2.2.9 mpls # mpls l2vpn # mpls ldp # isis 1 network-entity 10.0000.0000.0002.00 # interface Vlanif20 ip address 20.1.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface Vlanif30 mpls l2vc 1.1.1.9 100 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 20 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 30 # interface LoopBack0 ip address 2.2.2.9 255.255.255.255 isis enable 1 # return
ASBR_PE2的配置文件
使用lnp disable命令之后,设备重启前对业务没有影响,设备重启后只有命令port default vlan指定的VLAN二层转发可通,其他VLAN二层转发不通。缺省情况下,接口的配置是port default vlan 1,即只有VLAN 1二层转发可通。
# sysname ASBR_PE2 # vlan batch 30 40 # lnp disable # mpls lsr-id 3.3.3.9 mpls # mpls l2vpn # mpls ldp # isis 1 network-entity 10.0000.0000.0003.00 # interface Vlanif30 mpls l2vc 4.4.4.9 100 # interface Vlanif40 ip address 30.1.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 30 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 40 # interface LoopBack0 ip address 3.3.3.9 255.255.255.255 isis enable 1 # return
PE2的配置文件
使用lnp disable命令之后,设备重启前对业务没有影响,设备重启后只有命令port default vlan指定的VLAN二层转发可通,其他VLAN二层转发不通。缺省情况下,接口的配置是port default vlan 1,即只有VLAN 1二层转发可通。
# sysname PE2 # vlan batch 40 50 # lnp disable # mpls lsr-id 4.4.4.9 mpls # mpls l2vpn # mpls ldp # isis 1 network-entity 10.0000.0000.0004.00 # interface Vlanif40 ip address 30.1.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface Vlanif50 mpls l2vc 3.3.3.9 100 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 40 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 50 # interface LoopBack0 ip address 4.4.4.9 255.255.255.255 isis enable 1 # return
CE2的配置文件
# sysname CE2 # vlan batch 50 # interface Vlanif50 ip address 192.168.1.2 255.255.255.0 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 50 # return