以VLANIF接口为AC的SVC方式VLL的多PW配置

如图所示,CE1和CE2(均划分VLAN 10 20) 所连接的VPN1网络的两个站点,位于172.1.1.0/24网络中,CE3和CE4(均划分VLAN 30 40) 所连接的VPN2网络的两个站点,位于172.1.2.0/24网路中

要求通过SVC方式VLL两个VPN 网络的各自两个站点间相同的VLAN中的用户通过MPLS/IP骨干网络实现二层互通。

思路分析:

根据实现要求,采用灵活的QinQ+VLANIF 接口方案来进行配置,为实现二层的直接访问,采用VLL,并手工指定VC标签即SVC方式。

1、配置各个节点设备上的vlan并配置vlanif接口;

2、在PE上配置灵活QinQ对用户vlan加装一层公网vlan标签;

3、在骨干网上配置ospf 协议,配置mpls 和ldp使用LDP LSP;

4、在PE上使用MPSL L2VPN 并手工配置vc 标签。

配置代码如下:

【PE1】

#

sysname PE1

#

vlan batch 100 200 800

#

mpls lsr-id 1.1.1.1

mpls

#

mpls l2vpn

#

mpls ldp

#

interface Vlanif100

 mpls static-l2vc destination 3.3.3.3 transmit-vpn-label 100 receive-vpn-label 2

00  //静态配置vlanif VC标签

#

interface Vlanif200

 mpls static-l2vc destination 3.3.3.3 transmit-vpn-label 700 receive-vpn-label 8

00  //静态配置vlanif VC标签

#

interface Vlanif800

 ip address 10.1.1.1 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 800

#

interface GigabitEthernet0/0/2

 qinq vlan-translation enable   //使端口具有QinQ 的vlan转换功能

 port hybrid tagged vlan 10 20    //允许用户标签通过

 port hybrid untagged vlan 100  //允许公网标签通过

 port vlan-stacking vlan 1 to 20 stack-vlan 100  //配置灵活QinQ对用户的vlan标签加装一层公网标签

#

interface GigabitEthernet0/0/3

 qinq vlan-translation enable

 port hybrid tagged vlan 30 40

 port hybrid untagged vlan 200

 port vlan-stacking vlan 30 to 40 stack-vlan 200

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 1.1.1.1 0.0.0.0

【P】

#

sysname P

#

vlan batch 100 200 800 900

#

mpls lsr-id 2.2.2.2

mpls

#

mpls ldp

#

interface Vlanif800

 ip address 10.1.1.2 255.255.255.0

 mpls

 mpls ldp

#

interface Vlanif900

 ip address 12.1.1.1 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 800

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 900

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

ospf 1

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 12.1.1.0 0.0.0.255

  network 2.2.2.2 0.0.0.0

【PE2】

#

sysname PE2

#

vlan batch 100 200 900

#

mpls lsr-id 3.3.3.3

mpls

#

mpls l2vpn

#

mpls ldp

#

interface Vlanif100

 mpls static-l2vc destination 1.1.1.1 transmit-vpn-label 200 receive-vpn-label 1

00

#

interface Vlanif200

 mpls static-l2vc destination 1.1.1.1 transmit-vpn-label 800 receive-vpn-label 7

00

#

interface Vlanif900

 ip address 12.1.1.2 255.255.255.0

 mpls

 mpls ldp

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 900

#

interface GigabitEthernet0/0/2

 qinq vlan-translation enable

 port hybrid tagged vlan 10 20

 port hybrid untagged vlan 100

 port vlan-stacking vlan 1 to 20 stack-vlan 100

#

interface GigabitEthernet0/0/3

 qinq vlan-translation enable

 port hybrid tagged vlan 30 40

 port hybrid untagged vlan 200

 port vlan-stacking vlan 30 to 40 stack-vlan 200

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

ospf 1

 area 0.0.0.0

  network 12.1.1.0 0.0.0.255

  network 3.3.3.3 0.0.0.0

【CE1】

#

sysname CE1

#

vlan batch 10 20

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 10 20

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 10

#

interface GigabitEthernet0/0/3

 port link-type access

 port default vlan 20

【CE2】

#

sysname CE2

#

vlan batch 10 20

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 10 20

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 10

#

interface GigabitEthernet0/0/3

 port link-type access

 port default vlan 20

【CE3】

#

sysname CE3

#

vlan batch 30 40

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 30 40

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 30

#

interface GigabitEthernet0/0/3

 port link-type access

 port default vlan 40

【CE4】

#

sysname CE4

#

vlan batch 30 40

#

interface GigabitEthernet0/0/1

 port link-type trunk

 port trunk allow-pass vlan 30 40

#

interface GigabitEthernet0/0/2

 port link-type access

 port default vlan 30

#

interface GigabitEthernet0/0/3

 port link-type access

 port default vlan 40

验证测试

<PE1>dis mpls static-l2vc

 Total svc connections:  2,  2 up,  0 down

 *Client Interface     : Vlanif100 is up

  AC Status            : up

  VC State             : up

  VC ID                : 0

  VC Type              : VLAN

  Destination          : 3.3.3.3

  Transmit VC Label    : 100

  Receive VC Label     : 200

  Label Status         : 0

  Token Status         : 0

  Control Word         : Disable

………………………………

 *Client Interface     : Vlanif200 is up

  AC Status            : up

  VC State             : up

  VC ID                : 0

  VC Type              : VLAN

  Destination          : 3.3.3.3

  Transmit VC Label    : 700

  Receive VC Label     : 800

  Label Status         : 0

  Token Status         : 0

  Control Word         : Disable

…………………………………………

<PE1>display l2vpn ccc-interface vc-type static-vc up

Total ccc-interface of SVC VC: 2

up (2), down (0)

Interface                          Encap Type               State     VC Type

Vlanif100                          vlan                     up        static-vc

Vlanif200                          vlan                     up        static-vc

可以看到VC连接的状态均为UP,同时CE两端相同vlan中的用户都是可以相互Ping通的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值