• 文章搜索:
  • 唯快不破

        • 分享到...

        • 新浪微博
        • 腾讯微博
        • 推荐到豆瓣 豆瓣空间
        • 分享到搜狐微博 搜狐微博
        • 分享到QQ空间 QQ空间
        • 分享到腾讯朋友 腾讯朋友
        • 网易微博分享 网易微博
        • 添加到百度搜藏 百度搜藏
        • 转贴到开心网 开心网
        • 转发好友 告诉聊友
    • 推荐
    • 打印
    • 收藏

    青龙探爪——VPLS Kompella模式Lable Block部署秘籍

    作者:  |  上传时间:2014-11-26  |  关键字:青龙探爪——VPLS Kompella模式Lable Block部署秘籍

    一、组网:

    二、目的及思路:

    如上图组网所示,网络中CE1与CE2需要通过VPLS网络进行业务通信。

    在VPLS网络中,如果要实现不同PE设备下游的CE互通,PE之间需要采用Martini或Kompella部署方式,协商相关参数信息,从而实现内外层标签的分发和学习,以便不同CE侧的内网流量在VPLS网络中转发。

    根据协议要求,当PE下游新增加一个CE,且需要与对端PE同一VSI(虚拟交换实例)下游的CE互通时。需要在两个PE之间成功建立VC标签(及内层标签),并且交互的VC标签(内层标签)相互对应。

    如果VPLS网络采用Kompella部署方式时,PE之间通过BGP协议交互Lable Block(标签块),Lable Block格式为:LB/LR/LO(其中LB表示:Lable Base及起始标签,LB由本地PE设备自动分配生成;LR表示:Lable Range及标签块大小,由管理员手动定义;LO表示:Lable Black Offset及标签块偏移,由管理员手动定义)。PE设备根据本地的Lable Block,通过计算生成可发送和可接收的VC标签(内层标签)。具体的计算方法和规则,通过下面的举例进行说明。

    三、举例:

    1)PE1与PE2通过下列配置部署VPLS网络:

    PE1配置:

    mpls lsr-id 1.1.1.1

    #

    password-recovery enable

    #

    vlan 1

    #

    vlan 12

    #

    mpls

    #

    l2vpn

    mpls l2vpn

    #

    mpls ldp

    #

    mpls ldp remote-peer 1

    remote-ip 2.2.2.2

    #

    domain system

    access-limit disable

    state active

    idle-cut disable

    self-service-url disable

    #

    user-group system

    group-attribute allow-guest

    #

    vsi bbb auto

    pwsignal bgp

    route-distinguisher 1:1

    vpn-target 1:1 import-extcommunity

    vpn-target 1:1 export-extcommunity

    site 12 range 33 default-offset 0

    encapsulation ethernet

    #

    interface NULL0

    #

    interface LoopBack0

    ip address 1.1.1.1 255.255.255.255

    #

    interface Vlan-interface1

    ip address dhcp-alloc client-identifier mac Vlan-interface1

    #

    interface Vlan-interface12

    ip address 12.1.1.1 255.255.255.0

    mpls

    mpls ldp

    #

    interface GigabitEthernet1/0/47

    port link-mode bridge

    port link-type hybrid

    undo port hybrid vlan 1

    port hybrid vlan 100 200 untagged

    port hybrid pvid vlan 100

    service-instance 1000

    encapsulation s-vid 100

    xconnect vsi bbb access-mode ethernet

    #

    interface GigabitEthernet1/0/48

    port link-mode bridge

    port access vlan 12

    #

    bgp 1

    undo synchronization

    peer 2.2.2.2 as-number 1

    peer 2.2.2.2 connect-interface LoopBack0

    #

    vpls-family

    peer 2.2.2.2 enable

    #

    ip route-static 2.2.2.2 255.255.255.255 12.1.1.2

    PE2配置:

    mpls lsr-id 2.2.2.2

    #

    password-recovery enable

    #

    vlan 1

    #

    vlan 12

    #

    mpls

    #

    l2vpn

    mpls l2vpn

    #

    mpls ldp

    #

    mpls ldp remote-peer 1

    remote-ip 1.1.1.1

    #

    vsi bbb auto

    pwsignal bgp

    route-distinguisher 2:2

    vpn-target 1:1 import-extcommunity

    vpn-target 1:1 export-extcommunity

    site 32 range 11 default-offset 0

    encapsulation ethernet

    #

    interface LoopBack2

    ip address 2.2.2.2 255.255.255.255

    #

    interface Vlan-interface12

    ip address 12.1.1.2 255.255.255.0

    mpls

    mpls ldp

    #

    interface GigabitEthernet2/0/23

    port link-mode bridge

    service-instance 12

    encapsulation s-vid 100

    xconnect vsi bbb

    #

    interface GigabitEthernet2/0/24

    port link-mode bridge

    port access vlan 12

    #

    bgp 1

    undo synchronization

    peer 1.1.1.1 as-number 1

    peer 1.1.1.1 connect-interface LoopBack2

    #

    vpls-family

    peer 1.1.1.1 enable

    #

    ip route-static 1.1.1.1 255.255.255.255 12.1.1.1

    2)通过在PE1和PE2设备上display vsi verbose 观察PE本地VSI状态,发现VSI状态为down

    PE1信息:

    ……

    Wait to Restore Time : Invalid

    VSI State : down //VSI状态为down

    BGP RD : 1:1

    SiteID/Range/Offset : 12/33/0 //管理员配置的site 12 range 33 default-offset 0

    Import vpn target : 1:1

    Export vpn target : 1:1

    Remote Label Block : 122880/11/0, //对端Label Block

    Local Label Block : 122880/33/0, //本地Label Block

    Interface Name : GigabitEthernet1/2/0/23

    State : up

    Service instance ID : 100

    *Peer Ip Address : 2.2.2.2 //对端PE2的信息

    PW State : up

    Local VC Label : 122912 //对端PE1本地标签(outbound方向)

    Remote VC Label : 122892 //对端PE2远程标签(inbound方向)

    PW Type : label

    Tunnel ID : 0xc0000

    PE2信息:

    ……

    Wait to Restore Time : Invalid

    VSI State : up

    BGP RD : 1:1

    SiteID/Range/Offset : 32/11/0

    Import vpn target : 1:1

    Export vpn target : 1:1

    Remote Label Block : 122880/33/0,

    Local Label Block : 122880/11/0,

    Interface Name : GigabitEthernet1/2/0/23

    State : up

    Service instance ID : 100

    *Peer Ip Address : 1.1.1.1

    PW State : up

    Local VC Label : 122892

    Remote VC Label : 122912

    PW Type : label

    Tunnel ID : 0xc0000

    3)过观察上述配置得知,PE1与PE2使用Kompella模式部署VPLS。对比观察PE1与PE2 display vsi verbose信息,发现两个PE Local/Remote VC Lable对应一致,满足协议要求。按照协议要求,生成Local VC标签(及本地内层标签)的公式为对端LB + 本地CE_ID – 对端LO,及:

    PE1 Local VC Lable = 122880 + 32 – 0 = 122912

    PE1 Remote VC Lable =122880 + 12 – 0 = 122892

    PE2 Local VC Lable = 122880 + 12 – 0 = 122892

    PE2 Remote VC Lable =122880 + 32 – 0 = 122912

    如红色部分,PE1 Remote VC Lable需要与PE2 Local VC Labele 对应一致。

    其中:122880为H3C交换机初始自动分配的LB;12和32为管理员配置的LR;0为管理员配置的LO。关于LR与LO的详细含义可参考第5步。

    4)观察PE1 和PE2 VSI中的Lable Block配置,发现管理员配置的Lable Block参数不满足协议规定,因而造成VSI状态为down。具体如下:

    PE1:site 12 range 33 default-offset 0

    PE2:site 32 range 11 default-offset 0

    参数含义:

    default-offset:表示LO及标签块偏移;

    range:表示LR及标签块大小;

    site:表示本地CE的ID。对于CE_ID要求满足公式:对端LO≤本地CE_ID≤对端LO + 对端LR。

    通过该公式检测PE1和PE2配置的CE_ID满足要求,及:

    PE1:0 ≤ 12 ≥ 0 + 11(不满足公式)

    PE2:0 ≤ 32 ≤ 0 + 33(满足公式)

    5)通过修改PE1中Lable Block相关配置后,使得相关参数满足协议要求。

    配置调整前:

    PE1:site 12 range 33 default-offset 0

    PE2:site 32 range 11 default-offset 0

    PE1配置调整后:

    PE1:site 11 range 33 default-offset 0

    PE2:site 32 range 11 default-offset 0

    观察调整后的配置,发现能够满足协议要求,及:

    PE1:0 ≤ 11 ≤ 0 + 11(满足公式)

    PE2:0 ≤ 32 ≤ 0 + 33(满足公式)

    6)修改配置后,观察PE1和PE2 VSI状态发现此时已变为UP。两端CE流量可进行互通。

    PE1信息:

    ……

    Wait to Restore Time : Invalid

    VSI State : up

    BGP RD : 1:1

    SiteID/Range/Offset : 11/33/0

    Import vpn target : 1:1

    Export vpn target : 1:1

    Remote Label Block : 122880/11/0,

    Local Label Block : 122880/33/0,

    Interface Name : GigabitEthernet1/2/0/23

    State : up

    Service instance ID : 100

    *Peer Ip Address : 2.2.2.2

    PW State : up

    Local VC Label : 122912

    Remote VC Label : 122890

    PW Type : label

    Tunnel ID : 0xc0000

    PE2信息

    ……

    Wait to Restore Time : Invalid

    VSI State : up

    BGP RD : 1:1

    SiteID/Range/Offset : 32/11/0

    Import vpn target : 1:1

    Export vpn target : 1:1

    Remote Label Block : 122880/33/0,

    Local Label Block : 122880/11/0,

    Interface Name : GigabitEthernet1/2/0/23

    State : up

    Service instance ID : 100

    *Peer Ip Address : 1.1.1.1

    PW State : up

    Local VC Label : 122890

    Remote VC Label : 122912

    PW Type : label

    Tunnel ID : 0xc0000

    四、总结:

    采用Kompella模式构建VPLS网络时,为保证两端PE之间VSI正常建立,需要Lable Block中的相关参数遵循以下规则:

    1) CE_ID(及管理员手动配置的site ce_id)要求满足公式 = 对端LO≤本地CE_ID≤对端LO + 对端LR

    2) 生成Local VC标签(及本地内层标签)要求满足公式 = 对端LB + 本地CE_ID – 对端LO

    3) 本端Local VC标签,要求与对端 Remote VC标签对应。