帮助我们改善您的体验。

让我们了解您的想法。

您是否能抽出两分钟的时间完成一份问卷调查?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents

机器翻译对您有帮助吗?

starstarstarstarstar
Go to English page
免责声明:

我们将使用第三方机器翻译软件翻译本页面。瞻博网络虽已做出相当大的努力提供高质量译文,但无法保证其准确性。如果对译文信息的准确性有任何疑问,请参阅英文版本. 可下载的 PDF 仅提供英文版.

MC-LAG 示例

date_range 11-Jun-24

示例:在 QFX 系列交换机和 MX 系列路由器之间配置多机箱链路聚合

此示例说明如何使用主动-主动模式在 QFX 系列交换机和 MX 系列路由器之间配置多机箱链路聚合组 (MC-LAG),以支持第 2 层桥接。在主动-主动模式下,所有成员链路都携带流量,从而允许将流量负载平衡到两个 MC-LAG 对等方。

要求

此示例使用以下硬件和软件组件:

  • 一台瞻博网络 MX 系列路由器(MX240、MX480、MX960)

  • 一台瞻博网络 QFX 系列交换机(QFX10000、QFX5110、QFX5120)

  • 两台支持 LAG 的服务器;在此示例中,MX 系列路由器将扮演服务器角色

  • MC-LAG 对等方上的 Junos OS 19.4R1 或更高版本

概述

在示例拓扑中,两台服务器连接到两个提供商边缘 (PE) 设备(S0 和 R1)。S0 是 QFX 系列交换机,而 R1 是 MX 系列路由器。两台 PE 设备都有连接到两台服务器的链路聚合组 (LAG)。此示例为 MC-LAG 配置主动-主动模式,这意味着两个 PE 设备的 LAG 端口处于活动状态并同时承载流量。

服务器不知道其聚合以太网链路已连接到多个 PE 设备。MC-LAG 操作对服务器是不透明的,并且都配置了传统的以太网 LAG 接口。

MC-LAG 的一端是 MC-LAG 客户端设备,例如服务器或交换/路由设备,它在 LAG 中具有一个或多个物理链路。客户端设备不需要支持 MC-LAG,因为这些设备只需要支持标准 LAG 接口。MC-LAG 的另一端是两个 MC-LAG 设备 (PE)。每个 PE 都有一个或多个连接到客户端设备的物理链路。PE 设备相互协调,以确保即使所有客户端链路都在主动转发流量,也能正确转发数据流量。

在图 3 中,服务器就像两个 LAG 成员都连接到单个提供商设备一样运行。由于配置的模式为主动-主动模式,因此所有 LAG 成员都处于转发状态,并且 CE 设备会将流量负载平衡到对等 PE 设备。

机箱间控制协议 (ICCP) 在 PE 设备之间发送消息,以控制 MC-LAG 的转发状态。此外,在主动-主动模式下运行时,机箱间链路保护链路 (ICL-PL) 用于根据需要在 PE 设备之间转发流量。

在此示例中,您将在 PE 上配置两个 MC-LAG,以支持服务器上聚合以太网接口之间的第 2 层连接。作为 MC-LAG 配置的一部分,您可以在 MC-LAG 对等方之间配置聚合以太网接口,以支持 ICL-PL 和 ICCP 功能。

拓扑图

图 3:QFX 到 MX MC-LAG 互操作性 QFX to MX MC-LAG Interoperability

图 3 显示了此示例中使用的拓扑。

有关拓扑的要点包括:

  1. S0 节点是 QFX10000 系列交换机,而 R1 节点是 MX960 系列路由器。
  2. MX 系列路由器用于填补 2 台服务器的角色。此示例可使用支持基于 LACP 的传统 LAG 接口的任何交换机、路由器或服务器设备。
  3. 服务器分配有 VLAN 10 并具有共享子网。您希望服务器之间具有第 2 层连接。
  4. PE 之间的 ICCP 会话锚定到 IRB 接口。这类似于环路接口之间的 BGP 对等互连,以便在链路故障时幸存下来。但是,此处的 IRB 放置在共享 VLAN (VLAN 100) 中,该 VLAN 在 PE 之间提供第 2 层连接。这意味着 IRB 之间的连接不需要 IGP 或静态路由。因此,IRB 共享一个 IP 子网。
  5. 此示例在 PE (ae0) 之间部署单个 LAG 接口,以支持 ICCP 和 ICL 功能。如果需要,您可以在单独的 AE 捆绑包上运行 ICCP。强烈建议在用于 ICCP/ICL 链路的 AE 捆绑包中使用多个成员,以确保它们在发生单个接口或链路故障时保持运行。
  6. 虽然大体相似,但 PE 设备之间的 MC-LAG 配置略有不同,因为它们是不同的平台。此示例演示这些配置差异以及平台之间的 MC-LAG 互操作性是此示例的原因。在继续执行示例时,请务必跟踪您正在与之交互的 PE。

配置设备

CLI 快速配置

要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改任何必要的详细信息以匹配您的网络配置,将命令复制并粘贴到层次结构级别的 CLI [edit] 中。完成后,从配置模式进入 commit 以激活更改。

交换机 S0

注意:

在此示例中,S0 设备是 QFX10000 系列交换机。

content_copy zoom_out_map
set system host-name mc-lag_r0
set chassis aggregated-devices ethernet device-count 10
set interfaces xe-0/0/0 gigether-options 802.3ad ae0
set interfaces xe-0/0/1 gigether-options 802.3ad ae0
set interfaces xe-0/0/4 gigether-options 802.3ad ae10
set interfaces xe-0/0/5 gigether-options 802.3ad ae20
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
set interfaces ae0 unit 0 family ethernet-switching vlan members all
set interfaces ae10 aggregated-ether-options lacp active
set interfaces ae10 aggregated-ether-options lacp system-id 01:01:01:01:01:01
set interfaces ae10 aggregated-ether-options lacp admin-key 10
set interfaces ae10 aggregated-ether-options mc-ae mc-ae-id 10
set interfaces ae10 aggregated-ether-options mc-ae redundancy-group 1
set interfaces ae10 aggregated-ether-options mc-ae chassis-id 0
set interfaces ae10 aggregated-ether-options mc-ae mode active-active
set interfaces ae10 aggregated-ether-options mc-ae status-control active
set interfaces ae10 unit 0 family ethernet-switching vlan members vlan10
set interfaces ae20 aggregated-ether-options lacp active
set interfaces ae20 aggregated-ether-options lacp system-id 02:02:02:02:02:02
set interfaces ae20 aggregated-ether-options lacp admin-key 20
set interfaces ae20 aggregated-ether-options mc-ae mc-ae-id 20
set interfaces ae20 aggregated-ether-options mc-ae redundancy-group 1
set interfaces ae20 aggregated-ether-options mc-ae chassis-id 1
set interfaces ae20 aggregated-ether-options mc-ae mode active-active
set interfaces ae20 aggregated-ether-options mc-ae status-control standby
set interfaces ae20 unit 0 family ethernet-switching vlan members vlan10
set interfaces irb unit 100 family inet address 10.0.1.10/24
set interfaces lo0 unit 0 family inet address 192.168.255.10/32
set multi-chassis multi-chassis-protection 10.0.1.1 interface ae0
set protocols iccp local-ip-addr 10.0.1.10
set protocols iccp peer 10.0.1.1 session-establishment-hold-time 50
set protocols iccp peer 10.0.1.1 redundancy-group-id-list 1
set protocols iccp peer 10.0.1.1 liveness-detection minimum-interval 1000
set switch-options service-id 100
set vlans vlan10 vlan-id 10
set vlans vlan100 vlan-id 100
set vlans vlan100 l3-interface irb.100

路由器 R1

注意:

在此示例中,R1 设备是 MX 系列路由器。

content_copy zoom_out_map
set system host-name mc-lag_r1
set chassis aggregated-devices ethernet device-count 10
set interfaces xe-0/0/0:0 gigether-options 802.3ad ae0
set interfaces xe-0/0/0:1 gigether-options 802.3ad ae0
set interfaces xe-0/0/1:0 gigether-options 802.3ad ae10
set interfaces xe-0/0/1:1 gigether-options 802.3ad ae20
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 unit 0 family bridge interface-mode trunk
set interfaces ae0 unit 0 family bridge vlan-id-list 1-1000
set interfaces ae10 aggregated-ether-options lacp active
set interfaces ae10 aggregated-ether-options lacp system-id 01:01:01:01:01:01
set interfaces ae10 aggregated-ether-options lacp admin-key 10
set interfaces ae10 aggregated-ether-options mc-ae mc-ae-id 10
set interfaces ae10 aggregated-ether-options mc-ae redundancy-group 1
set interfaces ae10 aggregated-ether-options mc-ae chassis-id 1
set interfaces ae10 aggregated-ether-options mc-ae mode active-active
set interfaces ae10 aggregated-ether-options mc-ae status-control standby
set interfaces ae10 unit 0 multi-chassis-protection 10.0.1.10 interface ae0.0
set interfaces ae10 unit 0 family bridge interface-mode access
set interfaces ae10 unit 0 family bridge vlan-id 10
set interfaces ae20 aggregated-ether-options lacp active
set interfaces ae20 aggregated-ether-options lacp system-id 02:02:02:02:02:02
set interfaces ae20 aggregated-ether-options lacp admin-key 20
set interfaces ae20 aggregated-ether-options mc-ae mc-ae-id 20
set interfaces ae20 aggregated-ether-options mc-ae redundancy-group 1
set interfaces ae20 aggregated-ether-options mc-ae chassis-id 0
set interfaces ae20 aggregated-ether-options mc-ae mode active-active
set interfaces ae20 aggregated-ether-options mc-ae status-control active
set interfaces ae20 unit 0 multi-chassis-protection 10.0.1.10 interface ae0.0
set interfaces ae20 unit 0 family bridge interface-mode access
set interfaces ae20 unit 0 family bridge vlan-id 10
set interfaces irb unit 100 family inet address 10.0.1.1/24
set interfaces lo0 unit 0 family inet address 192.168.255.1/32
set protocols iccp local-ip-addr 10.0.1.1
set protocols iccp peer 10.0.1.10 session-establishment-hold-time 50
set protocols iccp peer 10.0.1.10 redundancy-group-id-list 1
set protocols iccp peer 10.0.1.10 liveness-detection minimum-interval 1000
set bridge-domains vlan10 vlan-id 10
set bridge-domains vlan100 vlan-id 100
set bridge-domains vlan100 routing-interface irb.100
set switch-options service-id 10

服务器 1

注意:

此示例中的服务器是 MX 路由器。虽然此示例重点介绍如何在 PE 设备上配置 MC-LAG,但提供服务器配置是为了完整起见。在此示例中,服务器 2 具有相同的配置,只是为其分配了 IPv4 地址 172.16.1.2/24 和 IPv6 地址 2001:db8:172:16:1::2。

content_copy zoom_out_map
set system host-name server1
set chassis aggregated-devices ethernet device-count 10
set interfaces xe-0/0/0:0 gigether-options 802.3ad ae10
set interfaces xe-0/0/0:1 gigether-options 802.3ad ae10
set interfaces ae10 aggregated-ether-options lacp active
set interfaces ae10 unit 0 family inet address 172.16.1.1/24
set interfaces ae10 unit 0 family inet6 address 2001:db8:172:16:1::1/64

配置 S0 交换机

分步过程

以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 在配置模式下使用 CLI 编辑器

要配置交换机 S0:

  1. 指定机箱支持的聚合以太网设备数量。此示例只需要 3 个 LAG,但未使用的 AE 束容量不会造成任何问题。

    content_copy zoom_out_map
    [edit chassis]
    user@S0# set aggregated-devices ethernet device-count 10
    
  2. 配置环路(如果需要,此示例中不使用)和 IRB 接口,以及 IRB 接口的 VLAN。在此示例中,IRB 接口用于锚定 ICCP 会话并分配给 VLAN 100。

    content_copy zoom_out_map
    [edit]
    user@S0# set interfaces lo0 unit 0 family inet address 192.168.255.10/32
    user@S0# set interfaces irb unit 100 family inet address 10.0.1.10/24
    user@S0# set vlans vlan100 vlan-id 100
    user@S0# set vlans vlan100 l3-interface irb.100
    
  3. 配置 ae0 接口以支持 ICCP 和 ICL。请确保包括所有 MC-LAG VLAN,以及用于支持 ICCP 的 IRB VLAN。您可以指定 VLAN 列表,但在此示例中, all 关键字用于快速确保 ae0 接口支持所有 VLAN。在此示例中,ISL 上只需要两个 VLAN。支持 ICCP 的 MC-LAG VLAN (10) 和 VLAN 100。

    为了正常运行,必须将单元 0 用于 QFX 系列交换机上的 ICL 链路,因为与 MX 系列路由器不同,它们不支持 ICL 链路的单元级规范。

    注意:

    QFX 系列交换机仅支持 ICL 链路的接口级别规范,并假定使用单元 0。因此,如所示,将所有 MC-LAG VLAN 列在单元 0 下非常重要。MX 系列路由器可以支持 ICL 的全局或单元级规范。后一种方法在本示例的后面部分显示。

    content_copy zoom_out_map
    [edit interfaces]
    user@S0# set xe-0/0/0 gigether-options 802.3ad ae0
    user@S0# set xe-0/0/1 gigether-options 802.3ad ae0
    user@S0# set ae0 aggregated-ether-options lacp active
    user@S0# set ae0 unit 0 family ethernet-switching interface-mode trunk
    user@S0# set ae0 unit 0 family ethernet-switching vlan members all
    
  4. 指定用于面向聚合以太网捆绑包的服务器的成员接口。

    content_copy zoom_out_map
    [edit interfaces]
    user@S0# set xe-0/0/4 gigether-options 802.3ad ae10
    user@S0# set xe-0/0/5 gigether-options 802.3ad ae20
    
  5. 为连接到服务器 1 (ae10) 的 MC-LAG 配置 LACP 和 MC-LAG 参数。MC-LAG 设置为主动-主动模式,在本例中,S0 使用语句设置为 status-control active 活动 MC-LAG 节点。如果 S0 失败,R1 将接管为主动节点。LACP chassis-id 使用该语句计算 MC-LAG 的物理成员链路的端口号。按照惯例,为主动节点分配的机箱 ID 为 0,而为备用节点分配 1。在后面的步骤中,您将 R1 配置为连接到服务器 2 的 MC-LAG 的主动节点。

    多机箱聚合以太网标识号 (mc-ae-id) 指定聚合以太网接口所属的链路聚合组。S0 和 R1 上的 ae10 接口配置了 mc-ae-id 10。以类似的方式,ae20接口配置了 mc-ae-id 20

    ICCP 使用该 redundancy-group 1 语句关联执行类似冗余功能的多个机箱,并建立通信通道,以便对等机箱上的应用程序可以相互发送消息。S0 和 R1 上的 ae10 和 ae20 接口配置了相同的冗余组,即 冗余组 1

    mode 语句指示 MC-LAG 是处于主动-备用模式还是主动-主动模式。同一组中的机箱必须处于同一模式。

    content_copy zoom_out_map
    [edit interfaces ae10]
    user@S0# set aggregated-ether-options lacp active
    user@S0# set aggregated-ether-options lacp system-id 01:01:01:01:01:01
    user@S0# set aggregated-ether-options lacp admin-key 10
    user@S0# set aggregated-ether-options mc-ae mc-ae-id 10
    user@S0# set aggregated-ether-options mc-ae redundancy-group 1
    user@S0# set aggregated-ether-options mc-ae chassis-id 0
    user@S0# set aggregated-ether-options mc-ae mode active-active
    user@S0# set aggregated-ether-options mc-ae status-control active
    user@S0# set unit 0 family ethernet-switching vlan members vlan10
    
  6. 为连接到服务器 2 (ae20) 的 MC-LAG 配置 LACP 和 MC-LAG 参数。MC-LAG 设置为主动-主动模式,在此示例中,S0 设置为备用 MC-LAG 节点。在 R1 发生故障时,S0 将作为主动节点接管。

    content_copy zoom_out_map
    [edit interfaces ae20]
    user@S0# set aggregated-ether-options lacp active
    user@S0# set interfaces ae20 aggregated-ether-options lacp system-id 02:02:02:02:02:02
    user@S0# set aggregated-ether-options lacp admin-key 20
    user@S0# set aggregated-ether-options mc-ae mc-ae-id 20
    user@S0# set aggregated-ether-options mc-ae redundancy-group 1
    user@S0# set aggregated-ether-options mc-ae chassis-id 1
    user@S0# set aggregated-ether-options mc-ae mode active-active
    user@S0# set aggregated-ether-options mc-ae status-control standby
    user@S0# set unit 0 family ethernet-switching vlan members v20
    
  7. 为 AE 10 和 AE 20 捆绑包配置 VLAN。

    content_copy zoom_out_map
    [edit]
    user@S0# set vlans vlan10 vlan-id 10
  8. 配置交换机选项服务 ID。

    网桥域中的端口共享相同的泛洪或广播特性,以便执行第 2 层桥接。

    需要 service-id 全局语句来链接跨对等方(在本例中为 S0 和 R1)的相关桥接域,并且必须使用相同的值进行配置。

    content_copy zoom_out_map
    [edit switch-options]
    user@S0# set service-id 100
  9. 配置 ICCP 参数。 localpeer 参数设置为分别反映之前为本地和远程 IRB 接口配置的值。配置到 IRB(或环路)接口的 ICCP 对等互连可确保 ICCP 会话在遇到个别链路故障时能够保持正常运行。

    content_copy zoom_out_map
    [edit protocols iccp]
    user@S0# set local-ip-addr 10.0.1.10
    user@S0# set peer 10.0.1.1 session-establishment-hold-time 50
    user@S0# set peer 10.0.1.1 redundancy-group-id-list 1
    user@S0# set peer 10.0.1.10 liveness-detection minimum-interval 1000
  10. 在全局级别配置服务 ID。您必须在提供服务的 PE 路由器集中配置相同的唯一网络范围服务 ID。当多机箱聚合以太网接口是桥接域的一部分时,需要此服务 ID。

    content_copy zoom_out_map
    [edit switch-options]
    user@S0# set service-id 100
    
  11. 将 ae0 接口配置为充当 S0 支持的 MC-LAG 束的 ICL。

    content_copy zoom_out_map
    [edit multi-chassis]
    user@S0# set multi-chassis-protection 10.0.1.1 interface ae0
    
    注意:

    在 QFX 平台上,您必须将物理接口设备指定为 ICL 保护链路。不支持 ICL 到 MC-LAG 束的逻辑单元级映射。为确保正常运行,必须确保单元 0 用于支持 ICL 上 MC-LAG VLAN 的桥接。

S0 结果

在配置模式下,输入 show 命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。

content_copy zoom_out_map
[edit]
user@S0# show
. . .chassis {
    aggregated-devices {
        ethernet {
            device-count 10;
        }
    }
}
interfaces {
    xe-0/0/0 {
        gigether-options {
            802.3ad ae0;
        }
    }
    xe-0/0/1 {
        gigether-options {
            802.3ad ae0;
        }
    }
    xe-0/0/4 {
        gigether-options {
            802.3ad ae10;
        }
    }
    xe-0/0/5 {
        gigether-options {
            802.3ad ae20;
        }
    }
    ae0 {
        aggregated-ether-options {
            lacp {
                active;
            }
        }
        unit 0 {
            family ethernet-switching {
                interface-mode trunk;
                vlan {
                    members all;
                }
            }
        }
    }
    ae10 {
        aggregated-ether-options {
            lacp {
                active;
                system-id 01:01:01:01:01:01;
                admin-key 10;
            }
            mc-ae {
                mc-ae-id 10;
                redundancy-group 1;
                chassis-id 0;
                mode active-active;
                status-control active;
            }
        }
        unit 0 {
            family ethernet-switching {
                vlan {
                    members vlan10;
                }
            }
        }
    }
    ae20 {
        aggregated-ether-options {
            lacp {
                active;
                system-id 02:02:02:02:02:02;
                admin-key 20;
            }
            mc-ae {
                mc-ae-id 20;
                redundancy-group 1;
                chassis-id 1;
                mode active-active;
                status-control standby;
            }
        }
        unit 0 {
            family ethernet-switching {
                vlan {
                    members vlan10;
                }
            }
        }
    }
    irb {
        unit 100 {
            family inet {
                address 10.0.1.10/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 192.168.255.10/32;
            }
        }
    }
}
multi-chassis {
    multi-chassis-protection 10.0.1.1 {
        interface ae0;
    }
}
protocols {
    iccp {
        local-ip-addr 10.0.1.10;
        peer 10.0.1.1 {
            session-establishment-hold-time 50;
            redundancy-group-id-list 1;
            liveness-detection {
                minimum-interval 1000;
            }
        }
    }
}
switch-options {
    service-id 100;
}
vlans {
    vlan10 {
        vlan-id 10;
    }
    vlan100 {
        vlan-id 100;
        l3-interface irb.100;
    }
}

配置 R1 路由器

分步过程

以下示例要求您在配置层次结构中导航各个级别。有关导航 CLI 的信息,请参阅 在配置模式下使用 CLI 编辑器

要配置路由器 R1:

  1. 指定要在机箱上创建的聚合以太网接口数量。只需要 3 个 LAG,但拥有额外的 LAG 容量不会造成任何问题。

    content_copy zoom_out_map
    [edit chassis]
    user@R1# set aggregated-devices ethernet device-count 10
    
  2. 配置环路(如果需要,本例中不需要)和 IRB 接口,以及 IRB 接口的 VLAN。在此示例中,IRB 接口用于锚定 ICCP 会话。

    content_copy zoom_out_map
    [edit]
    user@R1# set interfaces lo0 unit 0 family inet address 192.168.255.1/32
    user@R1# set interfaces irb unit 100 family inet address 10.0.1.1/24
    user@R1# set bridge-domains vlan100 vlan-id 100
    user@R1# set bridge-domains vlan100 routing-interface irb.100
    
  3. 配置 ae0 接口以支持 ICL 和 ICCP 功能。A vlan-id-list 用于支持一系列 VLAN,其中包括用于 ICCP 的 VLAN 100 和用于 MC-LAG 的 VLAN 10。与 QFX 系列交换机不同, all MX 系列路由器不支持用作支持所有 VLAN 的快捷方式。

    注意:

    ICL 链路必须支持所有 MC-LAG VLAN 以及用于 ICCP 的 VLAN。在此示例中,这意味着您至少必须列出 VLAN 10 和 VLAN 100,因为此示例中的 ae0 链路同时支持 ISL 和 ICCP。

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set xe-0/0/0:0 gigether-options 802.3ad ae0
    user@R1# set xe-0/0/0:1 gigether-options 802.3ad ae0
    user@R1# set ae0 aggregated-ether-options lacp active
    user@R1# set ae0 unit 0 family bridge interface-mode trunk
    user@R1# set ae0 unit 0 family bridge vlan-id-list 2-1000
    
  4. 指定要包含在面向 R0 处聚合以太网捆绑包的服务器中的成员。

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set xe-0/0/1:0 gigether-options 802.3ad ae10
    user@R1# set xe-0/0/1:1 gigether-options 802.3ad ae20
    
  5. 为连接到服务器 1 (ae10) 的 MC-LAG 配置 LACP 和 MC-LAG 参数。MC-LAG 设置为主动-主动模式,在此示例中,使用该语句将 status-control standby R1 设置为备用 MC-LAG 节点。这使得 S0 在运行时成为 ae10 的活动 MC-LAG 节点。如果 S0 失败,R1 将接管为主动节点。LACP chassis-id 使用该语句计算 MC-LAG 的物理成员链路的端口号。按照惯例,为主动节点分配的机箱 ID 为 0,而为备用节点分配 1。

    多机箱聚合以太网标识号 (mc-ae-id ) 指定聚合以太网接口所属的链路聚合组。S0 和 R1 上的 ae10 接口配置了 mc-ae-id 10。以类似的方式,ae20接口配置了 mc-ae-id 20

    ICCP 使用该 redundancy-group 1 语句关联执行类似冗余功能的多个机箱,并建立通信通道,以便对等机箱上的应用程序可以相互发送消息。S0 和 R1 上的 ae10 和 ae20 接口配置了相同的冗余组,即 冗余组 1

    mode 语句指示 MC-LAG 是处于主动-备用模式还是主动-主动模式。同一组中的机箱必须处于同一模式。

    此示例演示了 MX 系列路由器在单元级别(在 MC-LAG 单元下,如下所示)对 ICL 接口规范的支持。如果需要,可以在层次结构的 [edit multi-chassis multi-chassis-protection] 物理设备级别(假定单元为 0)全局指定 ICL 保护链路,如 QFX 系列交换机 S0 所示。

    content_copy zoom_out_map
    [edit interfaces ae10]
    user@R1# set aggregated-ether-options lacp active
    user@R1# set aggregated-ether-options lacp system-id 01:01:01:01:01:01
    user@R1# set aggregated-ether-options lacp admin-key 10
    user@R1# set aggregated-ether-options mc-ae mc-ae-id 10
    user@R1# set aggregated-ether-options mc-ae redundancy-group 1
    user@R1# set aggregated-ether-options mc-ae chassis-id 1
    user@R1# set aggregated-ether-options mc-ae mode active-active
    user@R1# set aggregated-ether-options mc-ae status-control standby
    user@R1# set ae10 unit 0 family bridge interface-mode access
    user@R1# set ae10 unit 0 family bridge vlan-id 10
    user@R1# set ae10 unit 0 multi-chassis-protection 10.0.1.10 interface ae0.0
    
    注意:

    在 MX 平台上,您可以在层次结构中使用 edit multi-chassis multi-chassis-protection 全局级别物理设备声明来指定 ICL 接口,也可以如此处所示在 MC-LAG 捆绑包中的逻辑单元级别指定 ICL 接口。QFX 系列交换机仅支持物理设备的全局级别规范。

  6. 为连接到服务器 2 (ae20) 的 MC-LAG 配置 LACP 和 MC-LAG 参数。MC-LAG 设置为主动-主动模式,在此示例中,R1 设置为活动 MC-LAG 节点。在 R1 发生故障时,S0 将作为 ae20 MC-LAG 的活动节点接管。

    content_copy zoom_out_map
    [edit interfaces ae20]
    user@R1# set aggregated-ether-options lacp active
    user@R1# set aggregated-ether-options lacp system-id 02:02:02:02:02:02
    user@R1# set aggregated-ether-options lacp admin-key 20
    user@R1# set aggregated-ether-options mc-ae mc-ae-id 20
    user@R1# set aggregated-ether-options mc-ae redundancy-group 1
    user@R1# set aggregated-ether-options mc-ae chassis-id 0
    user@R1# set aggregated-ether-options mc-ae mode active-active
    user@R1# set aggregated-ether-options mc-ae status-control active
    user@R1# set unit 0 family bridge interface-mode access
    user@R1# set unit 0 family bridge vlan-id 10
    user@R1# set unit 0 multi-chassis-protection 10.0.1.10 interface ae0.0
  7. 为 ae10 和 ae20 捆绑包配置 VLAN。

    注意:

    在 MX 系列路由器上,您可以在层次结构下 [edit bridge-domains] 定义 VLAN。在 WFX 系列交换机上,此操作在层次结构中 [edit vlans] 完成。这是 QFX 系列交换机和 MX 系列路由器之间的区别之一。

    content_copy zoom_out_map
    [edit bridge-domains]
    user@R1# set vlan10 vlan-id 10
  8. 配置交换机选项服务 ID。

    网桥域中的端口共享相同的泛洪或广播特性,以便执行第 2 层桥接。

    需要 service-id 全局语句来链接跨对等方(在本例中为 S0 和 R1)的相关桥接域,并且必须使用相同的值进行配置。

    content_copy zoom_out_map
    [edit switch-options]
    user@R1# set service-id 100
  9. 配置 ICCP 参数。 localpeer 参数设置为分别反映之前在本地和远程 IRB 接口上配置的值。配置到 IRB(或环路)接口的 ICCP 对等互连可确保 ICCP 会话在遇到个别链路故障时能够保持正常运行。

    content_copy zoom_out_map
    [edit protocols iccp]
    user@R1# set local-ip-addr 10.0.1.1
    user@R1# set peer 10.0.1.10 session-establishment-hold-time 50
    user@R1# set peer 10.0.1.10 redundancy-group-id-list 1
    user@R1# set peer 10.0.1.10 liveness-detection minimum-interval 1000
    
  10. 在全局级别配置服务 ID。您必须为提供服务的 PE 设备集中的服务配置相同的唯一网络范围配置。如果多机箱聚合以太网接口是桥接域的一部分,则需要此服务 ID。

    content_copy zoom_out_map
    [edit switch-options]
    user@R1# set service-id 100
    

R1 结果

在配置模式下,输入 show 命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。

content_copy zoom_out_map
[edit]
user@R1# show
. . .
chassis {
    aggregated-devices {
        ethernet {
            device-count 10;
        }
    }
}
interfaces {
    xe-0/0/0:0 {
        gigether-options {
            802.3ad ae0;
        }
    }
    xe-0/0/0:1 {
        gigether-options {
            802.3ad ae0;
        }
    }
    xe-0/0/0:2 {
        gigether-options {
            802.3ad ae1;
        }
    }
    xe-0/0/0:3 {
        gigether-options {
            802.3ad ae1;
        }
    }
    xe-0/0/1:0 {
        gigether-options {
            802.3ad ae10;
        }
    }
    xe-0/0/1:1 {
        gigether-options {
            802.3ad ae20;
        }
    }
    ae0 {
        aggregated-ether-options {
            lacp {
                active;
            }
        }
        unit 0 {
            family bridge {
                interface-mode trunk;
                vlan-id-list 2-1000;
            }
        }
    }
    ae10 {
        aggregated-ether-options {
            lacp {
                active;
                system-id 01:01:01:01:01:01;
                admin-key 10;
            }
            mc-ae {
                mc-ae-id 10;
                redundancy-group 1;
                chassis-id 1;
                mode active-active;
                status-control standby;
            }
        }
        unit 0 {
            multi-chassis-protection 10.0.1.10 {
                interface ae0.0;
            }
            family bridge {
                interface-mode access;
                vlan-id 10;
            }
        }
    }
    ae20 {
        aggregated-ether-options {
            lacp {
                active;
                system-id 02:02:02:02:02:02;
                admin-key 20;
            }
            mc-ae {
                mc-ae-id 20;
                redundancy-group 1;
                chassis-id 0;
                mode active-active;
                status-control active;
            }
        }
        unit 0 {
            multi-chassis-protection 10.0.1.10 {
                interface ae0.0;
            }
            family bridge {
                interface-mode access;
                vlan-id 10;
            }
        }
    }
    irb {
        unit 100 {
            family inet {
                address 10.0.1.1/24;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 192.168.255.1/32;
            }
        }
    }
}
protocols {
    iccp {
        local-ip-addr 10.0.1.1;
        peer 10.0.1.10 {
            session-establishment-hold-time 50;
            redundancy-group-id-list 1;
            liveness-detection {
                minimum-interval 1000;
            }
        }
    }
}
bridge-domains {
    vlan10 {
        vlan-id 10;
    }
    vlan100 {
        vlan-id 100;
        routing-interface irb.100;
    }
}
switch-options {
    service-id 100;
}

验证

通过运行以下操作模式命令确认配置工作正常:

  • show iccp

  • show interfaces mc-ae

  • show interfaces aeX (0, 10, and 20)

  • 在 QFX 系列交换机上使用和show vlansshow ethernet-switching table命令

  • 在 MX 系列路由器show bridge mac-table 上使用命令

  • 验证服务器之间的第 2 层连接

运行选择验证命令以显示预期输出。我们从 show iccp S0 上的命令开始。如果未建立 ICCP 会话,请在 IRB 接口之间发出 ping 命令,以确保通过 ae0 ICCP/ICL 链路实现预期的第 2 层连接:

content_copy zoom_out_map
user@S0# show iccp
Redundancy Group Information for peer 10.0.1.1
  TCP Connection       : Established
  Liveliness Detection : Up
  Redundancy Group ID          Status
    1                           Up   

Client Application: l2ald_iccpd_client
  Redundancy Group IDs Joined: 1 

Client Application: lacpd
  Redundancy Group IDs Joined: 1 

接下来,我们在 S0 上运行 show interfaces mc-ae extensive 命令。输出确认两个 MC-LAG 的预期主动-主动状态和状态控制主动/备用状态。回想一下,在此示例中,S0 是 ae10 的状态控制活动节点和 ae20 的备用节点:

content_copy zoom_out_map
user@S0# show interfaces mc-lag extensive
 Member Link                  : ae10
 Current State Machine's State: mcae active state
 Local Status                 : active
 Local State                  : up
 Peer Status                  : active
 Peer State                   : up
     Logical Interface        : ae10.0
     Topology Type            : bridge
     Local State              : up
     Peer State               : up
     Peer Ip/MCP/State        : 10.0.1.1 ae0.0 up
 
 MCAE Configuration
     Redundancy Group         : 1
     MCAE ID                  : 10
     MCAE Mode                : active_active
     Status Control           : active
     Chassis ID               : 0
 LACP Configuration
     System ID                : 01:01:01:01:01:01
     Admin Key                : 10
 LACP Information
     Local Partner System ID  : 2c:6b:f5:20:55:c0
     Peer Partner System ID   : 2c:6b:f5:20:55:c0

 Member Link                  : ae20
 Current State Machine's State: mcae active state
 Local Status                 : active
 Local State                  : up
 Peer Status                  : active
 Peer State                   : up
     Logical Interface        : ae20.0  
     Topology Type            : bridge
     Local State              : up
     Peer State               : up
     Peer Ip/MCP/State        : 10.0.1.1 ae0.0 up
 
 MCAE Configuration
     Redundancy Group         : 1
     MCAE ID                  : 20
     MCAE Mode                : active_active
     Status Control           : standby
     Chassis ID               : 1
 LACP Configuration
     System ID                : 02:02:02:02:02:02
     Admin Key                : 20
 LACP Information
     Local Partner System ID  : 2c:6b:f5:13:24:c0
     Peer Partner System ID   : 2c:6b:f5:13:24:c0

show interfaces 命令用于确认 ICCP/ICL,并且 MC-LAG 束已启动。为简洁起见,仅显示 ae10 束的输出。所有 AE 接口(ae0、ae10 和 ae20)都应启动:

content_copy zoom_out_map
user@S0# show interfaces ae10
 Physical interface: ae10 (MC-AE-10, active), Enabled, Physical link is Up
  Interface index: 670, SNMP ifIndex: 561
  Link-level type: Ethernet, MTU: 1514, Speed: 10Gbps, BPDU Error: None, Ethernet-Switching Error: None, MAC-REWRITE Error: None,
  Loopback: Disabled, Source filtering: Disabled, Flow control: Disabled, Minimum links needed: 1, Minimum bandwidth needed: 1bps
  Device flags   : Present Running
  Interface flags: SNMP-Traps Internal: 0x4000
  Current address: 02:05:86:72:a9:f7, Hardware address: 02:05:86:72:a9:f7
  Last flapped   : 2021-04-08 11:56:43 PDT (02:37:24 ago)
  Input rate     : 0 bps (0 pps)
  Output rate    : 992 bps (0 pps)

  Logical interface ae10.0 (Index 578) (SNMP ifIndex 562)
    Flags: Up SNMP-Traps 0x24024000 Encapsulation: Ethernet-Bridge
    Statistics        Packets        pps         Bytes          bps
    Bundle:
        Input :          9454          0        963310          776
        Output:          9429          0       1204640          968
    Adaptive Statistics:
        Adaptive Adjusts:          0
        Adaptive Scans  :          0
        Adaptive Updates:          0
    Protocol eth-switch, MTU: 1514

show vlans detailshow ethernet-switching table命令用于确认 S0 设备上 ICCP/ICL 和 MC-LAG 接口的 VLAN 定义和映射:

content_copy zoom_out_map
user@S0# show vlans detail
 Routing instance: default-switch
VLAN Name: vlan10                            State: Active
Tag: 10                                 
Internal index: 3, Generation Index: 3, Origin: Static
MAC aging time: 300 seconds
VXLAN Enabled : No  
Interfaces:
    ae0.0*,tagged,trunk
    ae10.0*,untagged,access
    ae20.0*,untagged,access
Number of interfaces: Tagged 1    , Untagged 2    
Total MAC count: 2 

Routing instance: default-switch
VLAN Name: vlan100                        State: Active
Tag: 100                                
Internal index: 2, Generation Index: 2, Origin: Static
MAC aging time: 300 seconds
Layer 3 interface: irb.100
VXLAN Enabled : No  
Interfaces:
    ae0.0*,tagged,trunk
Number of interfaces: Tagged 1    , Untagged 0    
Total MAC count: 

show ethernet-switching table
MAC flags (S - static MAC, D - dynamic MAC, L - locally learned, P - Persistent static, C - Control MAC
           SE - statistics enabled, NM - non configured MAC, R - remote PE MAC, O - ovsdb MAC)


Ethernet switching table : 2 entries, 2 learned
Routing instance : default-switch
    Vlan                MAC                 MAC         Age    Logical                NH        RTR 
    name                address             flags              interface              Index     ID
    vlan10                 2c:6b:f5:13:24:c2   DLR           -   ae20.0                 0         0       
    vlan10                 2c:6b:f5:20:55:c3   DL            -   ae10.0                 0         0       

最后,在服务器 1 和 2 之间执行 ping 操作以确认第 2 层连接:

content_copy zoom_out_map
user@Server1# ping 172.16.1.2 count 2
 PING 172.16.1.2 (172.16.1.2): 56 data bytes
64 bytes from 172.16.1.2: icmp_seq=0 ttl=64 time=56.529 ms
64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=117.029 ms

--- 172.16.1.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 56.529/86.779/117.029/30.250 ms
content_copy zoom_out_map
user@Server1# ping 2001:db8:172:16:1::2 count 2
PING6(56=40+8+8 bytes) 2001:db8:172:16:1::1 --> 2001:db8:172:16:1::2
16 bytes from 2001:db8:172:16:1::2, icmp_seq=0 hlim=64 time=154.164 ms
16 bytes from 2001:db8:172:16:1::2, icmp_seq=1 hlim=64 time=167.032 ms

--- 2001:db8:172:16:1::2 ping6 statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/std-dev = 154.164/160.598/167.032/6.434 ms

示例:为 MC-LAG 中的 FCoE 中继交换机流量配置 CoS

多机箱链路聚合组 (MC-LAG) 可在两台交换机之间提供冗余和负载平衡,为服务器等客户端设备提供多宿主支持,以及无需运行生成树协议 (STP) 的无环路第 2 层网络。

注意:

此示例使用 Junos OS,不支持增强型第 2 层软件 (ELS) 配置样式。如果您的交换机运行的软件支持 ELS,请参阅 示例:使用 ELS 配置 CoS,以便通过 MC-LAG 传输 FCoE 传输交换机流量。有关 ELS 的详细信息,请参阅 使用增强型第 2 层软件 CLI

您可以使用 MC-LAG 为 倒 U 拓扑中的以太网光纤通道 (FCoE) 流量提供冗余聚合层。要支持通过 MC-LAG 无损传输 FCoE 流量,必须在具有 MC-LAG 端口成员的两台交换机上配置适当的服务等级 (CoS)。两台 MC-LAG 交换机上的 CoS 配置必须相同,因为 MC-LAG 不携带转发类和 IEEE 802.1p 优先级信息。

注意:

此示例介绍如何配置 CoS 以便为通过连接两台交换机的 MC-LAG 的 FCoE 流量提供无损传输。它还介绍如何在将 FCoE 主机连接到构成 MC-LAG 的两台交换机的 FCoE 中转交换机上配置 CoS。

此示例 介绍如何配置 MC-LAG 本身。但是,此示例包含 MC-LAG 配置的子集,该子集仅显示如何在 MC-LAG 中配置接口成员身份。

属于 FCoE-FC 网关配置(虚拟 FCoE-FC 网关结构)的端口不支持 MC-LAG。作为 MC-LAG 成员的端口充当 FCoE 直通中转交换机端口。

QFX 系列交换机和 EX4600 交换机支持 MC-LAG。QFabric 系统节点设备不支持 MC-LAG。

要求

此示例使用以下硬件和软件组件:

  • 两台瞻博网络QFX3500交换机组成一个 MC-LAG,用于传输 FCoE 流量。

  • 两台瞻博网络QFX3500交换机,它们在传输交换机模式下提供 FCoE 服务器访问并连接到 MC-LAG 交换机。这些交换机可以是独立的交换机QFX3500也可以是 QFabric 系统中的节点设备。

  • 连接到中转交换机的 FCoE 服务器(或其他 FCoE 主机)。

  • 适用于 QFX 系列的 Junos OS 12.2 或更高版本。

概述

FCoE 流量需要无损传输。此示例说明如何:

  • 为构成 MC-LAG 的两台 QFX3500 交换机上的 FCoE 流量配置 CoS,包括基于优先级的流量控制 (PFC) 和增强型传输选择(ETS;FCoE 转发类优先级和转发类集优先级组的资源分层调度)。

    注意:

    在接口上配置或更改 PFC 会阻止整个端口,直到 PFC 更改完成。完成 PFC 更改后,端口将畅通无阻,流量将恢复。阻止端口会停止入口和出口流量,并导致端口上所有队列上的数据包丢失,直到端口被取消阻止。

  • 在将 FCoE 主机连接到 MC-LAG 交换机并在 FCoE 中继交换机接入端口的 FCoE VLAN 上为 FCoE 配置 CoS。

  • 禁用 FCoE VLAN 上的 IGMP 侦听。

    注意:

    仅当在 VLAN 上启用了 IGMP 侦听时,才需要执行此操作。在 Junos OS 13.2 版之前,默认情况下在 VLAN 上启用 IGMP 侦听。从 Junos OS 13.2 版开始,默认情况下仅在默认 VLAN 上启用 IGMP 侦听。

  • 为每个接口配置适当的端口模式、MTU 和 FCoE 可信或不受信任状态,以支持无损 FCoE 传输。

拓扑学

充当中转交换机的交换机支持倒U 网络拓扑中 FCoE 流量的 MC-LAG,如图 6 所示。

图 6:FCoE 传输交换机 Supported Topology for an MC-LAG on an FCoE Transit Switch上 MC-LAG 支持的拓扑结构

表 3 显示了此示例的配置组件。

表 3:跨 MC-LAG 配置拓扑的 FCoE 流量的 CoS 组件

元件

设置

硬件

4 台 QFX3500 交换机(两台组成 MC-LAG 作为直通中转交换机,两台中转交换机用于 FCoE 接入)。

转发类(所有交换机)

默认 fcoe 转发类。

分类器(将传入流量的类映射转发到 IEEE 优先级)

所有 FCoE 接口上的默认 IEEE 802.1p 可信分类器。

LAG 和 MC-LAG

S1 — 端口 xe-0/0/10 和 x-0/0/11 是将交换机 S1 连接到交换机 S2 的 LAG ae0 的成员。端口 xe-0/0/20 和 xe-0/0/21 是 MC-LAG ae1 的成员。所有端口均配置为 trunk 端口模式,如 fcoe-trusted,MTU 为 2180

S2 — 端口 xe-0/0/10 和 x-0/0/11 是将交换机 S2 连接到交换机 S1 的 LAG ae0 的成员。端口 xe-0/0/20 和 xe-0/0/21 是 MC-LAG ae1 的成员。所有端口均配置为 trunk 端口模式,如 fcoe-trusted,MTU 为 2180

注意:

交换机 S1 和 S2 上的端口 xe-0/0/20 和 xe-0/0/21 是 MC-LAG 的成员。

TS1 — 端口 xe-0/0/25 和 x-0/0/26 是 LAG ae1 的成员,在 trunk 端口模式下配置为 ,且 fcoe-trustedMTU 为 2180端口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33 配置为 tagged-access 端口模式,MTU 为 2180

TS2 — 端口 xe-0/0/25 和 x-0/0/26 是 LAG ae1 的成员,在端口模式下配置为 trunk ,MTU fcoe-trusted2180端口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33 配置为 tagged-access 端口模式,MTU 为 2180

FCoE 队列调度程序(所有交换机)

fcoe-sched最小带宽 3g最大带宽 100%优先级 low

转发类到调度程序的映射(所有交换机)

调度器映射 fcoe-map转发类 fcoe调度器 fcoe-sched

转发类集(FCoE 优先级组、所有交换机)

fcoe-pg转发类 fcoe

出口接口:

  • S1 - LAG ae0 和 MC-LAG ae1

  • S2 - LAG ae0 和 MC-LAG ae1

  • TS1—LAG ae1、接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33

  • TS2 — LAG ae1、接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33

流量控制配置文件(所有交换机)

fcoe-tcp调度器映射 fcoe-map最小带宽 3g最大带宽 100%

PFC 拥塞通知配置文件(所有交换机)

fcoe-cnp代码点 011

入口接口:

  • S1 - LAG ae0 和 MC-LAG ae1

  • S2 - LAG ae0 和 MC-LAG ae1

  • TS1—LAG ae1、接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33

  • TS2 — LAG ae1、接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33

FCoE VLAN 名称和标记 ID

姓名—fcoe_vlanID—100

在所有四台交换机上传输 FCoE 流量的接口上包括 FCoE VLAN。

对所有四台交换机上属于 FCoE VLAN 的接口禁用 IGMP 侦听。

FIP 侦听

在 FCoE VLAN 上的中转交换机 TS1 和 TS2 上启用 FIP 侦听。将连接到 MC-LAG 交换机的 LAG 接口配置为 FCoE 可信接口,以便它们不执行 FIP 侦听。

此示例在连接到 FCoE 服务器的 FCoE 传输交换机接口上启用VN2VN_Port FIP 侦听。在传输交换机接入端口上启用 FIP 侦听VN2VF_Port该示例同样有效。启用的 FIP 侦听方法取决于您的网络配置。

注意:

此示例使用默认的 IEEE 802.1p 可信 BA 分类器,如果未应用显式配置的分类器,该分类器将自动应用于中继模式和标记的访问模式端口。

要为 MC-LAG 上的 FCoE 流量配置 CoS,请执行以下操作:

  • 使用默认的 FCoE 转发类和转发类到队列的映射(不要显式配置 FCoE 转发类或输出队列)。默认 FCoE 转发类为 fcoe,默认输出队列为 queue 3

    注意:

    在 Junos OS 12.2 版中,映射到显式配置的转发类(甚至是 fcoe无损转发类,如 )的流量将被视为有损 (best-effort) 流量, 不会 得到无损处理。要在 12.2 版中接受无损处理,流量必须使用默认的无损转发类fcoe ( 或 no-loss)。

    在 Junos OS 12.3 版及更高版本中,您可以在显式转发类配置中包含 无损 丢包属性,以配置无损转发类。

  • 使用默认的可信 BA 分类器,该分类器按数据包的 IEEE 802.1p 代码点(CoS 优先级)将传入数据包映射到转发类。可信分类器是中继和标记访问端口模式下接口的默认分类器。默认可信分类器将具有 IEEE 802.1p 代码点 3 (011) 的传入数据包映射到 FCoE 转发类。如果选择配置 BA 分类器而不是使用默认分类器,则必须确保在两台 MC-LAG 交换机上以完全相同的方式将 FCoE 流量分类为转发类。使用默认分类器可确保 MC-LAG 端口上的分类器配置一致。

  • 配置在 FCoE 代码点(此示例中的代码点 011 )上启用 PFC 的拥塞通知配置文件。两台 MC-LAG 交换机上的拥塞通知配置文件配置必须相同。

  • 将拥塞通知配置文件应用于接口。

  • 在接口上配置增强型传输选择(ETS,也称为分层调度),以提供无损 FCoE 传输所需的带宽。配置 ETS 包括为 FCoE 转发类配置带宽调度、包含 FCoE 转发类的转发类集(优先级组)以及用于将带宽分配给包含 FCoE 流量的转发类集的流量控制配置文件。

  • 将 ETS 调度应用于接口。

  • 为每个接口配置端口模式、MTU 和 FCoE 可信或不受信任状态,以支持无损 FCoE 传输。

此外,此示例还介绍如何在连接到 FCoE 服务器的中转交换机 TS1 和 TS2 端口上启用 FIP 侦听,以及如何在 FCoE VLAN 上禁用 IGMP 侦听。要提供安全访问,必须在 FCoE 访问端口上启用 FIP 侦听。

此示例重点介绍支持跨 MC-LAG 的无损 FCoE 传输的 CoS 配置。此示例不介绍如何配置 MC-LAG 和 LAG 的属性,但会向您展示如何配置支持无损传输所需的端口特征,以及如何为 MC-LAG 和 LAG 分配接口。

配置 CoS 之前,请配置:

  • 将交换机 S1 和 S2 连接到交换机 TS1 和 TS2 的 MC-LAG。

  • 将传输交换机 TS1 和 TS2 连接到 MC-LAG 交换机 S1 和 S2 的 LAG。

  • 将交换机 S1 连接到交换机 S2 的 LAG。

配置

要配置 CoS 以便通过 MC-LAG 进行无损 FCoE 传输,请执行以下操作:

CLI 快速配置

要快速配置 CoS 以实现通过 MC-LAG 的无损 FCoE 传输,请复制以下命令,将其粘贴到文本文件中,删除换行符,更改变量和详细信息以匹配您的网络配置,然后将命令复制并粘贴到层次结构级别的 MC-LAG 交换机 S1 和 MC-LAG 交换机 S2 [edit] 的 CLI 中。交换机 S1 和 S2 上的配置相同,因为 CoS 配置必须相同,并且此示例在两台交换机上使用相同的端口。

交换机 S1 和交换机 S2

content_copy zoom_out_map
set class-of-service schedulers fcoe-sched priority low transmit-rate 3g 
set class-of-service schedulers fcoe-sched shaping-rate percent 100 
set class-of-service scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched
set class-of-service forwarding-class-sets fcoe-pg class fcoe
set class-of-service traffic-control-profiles fcoe-tcp scheduler-map fcoe-map guaranteed-rate 3g 
set class-of-service traffic-control-profiles fcoe-tcp shaping-rate percent 100 
set class-of-service interfaces ae0 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service interfaces ae1 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc
set class-of-service interfaces ae0 congestion-notification-profile fcoe-cnp
set class-of-service interfaces ae1 congestion-notification-profile fcoe-cnp
set vlans fcoe_vlan vlan-id 100
set protocols igmp-snooping vlan fcoe_vlan disable
set interfaces xe-0/0/10 ether-options 802.3ad ae0
set interfaces xe-0/0/11 ether-options 802.3ad ae0
set interfaces xe-0/0/20 ether-options 802.3ad ae1
set interfaces xe-0/0/21 ether-options 802.3ad ae1
set interfaces ae0 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan
set interfaces ae1 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan
set interfaces ae0 mtu 2180
set interfaces ae1 mtu 2180
set ethernet-switching-options secure-access-port interface ae0 fcoe-trusted
set ethernet-switching-options secure-access-port interface ae1 fcoe-trusted

要快速配置 CoS 以实现通过 MC-LAG 的无损 FCoE 传输,请复制以下命令,将其粘贴到文本文件中,删除换行符,更改变量和详细信息以匹配您的网络配置,然后将命令复制并粘贴到层次结构级别的中转交换机 TS1 和中转交换机 TS2 [edit] 的 CLI 中。交换机 TS1 和 TS2 上的配置相同,因为 CoS 配置必须相同,并且此示例在两台交换机上使用相同的端口。

交换机 TS1 和交换机 TS2

content_copy zoom_out_map
set class-of-service schedulers fcoe-sched priority low transmit-rate 3g 
set class-of-service schedulers fcoe-sched shaping-rate percent 100 
set class-of-service scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched
set class-of-service forwarding-class-sets fcoe-pg class fcoe
set class-of-service traffic-control-profiles fcoe-tcp scheduler-map fcoe-map guaranteed-rate 3g 
set class-of-service traffic-control-profiles fcoe-tcp shaping-rate percent 100 
set class-of-service interfaces ae1 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service interfaces xe-0/0/30 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service interfaces xe-0/0/31 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service interfaces xe-0/0/32 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service interfaces xe-0/0/33 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
set class-of-service congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc
set class-of-service interfaces ae1 congestion-notification-profile fcoe-cnp
set class-of-service interfaces xe-0/0/30 congestion-notification-profile fcoe-cnp
set class-of-service interfaces xe-0/0/31 congestion-notification-profile fcoe-cnp
set class-of-service interfaces xe-0/0/32 congestion-notification-profile fcoe-cnp
set class-of-service interfaces xe-0/0/33 congestion-notification-profile fcoe-cnp
set vlans fcoe_vlan vlan-id 100
set protocols igmp-snooping vlan fcoe_vlan disable
set interfaces xe-0/0/25 ether-options 802.3ad ae1
set interfaces xe-0/0/26 ether-options 802.3ad ae1
set interfaces ae1 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan
set interfaces xe-0/0/30 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
set interfaces xe-0/0/31 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
set interfaces xe-0/0/32 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
set interfaces xe-0/0/33 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
set interfaces ae1 mtu 2180
set interfaces xe-0/0/30 mtu 2180
set interfaces xe-0/0/31 mtu 2180
set interfaces xe-0/0/32 mtu 2180
set interfaces xe-0/0/33 mtu 2180
set ethernet-switching-options secure-access-port interface ae1 fcoe-trusted
set ethernet-switching-options secure-access-port vlan fcoe_vlan examine-fip examine-vn2v2 beacon-period 90000

配置 MC-LAG 交换机 S1 和 S2

分步过程

要配置 CoS 资源调度 (ETS)、PFC、FCoE VLAN 以及 LAG 和 MC-LAG 接口成员资格和特征,以支持跨 MC-LAG 的无损 FCoE 传输(此示例使用默认 fcoe 转发类和默认分类器将传入的 FCoE 流量映射到 FCoE IEEE 802.1p 代码点 011,因此您无需对其进行配置):

  1. 配置 FCoE 队列的输出调度。

    content_copy zoom_out_map
    [edit class-of-service schedulers fcoe-sched]
    user@switch# set priority low transmit-rate 3g 
    user@switch# set shaping-rate percent 100 

  2. 将 FCoE 转发类映射到 FCoE 调度程序 (fcoe-sched)。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched

  3. 为 FCoE 流量配置转发类集 (fcoe-pg)。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set forwarding-class-sets fcoe-pg class fcoe

  4. 定义要在 FCoE 转发类集上使用的信息流控制配置文件 (fcoe-tcp)。

    content_copy zoom_out_map
    [edit class-of-service traffic-control-profiles fcoe-tcp]
    user@switch# set scheduler-map fcoe-map guaranteed-rate 3g 
    user@switch# set shaping-rate percent 100 

  5. 将 FCoE 转发类集和流量控制配置文件应用于 LAG 和 MC-LAG 接口。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set interfaces ae0 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
    user@switch# set interfaces ae1 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

  6. 通过创建将 FCoE 应用于 IEEE 802.1 代码点011的拥塞通知配置文件 (fcoe-cnp) 在 FCoE 优先级上启用 PFC。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc
    

  7. 将 PFC 配置应用到 LAG 和 MC-LAG 接口。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set interfaces ae0 congestion-notification-profile fcoe-cnp
    user@switch# set interfaces ae1 congestion-notification-profile fcoe-cnp

  8. 为 FCoE 流量配置 VLAN (fcoe_vlan)。

    content_copy zoom_out_map
    [edit vlans]
    user@switch# set fcoe_vlan vlan-id 100                         

  9. 禁用 FCoE VLAN 上的 IGMP 侦听。

    content_copy zoom_out_map
    [edit protocols]
    user@switch# set igmp-snooping vlan fcoe_vlan disable

  10. 将成员接口添加到两个 MC-LAG 交换机之间的 LAG。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/10 ether-options 802.3ad ae0
    user@switch# set xe-0/0/11 ether-options 802.3ad ae0

  11. 将成员接口添加到 MC-LAG。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/20 ether-options 802.3ad ae1
    user@switch# set xe-0/0/21 ether-options 802.3ad ae1

  12. 为 LAG (ae0) 和 MC-LAG (ae1) 配置 FCoE VLAN (fcoe_vlan) 中的端口模式trunk和成员资格。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set ae0 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan
    user@switch# set ae1 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan

  13. 将 LAG 和 MC-LAG 接口的 MTU 设置为。2180

    2180 字节是处理 FCoE 数据包所需的最小大小,因为有效负载和标头大小。如果需要,您可以将 MTU 配置为更高的字节数,但不少于 2180 字节。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set ae0 mtu 2180
    user@switch# set ae1 mtu 2180

  14. 将 LAG 和 MC-LAG 接口设置为 FCoE 可信端口。

    连接到其他交换机的端口应受信任,不应执行 FIP 侦听。

    content_copy zoom_out_map
    [edit ethernet-switching-options secure-access-port interface]
    user@switch# set ae0 fcoe-trusted
    user@switch# set ae1 fcoe-trusted

配置 FCoE 中继交换机 TS1 和 TS2

分步过程

FCoE 中继交换机 TS1 和 TS2 上的 CoS 配置类似于 MC-LAG 交换机 S1 和 S2 上的 CoS 配置。但是,端口配置不同,您必须在交换机 TS1 和交换机 TS2 FCoE 接入端口上启用 FIP 侦听。

要配置资源调度 (ETS)、PFC、FCoE VLAN 以及 LAG 接口成员资格和特征以支持跨 MC-LAG 的无损 FCoE 传输(此示例使用默认 fcoe 转发类和默认分类器将传入 FCoE 流量映射到 FCoE IEEE 802.1p 代码点 011,因此无需对其进行配置):

  1. 配置 FCoE 队列的输出调度。

    content_copy zoom_out_map
    [edit class-of-service schedulers fcoe-sched]
    user@switch# set priority low transmit-rate 3g 
    user@switch# set shaping-rate percent 100 

  2. 将 FCoE 转发类映射到 FCoE 调度程序 (fcoe-sched)。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched

  3. 为 FCoE 流量配置转发类集 (fcoe-pg)。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set forwarding-class-sets fcoe-pg class fcoe

  4. 定义要在 FCoE 转发类集上使用的信息流控制配置文件 (fcoe-tcp)。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set traffic-control-profiles fcoe-tcp scheduler-map fcoe-map guaranteed-rate 3g 
    user@switch# set traffic-control-profiles fcoe-tcp shaping-rate percent 100 

  5. 将 FCoE 转发类集和流量控制配置文件应用于 LAG 接口和 FCoE 接入接口。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set interfaces ae1 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
    user@switch# set interfaces xe-0/0/30 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
    user@switch# set interfaces xe-0/0/31 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
    user@switch# set interfaces xe-0/0/32 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp
    user@switch# set interfaces xe-0/0/33 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

  6. 通过创建将 FCoE 应用于 IEEE 802.1 代码点011的拥塞通知配置文件 (fcoe-cnp) 在 FCoE 优先级上启用 PFC。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc
    

  7. 将 PFC 配置应用到 LAG 接口和 FCoE 接入接口。

    content_copy zoom_out_map
    [edit class-of-service]
    user@switch# set interfaces ae1 congestion-notification-profile fcoe-cnp
    user@switch# set interfaces xe-0/0/30 congestion-notification-profile fcoe-cnp
    user@switch# set interfaces xe-0/0/31 congestion-notification-profile fcoe-cnp
    user@switch# set interfaces xe-0/0/32 congestion-notification-profile fcoe-cnp
    user@switch# set interfaces xe-0/0/33 congestion-notification-profile fcoe-cnp

  8. 为 FCoE 流量配置 VLAN (fcoe_vlan)。

    content_copy zoom_out_map
    [edit vlans]
    user@switch# set fcoe_vlan vlan-id 100                         

  9. 禁用 FCoE VLAN 上的 IGMP 侦听。

    content_copy zoom_out_map
    [edit protocols]
    user@switch# set igmp-snooping vlan fcoe_vlan disable

  10. 将成员接口添加到 LAG。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/25 ether-options 802.3ad ae1
    user@switch# set xe-0/0/26 ether-options 802.3ad ae1

  11. 在 LAG (ae1) 上,将端口模式 trunk 配置为 FCoE VLAN 中的成员资格 (fcoe_vlan)。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set ae1 unit 0 family ethernet-switching port-mode trunk vlan members fcoe_vlan

  12. 在 FCoE 接入接口 (xe-0/0/30xe-0/0/31xe-0/0/32xe-0/0/33) 上,将端口模式tagged-access配置为 FCoE VLAN 中的成员资格 (fcoe_vlan)。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/30 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
    user@switch# set xe-0/0/31 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
    user@switch# set xe-0/0/32 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan
    user@switch# set xe-0/0/33 unit 0 family ethernet-switching port-mode tagged-access vlan members fcoe_vlan

  13. 将 LAG 和 FCoE 接入接口的 MTU 设置为。2180

    2180 字节是处理 FCoE 数据包所需的最小大小,因为有效负载和标头大小;如果需要,您可以将 MTU 配置为更高的字节数,但不少于 2180 字节。

    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set ae1 mtu 2180
    user@switch# set xe-0/0/30 mtu 2180
    user@switch# set xe-0/0/31 mtu 2180
    user@switch# set xe-0/0/32 mtu 2180
    user@switch# set xe-0/0/33 mtu 2180
    

  14. 将 LAG 接口设置为 FCoE 可信端口。连接到其他交换机的端口应受信任,不应执行 FIP 侦听:

    content_copy zoom_out_map
    [edit ethernet-switching-options]
    user@switch# set secure-access-port interface ae1 fcoe-trusted
    注意:

    接入端口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33 未配置为 FCoE 可信端口。访问端口仍处于不受信任端口的默认状态,因为它们直接连接到 FCoE 设备,并且必须执行 FIP 侦听以确保网络安全。

  15. 在 FCoE VLAN 上启用 FIP 侦听以防止未经授权的 FCoE 网络访问(此示例使用 VN2VN_Port FIP 侦听;如果使用 FIP 侦听,则示例同样有效VN2VF_Port)。

    content_copy zoom_out_map
    [edit ethernet-switching-options]
    user@switch# set secure-access-port vlan fcoe_vlan examine-fip examine-vn2vn beacon-period 90000

结果

显示 MC-LAG 交换机 S1 和 MC-LAG 交换机 S2 上的 CoS 配置结果(两台交换机上的结果相同)。

content_copy zoom_out_map
user@switch> show configuration class-of-service    
traffic-control-profiles {
    fcoe-tcp {
        scheduler-map fcoe-map;
        shaping-rate percent 100;
        guaranteed-rate 3g;
    }
}
forwarding-class-sets {
    fcoe-pg {
        class fcoe;
    }
}
congestion-notification-profile {
    fcoe-cnp {
        input {
            ieee-802.1 {
                code-point 011 {
                    pfc;
                }
            }
        }
    }
}
interfaces {
    ae0 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
    ae1 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
}
scheduler-maps {
    fcoe-map {
        forwarding-class fcoe scheduler fcoe-sched;
    }
}
schedulers {
    fcoe-sched {
        transmit-rate 3g;
        shaping-rate percent 100;
        priority low;
    }
}
注意:

不显示转发类和分类器配置,因为 show 该命令不显示配置的默认部分。

显示 FCoE 中继交换机 TS1 和 FCoE 中继交换机 TS2 上的 CoS 配置结果(两台传输交换机上的结果相同)。

content_copy zoom_out_map
user@switch> show configuration class-of-service    
traffic-control-profiles {
    fcoe-tcp {
        scheduler-map fcoe-map;
        shaping-rate percent 100;
        guaranteed-rate 3g;
    }
}
forwarding-class-sets {
    fcoe-pg {
        class fcoe;
    }
}
congestion-notification-profile {
    fcoe-cnp {
        input {
            ieee-802.1 {
                code-point 011 {
                    pfc;
                }
            }
        }
    }
}
interfaces {
    xe-0/0/30 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
    xe-0/0/31 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
    xe-0/0/32 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
    xe-0/0/33 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
    ae1 {
        forwarding-class-set {
            fcoe-pg {
                output-traffic-control-profile fcoe-tcp;
            }
        }
        congestion-notification-profile fcoe-cnp;
    }
}
scheduler-maps {
    fcoe-map {
        forwarding-class fcoe scheduler fcoe-sched;
    }
}
schedulers {
    fcoe-sched {
        transmit-rate 3g;
        shaping-rate percent 100;
        priority low;
    }
}

验证

要验证 CoS 组件和 FIP 侦听是否已配置且运行正常,请执行以下任务。由于此示例使用默认 fcoe 转发类和默认 IEEE 802.1p 可信分类器,因此不会显示这些配置的验证。

验证是否已创建输出队列调度程序

目的

验证 FCoE 流量的输出队列调度程序是否具有正确的带宽参数和优先级,并映射到正确的转发类(输出队列)。四台交换机上的队列调度程序验证相同。

行动

使用操作模式命令 show class-of-service scheduler-map fcoe-map列出调度器图:

content_copy zoom_out_map
user@switch> show class-of-service scheduler-map fcoe-map
Scheduler map: fcoe-map, Index: 9023

  Scheduler: fcoe-sched, Forwarding class: fcoe, Index: 37289
    Transmit rate: 3000000000 bps, Rate Limit: none, Buffer size: remainder,
    Buffer Limit: none, Priority: low
    Excess Priority: unspecified
    Shaping rate: 100 percent,
    drop-profile-map-set-type: mark
    Drop profiles:
      Loss priority   Protocol    Index    Name
      Low             any             1    <default-drop-profile>
      Medium high     any             1    <default-drop-profile>
      High            any             1    <default-drop-profile>
意义

show class-of-service scheduler-map fcoe-map 命令列出了调度程序映射 fcoe-map的属性。命令输出包括:

  • 调度器映射的名称 (fcoe-map

  • 调度程序的名称 (fcoe-sched

  • 映射到调度程序的转发类 (fcoe

  • 最小保证队列带宽(传输速率 3000000000 bps

  • 调度优先级 (low

  • 队列可以使用的优先级组中的最大带宽(整形速率 100 percent

  • 每个丢弃配置文件名称的丢弃配置文件丢失优先级。此示例不包括丢弃配置文件,因为您不会将丢弃配置文件应用于 FCoE 流量。

验证是否已创建优先级组输出调度程序(流量控制配置文件)

目的

验证是否已使用正确的带宽参数和调度程序映射创建流量控制配置文件 fcoe-tcp 。四台交换机上的优先级组调度程序验证相同。

行动

使用操作模式命令 show class-of-service traffic-control-profile fcoe-tcp列出 FCoE 流量控制配置文件属性:

content_copy zoom_out_map
user@switch> show class-of-service traffic-control-profile fcoe-tcp
Traffic control profile: fcoe-tcp, Index: 18303
  Shaping rate: 100 percent
  Scheduler map: fcoe-map
  Guaranteed rate: 3000000000
意义

show class-of-service traffic-control-profile fcoe-tcp 命令将列出所有已配置的流量控制配置文件。对于每个流量控制配置文件,命令输出包括:

  • 流量控制配置文件的名称 (fcoe-tcp

  • 优先级组可以使用的最大端口带宽(整形速率 100 percent

  • 与流量控制配置文件 (fcoe-map) 关联的调度程序图

  • 最低保证优先级组端口带宽(保证速率 3000000000 ,以 bps 为单位)

验证是否已创建转发类集(优先级组)

目的

验证是否已创建 FCoE 优先级组,以及优先级(转发类)是否 fcoe 属于 FCoE 优先级组。四台交换机上的转发类集验证相同。

行动

使用操作模式命令 show class-of-service forwarding-class-set fcoe-pg列出转发类集:

content_copy zoom_out_map
user@switch> show class-of-service forwarding-class-set fcoe-pg
Forwarding class set: fcoe-pg, Type: normal-type, Forwarding class set index: 31420
  Forwarding class                       Index
  fcoe                                     1   
意义

show class-of-service forwarding-class-set fcoe-pg 命令列出属于优先级 fcoe-pg 组的所有转发类(优先级)以及优先级组的内部索引号。命令输出显示转发类集 fcoe-pg 包括转发类 fcoe

验证是否已启用基于优先级的流控制

目的

验证 FCoE 代码点上是否启用了 PFC。四台交换机上的 PFC 验证相同。

行动

使用操作模式命令 show class-of-service congestion-notification fcoe-cnp列出 FCoE 拥塞通知配置文件:

content_copy zoom_out_map
user@switch> show class-of-service congestion-notification fcoe-cnp
Type: Input, Name: fcoe-cnp, Index: 6879
Cable Length: 100 m
  Priority     PFC          MRU
  000          Disabled 
  001          Disabled 
  010          Disabled 
  011          Enabled      2500 
  100          Disabled      
  101          Disabled 
  110          Disabled 
  111          Disabled 
Type: Output
  Priority     Flow-Control-Queues 
  000 
               0
  001 
               1
  010 
               2
  011 
               3
  100 
               4
  101 
               5
  110 
               6
  111 
               7
意义

show class-of-service congestion-notification fcoe-cnp命令将列出拥塞通知配置文件中已启用 PFC 的所有 IEEE 802.1p 代码点。命令输出显示,在拥塞通知配置文件的代码fcoe-cnp011fcoe队列)上启用了 PFC。

该命令还显示默认电缆长度(100 米)、默认最大接收单位(2500 字节)以及优先级到输出队列的默认映射,因为此示例不包括配置这些选项。

验证是否已创建服务配置的接口类

目的

验证接口的 CoS 属性是否正确。MC-LAG 交换机 S1 和 S2 上的验证输出与 FCoE 传输交换机 TS1 和 TS2 上的输出不同。

行动

使用操作模式命令 show configuration class-of-service interfaces列出 MC-LAG 交换机 S1 和 S2 上的接口 CoS 配置:

content_copy zoom_out_map
user@switch> show configuration class-of-service interfaces
ae0 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}

ae1 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}

使用操作模式命令 show configuration class-of-service interfaces列出 FCoE 中继交换机 TS1 和 TS2 上的接口 CoS 配置:

content_copy zoom_out_map
user@switch> show configuration class-of-service interfaces
xe-0/0/30 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}
xe-0/0/31 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}
xe-0/0/32 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}
xe-0/0/33 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}
ae1 {
    forwarding-class-set {
        fcoe-pg {
            output-traffic-control-profile fcoe-tcp;
        }
    }
    congestion-notification-profile fcoe-cnp;
}

意义

show configuration class-of-service interfaces 命令列出了所有接口的服务配置类。对于每个接口,命令输出包括:

  • 接口的名称(例如, ae0xe-0/0/30

  • 与接口 (fcoe-pg) 关联的转发类集的名称

  • 与接口关联的信息流控制配置文件的名称(输出信息流控制配置文件、 fcoe-tcp

  • 与接口关联的拥塞通知配置文件的名称 (fcoe-cnp

注意:

作为 LAG 成员的接口不会单独显示。LAG 或 MC-LAG CoS 配置将应用于属于 LAG 或 MC-LAG 的所有接口。例如,MC-LAG 交换机 S1 和 S2 上的接口 CoS 配置输出显示 LAG CoS 配置,但不单独显示成员接口的 CoS 配置。FCoE 中继交换机 TS1 和 TS2 上的接口 CoS 配置输出显示 LAG CoS 配置,还显示接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33 的配置,这些接口不是 LAG 的成员。

验证接口配置是否正确

目的

验证接口的 LAG 成员资格、MTU、VLAN 成员资格和端口模式是否正确。MC-LAG 交换机 S1 和 S2 上的验证输出与 FCoE 传输交换机 TS1 和 TS2 上的输出不同。

行动

使用操作模式命令 show configuration interfaces列出 MC-LAG 交换机 S1 和 S2 上的接口配置:

content_copy zoom_out_map
user@switch> show configuration interfaces
xe-0/0/10 {
    ether-options {
        802.3ad ae0;
    }
}
xe-0/0/11 {
    ether-options {
        802.3ad ae0;
    }
}
xe-0/0/20 {
    ether-options {
        802.3ad ae1;
    }
}
xe-0/0/21 {
    ether-options {
        802.3ad ae1;
    }
}
ae0 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode trunk;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}
ae1 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode trunk;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}

使用操作模式命令 show configuration interfaces列出 FCoE 中继交换机 TS1 和 TS2 上的接口配置:

content_copy zoom_out_map
user@switch> show configuration interfaces
xe-0/0/25 {
    ether-options {
        802.3ad ae1;
    }
}
xe-0/0/26 {
    ether-options {
        802.3ad ae1;
    }
}
xe-0/0/30 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode tagged-access;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}
xe-0/0/31 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode tagged-access;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}
xe-0/0/32 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode tagged-access;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}
xe-0/0/33 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode tagged-access;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}

ae1 {
    mtu 2180;
    unit 0 {
        family ethernet-switching {
            port-mode trunk;
            vlan {
                members fcoe_vlan;
            }
        }
    }
}

意义

该命令按 show configuration interfaces 接口名称列出每个接口的配置。

对于作为 LAG 成员的每个接口,命令仅列出接口所属 LAG 的名称。

对于每个 LAG 接口以及不是 LAG 成员的每个接口,命令输出包括:

  • MTU (2180

  • 接口的单元号 (0

  • 端口模式(trunk 对于连接两台交换机 tagged-access 的接口,模式用于连接到 FCoE 主机的接口)

  • 接口所属的 VLAN 的名称 (fcoe_vlan

验证是否在 FCoE 中继交换机 TS1 和 TS2 接入接口上的 FCoE VLAN 上启用了 FIP 侦听

目的

验证 FCoE VLAN 接入接口上是否启用了 FIP 侦听。FIP 侦听仅在 FCoE 接入接口上启用,因此仅在 FCoE 中继交换机 TS1 和 TS2 上启用。MC-LAG 交换机 S1 和 S2 上未启用 FIP 侦听,因为 FIP 侦听是在中转交换机 TS1 和 TS2 FCoE 接入端口上完成的。

行动

使用操作模式命令 show configuration ethernet-switching-options secure-access-port列出 FCoE 中继交换机 TS1 和 TS2 上的端口安全配置:

content_copy zoom_out_map
user@switch> show configuration ethernet-switching-options secure-access-port
interface ae1.0 {
    fcoe-trusted;
}
vlan fcoe_vlan {
    examine-fip {
        examine-vn2vn {
            beacon-period 90000;
        }
    }
}
意义

show configuration ethernet-switching-options secure-access-port 命令将列出端口安全信息,包括端口是否受信任。命令输出显示:

  • 将 FCoE 中继交换机连接到 MC-LAG 交换机的 LAG 端口 ae1.0配置为 FCoE 可信接口。不会在 LAG 的成员接口(xe-0/0/25 和 xe-0/0/26)上执行 FIP 侦听。

  • 在 FCoE VLAN 上启用了 FIP 侦听 (examine-fipfcoe_vlan),FIP 侦听的类型为 VN2VN_Port FIP 侦听 (examine-vn2vn),信标周期设置为90000毫秒。在传输交换机 TS1 和 TS2 上,FCoE VLAN 的所有接口成员都会执行 FIP 侦听,除非接口配置为受 FCoE 信任。在传输交换机 TS1 和 TS2 上,接口 xe-0/0/30、xe-0/0/31、xe-0/0/32 和 xe-0/0/33 会执行 FIP 侦听,因为它们未配置为受 FCoE 信任。LAG ae1 的接口成员(xe-0/0/25 和 xe-0/0/26)不执行 FIP 侦听,因为 LAG 配置为 FCoE 受信任。

验证 FCoE 中继交换机 TS1 和 TS2 上的 FIP 侦听模式是否正确

目的

验证 FCoE VLAN 上的 FIP 侦听模式是否正确。FIP 侦听仅在 FCoE 接入接口上启用,因此仅在 FCoE 中继交换机 TS1 和 TS2 上启用。MC-LAG 交换机 S1 和 S2 上未启用 FIP 侦听,因为 FIP 侦听是在中转交换机 TS1 和 TS2 FCoE 接入端口上完成的。

行动

使用操作模式命令 show fip snooping brief列出 FCoE 中继交换机 TS1 和 TS2 上的 FIP 侦听配置:

content_copy zoom_out_map
user@switch> show fip snooping brief
VLAN: fcoe_vlan,    Mode: VN2VN Snooping
  FC-MAP: 0e:fd:00   
…

注意:

输出已被截断,仅显示相关信息。

意义

show fip snooping brief 命令将列出 FIP 侦听信息,包括 FIP 侦听 VLAN 和 FIP 侦听模式。命令输出显示:

  • 启用了 FIP 侦听的 VLAN 为 fcoe_vlan

  • FIP 侦听模式VN2VN_Port FIP 侦听 (VN2VN Snooping

验证 FCoE VLAN 上是否禁用了 IGMP 侦听

目的

验证所有四台交换机上的 FCoE VLAN 上是否禁用了 IGMP 侦听。

行动

使用以下命令 show configuration protocols igmp-snooping 列出四台交换机上每台交换机上的 IGMP 侦听协议信息:

content_copy zoom_out_map
user@switch> show configuration protocols igmp-snooping
vlan fcoe_vlan {
    disable;
}
意义

命令将 show configuration protocols igmp-snooping 列出交换机上配置的 VLAN 的 IGMP 侦听配置。命令输出显示 FCoE VLAN 上已禁用 IGMP 侦听 (fcoe_vlan)。

示例:EVPN-MPLS 与 MC-LAG 拓扑互连

此示例说明如何使用以太网 VPN (EVPN) 通过 MPLS 网络将多机箱链路聚合 (MC-LAG) 网络扩展到数据中心网络或地理位置分散的园区网络。

MC-LAG 拓扑支持 EVPN-MPLS 互通,其中两台 MX 系列路由器、两台 EX9200 交换机或两台瞻博网络设备的混合用作 MC-LAG 对等方,这些对等方使用机箱间控制协议 (ICCP) 和机箱间链路 (ICL) 来连接和维护拓扑。MC-LAG 对等方连接到 MPLS 网络中的提供商边缘 (PE) 设备。PE 设备可以是 MX 系列路由器,也可以是 EX9200 交换机。

此示例说明如何配置 MPLS 网络中的 MC-LAG 对等方和 PE 设备以相互配合。

要求

此示例使用以下硬件和软件组件:

  • 三台 EX9200 交换机:

    • PE1 和 PE2,它们在 MC-LAG 拓扑中充当 MC-LAG 对等方,在 EVPN-MPLS 叠加网络中充当 EVPN BGP 对等方。

    • PE3,在 EVPN-MPLS 叠加网络中充当 EVPN BGP 对等方。

  • EX9200 交换机运行的是 Junos OS 17.4R1 或更高版本的软件。

注意:

尽管 MC-LAG 拓扑包括两个客户边缘 (CE) 设备,但此示例重点介绍 PE1、PE2 和 PE3 的配置。

概述和拓扑

图 7 显示了一个 MC-LAG 拓扑,其中提供商边缘设备 PE1 和 PE2 配置为 MC-LAG 对等方。MC-LAG 对等方通过 ICCP 链路交换控制信息,并通过 ICL 交换数据流量。在此示例中,ICL 是由两个接口组成的聚合以太网接口。

图 7:EVPN-MPLS 与 MC-LAG 拓扑 EVPN-MPLS Interworking With an MC-LAG Topology互连

图 7 中的拓扑还包括 CE 设备 CE1 和 CE2,它们都是每个 PE 设备的多宿主设备。CE1 和两个 PE 设备之间的链路捆绑为聚合以太网接口,在该接口上配置了处于主动-主动模式的 MC-LAG。

图 7 中的拓扑还包括位于 MPLS 网络边缘的 PE3。PE3 充当 MC-LAG 网络与数据中心或地理上分散的园区网络之间的网关。PE1、PE2 和 PE3 运行 EVPN,使 MC-LAG 网络中的主机能够通过干预 MPLS 网络与数据中心或其他园区网络中的主机进行通信。

从 EVPN-MPLS 互通功能的角度来看,PE3 仅充当 EVPN BGP 对等方,MC-LAG 拓扑中的 PE1 和 PE2 具有双重角色:

  • MC-LAG 网络中的 MC-LAG 对等方。

  • EVPN-MPLS 网络中的 EVPN BGP 对等方。

由于具有双重角色,PE1 和 PE2 配置了 MC-LAG、EVPN、BGP 和 MPLS 属性。

表 4 概述了在 PE1、PE2 和 PE3 上配置的关键 MC-LAG 和 EVPN(BGP 和 MPLS)属性。

表 4:在 PE1、PE2 和 PE3 上配置的关键 MC-LAG 和 EVPN(BGP 和 MPLS)属性

关键属性

PE1

PE2

PE3

MC-LAG Attributes

接口

ICL:聚合以太网接口 ae1,由 xe-2/1/1 和 xe-2/1/2 组成

ICCP: xe-2/1/0

ICL:聚合以太网接口 ae1,由 xe-2/1/1 和 xe-2/1/2 组成

ICCP: xe-2/1/0

不適用

EVPN-MPLS

接口

与 PE3 的连接:xe-2/0/0

与 PE2 的连接:xe-2/0/2

与 PE3 的连接:xe-2/0/2

与 PE1 的连接:xe-2/0/0

与 PE1 的连接:xe-2/0/2

与 PE2 的连接:xe-2/0/3

IP 地址

BGP 对等方地址:198.51.100.1

BGP 对等方地址:198.51.100.2

BGP 对等地址:198.51.100.3

自治系统

65000

65000

65000

虚拟交换机路由实例

EVPN1、EVPN2、EVPN3

EVPN1、EVPN2、EVPN3

EVPN1、EVPN2、EVPN3

请注意以下有关 EVPN-MPLS 互通功能及其配置的信息:

  • 您必须在 MC-LAG 拓扑中的双宿主接口上配置以太网分段标识符 (ESI)。ESI 使 EVPN 能够识别双宿主接口。

  • 唯一受支持的路由实例类型是虚拟交换机实例 (set routing-instances name instance-type virtual-switch)。

  • 在 MC-LAG 对等方上,必须在层次结构级别中包含bgp-peer[edit routing-instances name protocols evpn mclag]配置语句。此配置语句允许 EVPN-MPLS 与 MC-LAG 对等方上的 MC-LAG 互通。

  • 不支持地址解析协议 (ARP) 抑制。

PE1 和 PE2 配置

要配置 PE1 和 PE2,请执行以下任务:

CLI 快速配置

PE1:MC-LAG 配置

content_copy zoom_out_map
set chassis aggregated-devices ethernet device-count 3 
set interfaces xe-2/0/1 gigether-options 802.3ad ae0
set interfaces ae0 flexible-vlan-tagging 
set interfaces ae0 encapsulation flexible-ethernet-services 
set interfaces ae0 aggregated-ether-options lacp active 
set interfaces ae0 aggregated-ether-options lacp periodic fast 
set interfaces ae0 aggregated-ether-options lacp system-id 00:00:11:11:11:11 
set interfaces ae0 aggregated-ether-options lacp admin-key 1 
set interfaces ae0 aggregated-ether-options mc-ae mc-ae-id 1 
set interfaces ae0 aggregated-ether-options mc-ae redundancy-group 2 
set interfaces ae0 aggregated-ether-options mc-ae chassis-id 0 
set interfaces ae0 aggregated-ether-options mc-ae mode active-active 
set interfaces ae0 aggregated-ether-options mc-ae status-control active 
set interfaces ae0 unit 1 esi 00:11:22:33:44:55:66:77:88:99 
set interfaces ae0 unit 1 esi all-active 
set interfaces ae0 unit 1 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 1 family ethernet-switching vlan members 1 
set interfaces ae0 unit 2 esi 00:11:11:11:11:11:11:11:11:11 
set interfaces ae0 unit 2 esi all-active 
set interfaces ae0 unit 2 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 2 family ethernet-switching vlan members 2 
set interfaces ae0 unit 3 esi 00:11:22:22:22:22:22:22:22:22 
set interfaces ae0 unit 3 esi all-active 
set interfaces ae0 unit 3 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 3 family ethernet-switching vlan members 3
set interfaces xe-2/0/6 enable 
set interfaces xe-2/0/6 flexible-vlan-tagging 
set interfaces xe-2/0/6 encapsulation flexible-ethernet-services 
set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3
set interfaces xe-2/1/0 unit 0 family inet address 203.0.113.1/24 
set interfaces xe-2/1/1 gigether-options 802.3ad ae1 
set interfaces xe-2/1/2 gigether-options 802.3ad ae1
set interfaces ae1 flexible-vlan-tagging 
set interfaces ae1 encapsulation flexible-ethernet-services 
set interfaces ae1 aggregated-ether-options lacp active 
set interfaces ae1 unit 1 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 1 family ethernet-switching vlan members 1 
set interfaces ae1 unit 2 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 2 family ethernet-switching vlan members 2 
set interfaces ae1 unit 3 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 3 family ethernet-switching vlan members 3 
set multi-chassis multi-chassis-protection 203.0.113.2 interface ae1
set protocols iccp local-ip-addr 203.0.113.1 
set protocols iccp peer 203.0.113.2 session-establishment-hold-time 600 
set protocols iccp peer 203.0.113.2 redundancy-group-id-list 2 
set protocols iccp peer 203.0.113.2 liveness-detection minimum-interval 10000 
set protocols iccp peer 203.0.113.2 liveness-detection multiplier 3

PE1:EVPN-MPLS 配置

content_copy zoom_out_map
set interfaces lo0 unit 0 family inet address 198.51.100.1/32 primary 
set interfaces xe-2/0/0 unit 0 family inet address 192.0.2.2/24 
set interfaces xe-2/0/0 unit 0 family mpls 
set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.111/24 
set interfaces xe-2/0/2 unit 0 family mpls 
set interfaces irb unit 1 family inet address 10.2.1.1/24 virtual-gateway-address 10.2.1.254
set interfaces irb unit 2 family inet address 10.2.2.1/24 virtual-gateway-address 10.2.2.254
set interfaces irb unit 3 family inet address 10.2.3.1/24 virtual-gateway-address 10.2.3.254
set routing-options router-id 198.51.100.1 
set routing-options autonomous-system 65000
set routing-options forwarding-table export evpn-pplb 
set protocols mpls interface xe-2/0/0.0 
set protocols mpls interface xe-2/0/2.0 
set protocols bgp group evpn type internal 
set protocols bgp group evpn local-address 198.51.100.1 
set protocols bgp group evpn family evpn signaling 
set protocols bgp group evpn local-as 65000
set protocols bgp group evpn neighbor 198.51.100.2 
set protocols bgp group evpn neighbor 198.51.100.3 
set protocols ospf area 0.0.0.0 interface lo0.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/0.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
set protocols ldp interface xe-2/0/0.0 
set protocols ldp interface xe-2/0/2.0 
set protocols ldp interface lo0.0 
set policy-options policy-statement evpn-pplb from protocol evpn 
set policy-options policy-statement evpn-pplb then load-balance per-packet 
set routing-instances evpn1 instance-type virtual-switch
set routing-instances evpn1 interface xe-2/0/6.1 
set routing-instances evpn1 interface ae0.1 
set routing-instances evpn1 interface ae1.1 
set routing-instances evpn1 route-distinguisher 1:10 
set routing-instances evpn1 vrf-target target:1:5 
set routing-instances evpn1 protocols evpn extended-vlan-list 1 
set routing-instances evpn1 protocols evpn mclag bgp-peer 198.51.100.2 
set routing-instances evpn1 switch-options service-id 1 
set routing-instances evpn1 vlans v1 vlan-id 1
set routing-instances evpn1 vlans v1 l3-interface irb.1
set routing-instances evpn2 instance-type virtual-switch 
set routing-instances evpn2 interface xe-2/0/6.2 
set routing-instances evpn2 interface ae0.2 
set routing-instances evpn2 interface ae1.2 
set routing-instances evpn2 route-distinguisher 1:20 
set routing-instances evpn2 vrf-target target:1:6 
set routing-instances evpn2 protocols evpn extended-vlan-list 2 
set routing-instances evpn2 protocols evpn mclag bgp-peer 198.51.100.2 
set routing-instances evpn2 switch-options service-id 2 
set routing-instances evpn2 vlans v1 vlan-id 2
set routing-instances evpn2 vlans v1 l3-interface irb.2
set routing-instances evpn3 instance-type virtual-switch 
set routing-instances evpn3 interface xe-2/0/6.3 
set routing-instances evpn3 interface ae0.3 
set routing-instances evpn3 interface ae1.3 
set routing-instances evpn3 route-distinguisher 1:30 
set routing-instances evpn3 vrf-target target:1:7 
set routing-instances evpn3 protocols evpn extended-vlan-list 3 
set routing-instances evpn3 protocols evpn mclag bgp-peer 198.51.100.2 
set routing-instances evpn3 switch-options service-id 3 
set routing-instances evpn3 vlans v1 vlan-id 3
set routing-instances evpn3 vlans v1 l3-interface irb.3

PE2:MC-LAG 配置

content_copy zoom_out_map
set chassis aggregated-devices ethernet device-count 3 
set interfaces xe-2/0/1 gigether-options 802.3ad ae0 
set interfaces xe-2/0/6 enable 
set interfaces xe-2/0/6 flexible-vlan-tagging 
set interfaces xe-2/0/6 encapsulation flexible-ethernet-services 
set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3 
set interfaces xe-2/1/0 unit 0 family inet address 203.0.113.2/24 
set interfaces xe-2/1/1 gigether-options 802.3ad ae1 
set interfaces xe-2/1/2 gigether-options 802.3ad ae1 
set interfaces ae0 flexible-vlan-tagging 
set interfaces ae0 encapsulation flexible-ethernet-services 
set interfaces ae0 aggregated-ether-options lacp active 
set interfaces ae0 aggregated-ether-options lacp periodic fast 
set interfaces ae0 aggregated-ether-options lacp system-id 00:00:11:11:11:11 
set interfaces ae0 aggregated-ether-options lacp admin-key 1 
set interfaces ae0 aggregated-ether-options mc-ae mc-ae-id 1 
set interfaces ae0 aggregated-ether-options mc-ae redundancy-group 2 
set interfaces ae0 aggregated-ether-options mc-ae chassis-id 1 
set interfaces ae0 aggregated-ether-options mc-ae mode active-active 
set interfaces ae0 aggregated-ether-options mc-ae status-control standby 
set interfaces ae0 unit 1 esi 00:11:22:33:44:55:66:77:88:99 
set interfaces ae0 unit 1 esi all-active 
set interfaces ae0 unit 1 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 1 family ethernet-switching vlan members 1 
set interfaces ae0 unit 2 esi 00:11:11:11:11:11:11:11:11:11 
set interfaces ae0 unit 2 esi all-active 
set interfaces ae0 unit 2 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 2 family ethernet-switching vlan members 2 
set interfaces ae0 unit 3 esi 00:11:22:22:22:22:22:22:22:22 
set interfaces ae0 unit 3 esi all-active 
set interfaces ae0 unit 3 family ethernet-switching interface-mode trunk 
set interfaces ae0 unit 3 family ethernet-switching vlan members 3 
set interfaces ae1 flexible-vlan-tagging 
set interfaces ae1 encapsulation flexible-ethernet-services 
set interfaces ae1 aggregated-ether-options lacp active 
set interfaces ae1 unit 1 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 1 family ethernet-switching vlan members 1 
set interfaces ae1 unit 2 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 2 family ethernet-switching vlan members 2 
set interfaces ae1 unit 3 family ethernet-switching interface-mode trunk 
set interfaces ae1 unit 3 family ethernet-switching vlan members 3 
set multi-chassis multi-chassis-protection 203.0.113.1 interface ae1 
set protocols iccp local-ip-addr 203.0.113.2 
set protocols iccp peer 203.0.113.1 session-establishment-hold-time 600 
set protocols iccp peer 203.0.113.1 redundancy-group-id-list 2 
set protocols iccp peer 203.0.113.1 liveness-detection minimum-interval 10000 
set protocols iccp peer 203.0.113.1 liveness-detection multiplier 3

PE2:EVPN-MPLS 配置

content_copy zoom_out_map
set interfaces xe-2/0/0 unit 0 family inet address 192.0.2.222/24 
set interfaces xe-2/0/0 unit 0 family mpls 
set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.22/24 
set interfaces xe-2/0/2 unit 0 family mpls 
set interfaces lo0 unit 0 family inet address 198.51.100.2/32 primary 
set interfaces irb unit 1 family inet address 10.2.1.2/24 virtual-gateway-address 10.2.1.254
set interfaces irb unit 2 family inet address 10.2.2.2/24 virtual-gateway-address 10.2.2.254
set interfaces irb unit 3 family inet address 10.2.3.2/24 virtual-gateway-address 10.2.3.254
set routing-options router-id 198.51.100.2 
set routing-options autonomous-system 65000
set routing-options forwarding-table export evpn-pplb 
set protocols mpls interface xe-2/0/2.0 
set protocols mpls interface xe-2/0/0.0 
set protocols bgp group evpn type internal 
set protocols bgp group evpn local-address 198.51.100.2 
set protocols bgp group evpn family evpn signaling 
set protocols bgp group evpn local-as 65000
set protocols bgp group evpn neighbor 198.51.100.1 
set protocols bgp group evpn neighbor 198.51.100.3 
set protocols ospf area 0.0.0.0 interface lo0.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/0.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
set protocols ldp interface xe-2/0/0.0 
set protocols ldp interface xe-2/0/2.0 
set protocols ldp interface lo0.0 
set policy-options policy-statement evpn-pplb from protocol evpn 
set policy-options policy-statement evpn-pplb then load-balance per-packet 
set routing-instances evpn1 instance-type virtual-switch 
set routing-instances evpn1 interface xe-2/0/6.1 
set routing-instances evpn1 interface ae0.1 
set routing-instances evpn1 interface ae1.1 
set routing-instances evpn1 route-distinguisher 1:11 
set routing-instances evpn1 vrf-target target:1:5 
set routing-instances evpn1 protocols evpn extended-vlan-list 1 
set routing-instances evpn1 protocols evpn mclag bgp-peer 198.51.100.1 
set routing-instances evpn1 switch-options service-id 1 
set routing-instances evpn1 vlans v1 vlan-id 1
set routing-instances evpn1 vlans v1 l3-interface irb.1
set routing-instances evpn2 instance-type virtual-switch 
set routing-instances evpn2 interface xe-2/0/6.2 
set routing-instances evpn2 interface ae0.2 
set routing-instances evpn2 interface ae1.2 
set routing-instances evpn2 route-distinguisher 1:21 
set routing-instances evpn2 vrf-target target:1:6 
set routing-instances evpn2 protocols evpn extended-vlan-list 2 
set routing-instances evpn2 protocols evpn mclag bgp-peer 198.51.100.1 
set routing-instances evpn2 switch-options service-id 2 
set routing-instances evpn2 vlans v1 vlan-id 2  
set routing-instances evpn2 vlans v1 l3-interface irb.2
set routing-instances evpn3 instance-type virtual-switch 
set routing-instances evpn3 interface xe-2/0/6.3 
set routing-instances evpn3 interface ae0.3 
set routing-instances evpn3 interface ae1.3 
set routing-instances evpn3 route-distinguisher 1:31 
set routing-instances evpn3 vrf-target target:1:7 
set routing-instances evpn3 protocols evpn extended-vlan-list 3 
set routing-instances evpn3 protocols evpn mclag bgp-peer 198.51.100.1 
set routing-instances evpn3 switch-options service-id 3 
set routing-instances evpn3 vlans v1 vlan-id 3
set routing-instances evpn3 vlans v1 l3-interface irb.3

PE1:配置 MC-LAG

分步过程
  1. 设置 PE1 上的聚合以太网接口数量。

    content_copy zoom_out_map
    [edit]
    user@switch# set chassis aggregated-devices ethernet device-count 3
    
  2. 在接口 xe-2/0/1 上配置聚合以太网接口 ae0,在 ae0 上配置 LACP 和 MC-LAG。将聚合以太网接口 ae0 划分为三个逻辑接口(ae0.1、ae0.2 和 ae0.3)。对于每个逻辑接口,指定一个 ESI,将逻辑接口置于 MC-LAG 主动-主动模式,然后将逻辑接口映射到 VLAN。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/0/1 gigether-options 802.3ad ae0
    user@switch# set interfaces ae0 flexible-vlan-tagging 
    user@switch# set interfaces ae0 encapsulation flexible-ethernet-services 
    user@switch# set interfaces ae0 aggregated-ether-options lacp active 
    user@switch# set interfaces ae0 aggregated-ether-options lacp periodic fast 
    user@switch# set interfaces ae0 aggregated-ether-options lacp system-id 00:00:11:11:11:11 
    user@switch# set interfaces ae0 aggregated-ether-options lacp admin-key 1 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae mc-ae-id 1 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae redundancy-group 2 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae chassis-id 0 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae mode active-active 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae status-control active 
    user@switch# set interfaces ae0 unit 1 esi 00:11:22:33:44:55:66:77:88:99 
    user@switch# set interfaces ae0 unit 1 esi all-active 
    user@switch# set interfaces ae0 unit 1 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 1 family ethernet-switching vlan members 1 
    user@switch# set interfaces ae0 unit 2 esi 00:11:11:11:11:11:11:11:11:11 
    user@switch# set interfaces ae0 unit 2 esi all-active 
    user@switch# set interfaces ae0 unit 2 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 2 family ethernet-switching vlan members 2 
    user@switch# set interfaces ae0 unit 3 esi 00:11:22:22:22:22:22:22:22:22 
    user@switch# set interfaces ae0 unit 3 esi all-active 
    user@switch# set interfaces ae0 unit 3 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 3 family ethernet-switching vlan members 3
    
  3. 配置物理接口 xe-2/0/6,并将其划分为三个逻辑接口(xe-2/0/6.1、xe-2/0/6.2 和 xe-2/0/6.3)。将每个逻辑接口映射到一个 VLAN。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/0/6 enable 
    user@switch# set interfaces xe-2/0/6 flexible-vlan-tagging 
    user@switch# set interfaces xe-2/0/6 encapsulation flexible-ethernet-services 
    user@switch# set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
    user@switch# set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
    user@switch# set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3
    
  4. 将物理接口 xe-2/1/0 配置为第 3 层接口,您可以在其上配置 ICCP。将 PE2 上 IP 地址为 203.0.113.2 的接口指定为 PE1 的 ICCP 对等方。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/1/0 unit 0 family inet address 203.0.113.1/24 
    user@switch# set protocols iccp local-ip-addr 203.0.113.1 
    user@switch# set protocols iccp peer 203.0.113.2 session-establishment-hold-time 600 
    user@switch# set protocols iccp peer 203.0.113.2 redundancy-group-id-list 2 
    user@switch# set protocols iccp peer 203.0.113.2 liveness-detection minimum-interval 10000 
    user@switch# set protocols iccp peer 203.0.113.2 liveness-detection multiplier 3
    
  5. 在接口 xe-2/1/1 和 xe-2/1/2 上配置聚合以太网接口 ae1,并在 ae1 上配置 LACP。将聚合以太网接口 ae1 划分为三个逻辑接口(ae1.1、ae1.2 和 ae1.3),并将每个逻辑接口映射到一个 VLAN。指定 ae1 作为 PE1 和 PE2 之间的多机箱保护链路。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/1/1 gigether-options 802.3ad ae1 
    user@switch# set interfaces xe-2/1/2 gigether-options 802.3ad ae1
    user@switch# set interfaces ae1 flexible-vlan-tagging 
    user@switch# set interfaces ae1 encapsulation flexible-ethernet-services 
    user@switch# set interfaces ae1 aggregated-ether-options lacp active 
    user@switch# set interfaces ae1 unit 1 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae1 unit 1 family ethernet-switching vlan members 1 
    user@switch# set interfaces ae1 unit 2 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae1 unit 2 family ethernet-switching vlan members 2 
    user@switch# set interfaces ae1 unit 3 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae1 unit 3 family ethernet-switching vlan members 3 
    user@switch# set multi-chassis multi-chassis-protection 203.0.113.2 interface ae1
    

PE1:配置 EVPN-MPLS

分步过程
  1. 配置环路接口以及连接到其他 PE 设备的接口。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces lo0 unit 0 family inet address 198.51.100.1/32 primary 
    user@switch# set interfaces xe-2/0/0 unit 0 family inet address 192.0.2.2/24 
    user@switch# set interfaces xe-2/0/0 unit 0 family mpls 
    user@switch# set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.111/24 
    user@switch# set interfaces xe-2/0/2 unit 0 family mpls 
    
  2. 配置 IRB 接口 irb.1、irb.2 和 irb.3。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces irb unit 1 family inet address 10.2.1.1/24 virtual-gateway-address 10.2.1.254
    user@switch# set interfaces irb unit 2 family inet address 10.2.2.1/24 virtual-gateway-address 10.2.2.254
    user@switch# set interfaces irb unit 3 family inet address 10.2.3.1/24 virtual-gateway-address 10.2.3.254
    
  3. 分配路由器 ID 以及 PE1、PE2 和 PE3 所在的自治系统。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options router-id 198.51.100.1 
    user@switch# set routing-options autonomous-system 65000
    
  4. 使用 EVPN 多宿主主动-主动模式时,为 EVPN 路由启用按数据包负载均衡。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options forwarding-table export evpn-pplb 
    user@switch# set policy-options policy-statement evpn-pplb from protocol evpn 
    user@switch# set policy-options policy-statement evpn-pplb then load-balance per-packet
    
  5. 在接口 xe-2/0/0.0 和 xe-2/0/2.0 上启用 MPLS。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols mpls interface xe-2/0/0.0 
    user@switch# set protocols mpls interface xe-2/0/2.0 
    
  6. 配置包含 PE1、PE2 和 PE3 的 IBGP 叠加网络。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols bgp group evpn type internal 
    user@switch# set protocols bgp group evpn local-address 198.51.100.1 
    user@switch# set protocols bgp group evpn family evpn signaling 
    user@switch# set protocols bgp group evpn local-as 65000
    user@switch# set protocols bgp group evpn neighbor 198.51.100.2 
    user@switch# set protocols bgp group evpn neighbor 198.51.100.3 
    
  7. 通过指定启用 EVPN-MPLS 的区域 ID 和接口,将 OSPF 配置为 EVPN 的内部路由协议。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ospf area 0.0.0.0 interface lo0.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/0.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
    
  8. 在环路接口和启用 EVPN-MPLS 的接口上配置标签分发协议 (LDP)。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ldp interface lo0.0 
    user@switch# set protocols ldp interface xe-2/0/0.0 
    user@switch# set protocols ldp interface xe-2/0/2.0 
    
  9. 为 VLAN v1 配置虚拟交换机路由实例,为其分配 VLAN ID 1、2 和 3,并包括与 VLAN 关联的接口和其他实体。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-instances evpn1 instance-type virtual-switch
    user@switch# set routing-instances evpn1 interface xe-2/0/6.1 
    user@switch# set routing-instances evpn1 interface ae0.1 
    user@switch# set routing-instances evpn1 interface ae1.1 
    user@switch# set routing-instances evpn1 route-distinguisher 1:10 
    user@switch# set routing-instances evpn1 vrf-target target:1:5 
    user@switch# set routing-instances evpn1 protocols evpn extended-vlan-list 1 
    user@switch# set routing-instances evpn1 protocols evpn mclag bgp-peer 198.51.100.2 
    user@switch# set routing-instances evpn1 switch-options service-id 1 
    user@switch# set routing-instances evpn1 vlans v1 vlan-id 1
    user@switch# set routing-instances evpn1 vlans v1 l3-interface irb.1
    user@switch# set routing-instances evpn2 instance-type virtual-switch 
    user@switch# set routing-instances evpn2 interface xe-2/0/6.2 
    user@switch# set routing-instances evpn2 interface ae0.2 
    user@switch# set routing-instances evpn2 interface ae1.2 
    user@switch# set routing-instances evpn2 route-distinguisher 1:20 
    user@switch# set routing-instances evpn2 vrf-target target:1:6 
    user@switch# set routing-instances evpn2 protocols evpn extended-vlan-list 2 
    user@switch# set routing-instances evpn2 protocols evpn mclag bgp-peer 198.51.100.2 
    user@switch# set routing-instances evpn2 switch-options service-id 2 
    user@switch# set routing-instances evpn2 vlans v1 vlan-id 2
    user@switch# set routing-instances evpn2 vlans v1 l3-interface irb.2
    user@switch# set routing-instances evpn3 instance-type virtual-switch 
    user@switch# set routing-instances evpn3 interface xe-2/0/6.3 
    user@switch# set routing-instances evpn3 interface ae0.3 
    user@switch# set routing-instances evpn3 interface ae1.3 
    user@switch# set routing-instances evpn3 route-distinguisher 1:30 
    user@switch# set routing-instances evpn3 vrf-target target:1:7 
    user@switch# set routing-instances evpn3 protocols evpn extended-vlan-list 3 
    user@switch# set routing-instances evpn3 protocols evpn mclag bgp-peer 198.51.100.2 
    user@switch# set routing-instances evpn3 switch-options service-id 3 
    user@switch# set routing-instances evpn3 vlans v1 vlan-id 3
    user@switch# set routing-instances evpn3 vlans v1 l3-interface irb.3
    

PE2:配置 MC-LAG

分步过程
  1. 设置 PE2 上的聚合以太网接口数量。

    content_copy zoom_out_map
    [edit]
    user@switch# set chassis aggregated-devices ethernet device-count 3
    
  2. 在接口 xe-2/0/1 上配置聚合以太网接口 ae0,在 ae0 上配置 LACP 和 MC-LAG。将聚合以太网接口 ae0 划分为三个逻辑接口(ae0.1、ae0.2 和 ae0.3)。对于每个逻辑接口,指定一个 ESI,将逻辑接口置于 MC-LAG 主动-主动模式,然后将逻辑接口映射到 VLAN。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/0/1 gigether-options 802.3ad ae0 
    user@switch# set interfaces ae0 flexible-vlan-tagging 
    user@switch# set interfaces ae0 encapsulation flexible-ethernet-services 
    user@switch# set interfaces ae0 aggregated-ether-options lacp active 
    user@switch# set interfaces ae0 aggregated-ether-options lacp periodic fast 
    user@switch# set interfaces ae0 aggregated-ether-options lacp system-id 00:00:11:11:11:11 
    user@switch# set interfaces ae0 aggregated-ether-options lacp admin-key 1 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae mc-ae-id 1 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae redundancy-group 2 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae chassis-id 1 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae mode active-active 
    user@switch# set interfaces ae0 aggregated-ether-options mc-ae status-control standby 
    user@switch# set interfaces ae0 unit 1 esi 00:11:22:33:44:55:66:77:88:99 
    user@switch# set interfaces ae0 unit 1 esi all-active 
    user@switch# set interfaces ae0 unit 1 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 1 family ethernet-switching vlan members 1 
    user@switch# set interfaces ae0 unit 2 esi 00:11:11:11:11:11:11:11:11:11 
    user@switch# set interfaces ae0 unit 2 esi all-active 
    user@switch# set interfaces ae0 unit 2 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 2 family ethernet-switching vlan members 2 
    user@switch# set interfaces ae0 unit 3 esi 00:11:22:22:22:22:22:22:22:22 
    user@switch# set interfaces ae0 unit 3 esi all-active 
    user@switch# set interfaces ae0 unit 3 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces ae0 unit 3 family ethernet-switching vlan members 3 
    
  3. 配置物理接口 xe-2/0/6,并将其划分为三个逻辑接口(xe-2/0/6.1、xe-2/0/6.2 和 xe-2/0/6.3)。将每个逻辑接口映射到一个 VLAN。

    content_copy zoom_out_map
    [edit]
    set interfaces xe-2/0/6 enable 
    set interfaces xe-2/0/6 flexible-vlan-tagging 
    set interfaces xe-2/0/6 encapsulation flexible-ethernet-services 
    set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk 
    set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
    set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
    set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
    set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
    set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3 
    
  4. 将物理接口 xe-2/1/0 配置为第 3 层接口,您可以在其上配置 ICCP。将 PE1 上 IP 地址为 203.0.113.1 的接口指定为 PE2 的 ICCP 对等方。

    content_copy zoom_out_map
    [edit]
    set interfaces xe-2/1/0 unit 0 family inet address 203.0.113.2/24 
    set protocols iccp local-ip-addr 203.0.113.2 
    set protocols iccp peer 203.0.113.1 session-establishment-hold-time 600 
    set protocols iccp peer 203.0.113.1 redundancy-group-id-list 2 
    set protocols iccp peer 203.0.113.1 liveness-detection minimum-interval 10000 
    set protocols iccp peer 203.0.113.1 liveness-detection multiplier 3
    
  5. 在接口 xe-2/1/1 和 xe-2/1/2 上配置聚合以太网接口 ae1,并在 ae1 上配置 LACP。将聚合以太网接口 ae1 划分为三个逻辑接口(ae1.1、ae1.2 和 ae1.3),并将每个逻辑接口映射到一个 VLAN。指定 ae1 作为 PE1 和 PE2 之间的多机箱保护链路。

    content_copy zoom_out_map
    [edit]
    set interfaces xe-2/1/1 gigether-options 802.3ad ae1 
    set interfaces xe-2/1/2 gigether-options 802.3ad ae1 
    set interfaces ae1 flexible-vlan-tagging 
    set interfaces ae1 encapsulation flexible-ethernet-services 
    set interfaces ae1 aggregated-ether-options lacp active 
    set interfaces ae1 unit 1 family ethernet-switching interface-mode trunk 
    set interfaces ae1 unit 1 family ethernet-switching vlan members 1 
    set interfaces ae1 unit 2 family ethernet-switching interface-mode trunk 
    set interfaces ae1 unit 2 family ethernet-switching vlan members 2 
    set interfaces ae1 unit 3 family ethernet-switching interface-mode trunk 
    set interfaces ae1 unit 3 family ethernet-switching vlan members 3 
    set multi-chassis multi-chassis-protection 203.0.113.1 interface ae1 
    

PE2:配置 EVPN-MPLS

分步过程
  1. 配置环路接口以及连接到其他 PE 设备的接口。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces lo0 unit 0 family inet address 198.51.100.2/32 primary 
    user@switch# set interfaces xe-2/0/0 unit 0 family inet address 192.0.2.222/24 
    user@switch# set interfaces xe-2/0/0 unit 0 family mpls 
    user@switch# set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.22/24 
    user@switch# set interfaces xe-2/0/2 unit 0 family mpls 
    
  2. 配置 IRB 接口 irb.1、irb.2 和 irb.3。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces irb unit 1 family inet address 10.2.1.2/24 virtual-gateway-address 10.2.1.254
    user@switch# set interfaces irb unit 2 family inet address 10.2.2.2/24 virtual-gateway-address 10.2.2.254
    user@switch# set interfaces irb unit 3 family inet address 10.2.3.2/24 virtual-gateway-address 10.2.3.254
    
  3. 分配路由器 ID 以及 PE1、PE2 和 PE3 所在的自治系统。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options router-id 198.51.100.2 
    user@switch# set routing-options autonomous-system 65000
    
  4. 使用 EVPN 多宿主主动-主动模式时,为 EVPN 路由启用按数据包负载均衡。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options forwarding-table export evpn-pplb 
    user@switch# set policy-options policy-statement evpn-pplb from protocol evpn 
    user@switch# set policy-options policy-statement evpn-pplb then load-balance per-packet 
    
  5. 在接口 xe-2/0/0.0 和 xe-2/0/2.0 上启用 MPLS。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols mpls interface xe-2/0/0.0 
    user@switch# set protocols mpls interface xe-2/0/2.0 
    
  6. 配置包含 PE1、PE2 和 PE3 的 IBGP 叠加网络。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols bgp group evpn type internal 
    user@switch# set protocols bgp group evpn local-address 198.51.100.2 
    user@switch# set protocols bgp group evpn family evpn signaling 
    user@switch# set protocols bgp group evpn local-as 65000
    user@switch# set protocols bgp group evpn neighbor 198.51.100.1 
    user@switch# set protocols bgp group evpn neighbor 198.51.100.3 
    
  7. 通过指定启用 EVPN-MPLS 的区域 ID 和接口,将 OSPF 配置为 EVPN 的内部路由协议。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ospf area 0.0.0.0 interface lo0.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/0.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
    
  8. 在环路接口和启用 EVPN-MPLS 的接口上配置标签分发协议 (LDP)。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ldp interface lo0.0 
    user@switch# set protocols ldp interface xe-2/0/0.0 
    user@switch# set protocols ldp interface xe-2/0/2.0 
    
  9. 为 VLAN v1 配置虚拟交换机路由实例,为其分配 VLAN ID 1、2 和 3,并包括与 VLAN 关联的接口和其他实体。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-instances evpn1 instance-type virtual-switch 
    user@switch# set routing-instances evpn1 interface xe-2/0/6.1 
    user@switch# set routing-instances evpn1 interface ae0.1 
    user@switch# set routing-instances evpn1 interface ae1.1 
    user@switch# set routing-instances evpn1 route-distinguisher 1:11 
    user@switch# set routing-instances evpn1 vrf-target target:1:5 
    user@switch# set routing-instances evpn1 protocols evpn extended-vlan-list 1 
    user@switch# set routing-instances evpn1 protocols evpn mclag bgp-peer 198.51.100.1 
    user@switch# set routing-instances evpn1 switch-options service-id 1 
    user@switch# set routing-instances evpn1 vlans v1 vlan-id 1
    user@switch# set routing-instances evpn1 vlans v1 l3-interface irb.1
    user@switch# set routing-instances evpn2 instance-type virtual-switch 
    user@switch# set routing-instances evpn2 interface xe-2/0/6.2 
    user@switch# set routing-instances evpn2 interface ae0.2 
    user@switch# set routing-instances evpn2 interface ae1.2 
    user@switch# set routing-instances evpn2 route-distinguisher 1:21 
    user@switch# set routing-instances evpn2 vrf-target target:1:6 
    user@switch# set routing-instances evpn2 protocols evpn extended-vlan-list 2 
    user@switch# set routing-instances evpn2 protocols evpn mclag bgp-peer 198.51.100.1 
    user@switch# set routing-instances evpn2 switch-options service-id 2 
    user@switch# set routing-instances evpn2 vlans v1 vlan-id 2  
    user@switch# set routing-instances evpn2 vlans v1 l3-interface irb.2
    user@switch# set routing-instances evpn3 instance-type virtual-switch 
    user@switch# set routing-instances evpn3 interface xe-2/0/6.3 
    user@switch# set routing-instances evpn3 interface ae0.3 
    user@switch# set routing-instances evpn3 interface ae1.3 
    user@switch# set routing-instances evpn3 route-distinguisher 1:31 
    user@switch# set routing-instances evpn3 vrf-target target:1:7 
    user@switch# set routing-instances evpn3 protocols evpn extended-vlan-list 3 
    user@switch# set routing-instances evpn3 protocols evpn mclag bgp-peer 198.51.100.1 
    user@switch# set routing-instances evpn3 switch-options service-id 3 
    user@switch# set routing-instances evpn3 vlans v1 vlan-id 3
    user@switch# set routing-instances evpn3 vlans v1 l3-interface irb.3

PE3 配置

CLI 快速配置

PE3:EVPN-MPLS 配置

content_copy zoom_out_map
set interfaces lo0 unit 0 family inet address 198.51.100.3/32 primary 
set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.1/24 
set interfaces xe-2/0/2 unit 0 family mpls 
set interfaces xe-2/0/3 unit 0 family inet address 192.0.2.11/24 
set interfaces xe-2/0/3 unit 0 family mpls 
set interfaces xe-2/0/6 enable
set interfaces xe-2/0/6 flexible-vlan-tagging
set interfaces xe-2/0/6 encapsulation flexible-ethernet-services
set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk
set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3
set interfaces irb unit 1 family inet address 10.2.1.3/24 virtual-gateway-address 10.2.1.254
set interfaces irb unit 2 family inet address 10.2.2.3/24 virtual-gateway-address 10.2.2.254
set interfaces irb unit 3 family inet address 10.2.3.3/24 virtual-gateway-address 10.2.3.254
set routing-options router-id 198.51.100.3 
set routing-options autonomous-system 65000
set routing-options forwarding-table export evpn-pplb 
set protocols mpls interface xe-2/0/2.0 
set protocols mpls interface xe-2/0/3.0 
set protocols bgp group evpn type internal 
set protocols bgp group evpn local-address 198.51.100.3 
set protocols bgp group evpn family evpn signaling 
set protocols bgp group evpn local-as 65000
set protocols bgp group evpn neighbor 198.51.100.1 
set protocols bgp group evpn neighbor 198.51.100.2 
set protocols ospf area 0.0.0.0 interface lo0.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
set protocols ospf area 0.0.0.0 interface xe-2/0/3.0 
set protocols ldp interface lo0.0 
set protocols ldp interface xe-2/0/2.0 
set protocols ldp interface xe-2/0/3.0 
set policy-options policy-statement evpn-pplb from protocol evpn 
set policy-options policy-statement evpn-pplb then load-balance per-packet
set routing-instances evpn1 instance-type virtual-switch 
set routing-instances evpn1 interface xe-2/0/6.1 
set routing-instances evpn1 route-distinguisher 1:12 
set routing-instances evpn1 vrf-target target:1:5 
set routing-instances evpn1 protocols evpn extended-vlan-list 1 
set routing-instances evpn1 switch-options service-id 1 
set routing-instances evpn1 vlans v1 vlan-id 1
set routing-instances evpn1 vlans v1 l3-interface irb.1
set routing-instances evpn2 instance-type virtual-switch 
set routing-instances evpn2 interface xe-2/0/6.2 
set routing-instances evpn2 route-distinguisher 1:22 
set routing-instances evpn2 vrf-target target:1:6 
set routing-instances evpn2 protocols evpn extended-vlan-list 2 
set routing-instances evpn2 switch-options service-id 2 
set routing-instances evpn2 vlans v1 vlan-id 2
set routing-instances evpn2 vlans v1 l3-interface irb.2
set routing-instances evpn3 instance-type virtual-switch 
set routing-instances evpn3 interface xe-2/0/6.3 
set routing-instances evpn3 route-distinguisher 1:32 
set routing-instances evpn3 vrf-target target:1:7 
set routing-instances evpn3 protocols evpn extended-vlan-list 3 
set routing-instances evpn3 switch-options service-id 3 
set routing-instances evpn3 vlans v1 vlan-id 3
set routing-instances evpn3 vlans v1 l3-interface irb.3

PE3:配置 EVPN-MPLS

分步过程
  1. 配置环路接口以及连接到其他 PE 设备的接口。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces lo0 unit 0 family inet address 198.51.100.3/32 primary 
    user@switch# set interfaces xe-2/0/2 unit 0 family inet address 192.0.2.1/24 
    user@switch# set interfaces xe-2/0/2 unit 0 family mpls 
    user@switch# set interfaces xe-2/0/3 unit 0 family inet address 192.0.2.11/24 
    user@switch# set interfaces xe-2/0/3 unit 0 family mpls
    
  2. 配置连接到主机的接口 xe-2/0/6。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces xe-2/0/6 enable 
    user@switch# set interfaces xe-2/0/6 flexible-vlan-tagging 
    user@switch# set interfaces xe-2/0/6 encapsulation flexible-ethernet-services 
    user@switch# set interfaces xe-2/0/6 unit 1 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 1 family ethernet-switching vlan members 1 
    user@switch# set interfaces xe-2/0/6 unit 2 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 2 family ethernet-switching vlan members 2 
    user@switch# set interfaces xe-2/0/6 unit 3 family ethernet-switching interface-mode trunk 
    user@switch# set interfaces xe-2/0/6 unit 3 family ethernet-switching vlan members 3
    
  3. 配置 IRB 接口 irb.1、irb.2 和 irb.3。

    content_copy zoom_out_map
    [edit]
    user@switch# set interfaces irb unit 1 family inet address 10.2.1.3/24 virtual-gateway-address 10.2.1.254
    user@switch# set interfaces irb unit 2 family inet address 10.2.2.3/24 virtual-gateway-address 10.2.2.254
    user@switch# set interfaces irb unit 3 family inet address 10.2.3.3/24 virtual-gateway-address 10.2.3.254
    
  4. 分配路由器 ID 以及 PE1、PE2 和 PE3 所在的自治系统。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options router-id 198.51.100.3 
    user@switch# set routing-options autonomous-system 65000
    
  5. 使用 EVPN 多宿主主动-主动模式时,为 EVPN 路由启用按数据包负载均衡。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-options forwarding-table export evpn-pplb
    user@switch# set policy-options policy-statement evpn-pplb from protocol evpn 
    user@switch# set policy-options policy-statement evpn-pplb then load-balance per-packet
    
  6. 在接口 xe-2/0/2.0 和 xe-2/0/3.0 上启用 MPLS。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols mpls interface xe-2/0/2.0 
    user@switch# set protocols mpls interface xe-2/0/3.0
    
  7. 配置包含 PE1、PE2 和 PE3 的 IBGP 叠加网络。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols bgp group evpn type internal 
    user@switch# set protocols bgp group evpn local-address 198.51.100.3 
    user@switch# set protocols bgp group evpn family evpn signaling 
    user@switch# set protocols bgp group evpn local-as 65000
    user@switch# set protocols bgp group evpn neighbor 198.51.100.1 
    user@switch# set protocols bgp group evpn neighbor 198.51.100.2
    
  8. 通过指定启用 EVPN-MPLS 的区域 ID 和接口,将 OSPF 配置为 EVPN 的内部路由协议。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ospf area 0.0.0.0 interface lo0.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/2.0 
    user@switch# set protocols ospf area 0.0.0.0 interface xe-2/0/3.0
    
  9. 在环路接口和启用 EVPN-MPLS 的接口上配置 LDP。

    content_copy zoom_out_map
    [edit]
    user@switch# set protocols ldp interface lo0.0 
    user@switch# set protocols ldp interface xe-2/0/2.0 
    user@switch# set protocols ldp interface xe-2/0/3.0
    
  10. 为 VLAN v1 配置虚拟交换机路由实例,为其分配 VLAN ID 1、2 和 3,并包括与 VLAN 关联的接口和其他实体。

    content_copy zoom_out_map
    [edit]
    user@switch# set routing-instances evpn1 instance-type virtual-switch 
    user@switch# set routing-instances evpn1 interface xe-2/0/6.1 
    user@switch# set routing-instances evpn1 route-distinguisher 1:12 
    user@switch# set routing-instances evpn1 vrf-target target:1:5 
    user@switch# set routing-instances evpn1 protocols evpn extended-vlan-list 1 
    user@switch# set routing-instances evpn1 switch-options service-id 1 
    user@switch# set routing-instances evpn1 vlans v1 vlan-id 1
    user@switch# set routing-instances evpn1 vlans v1 l3-interface irb.1
    user@switch# set routing-instances evpn2 instance-type virtual-switch 
    user@switch# set routing-instances evpn2 interface xe-2/0/6.2 
    user@switch# set routing-instances evpn2 route-distinguisher 1:22 
    user@switch# set routing-instances evpn2 vrf-target target:1:6 
    user@switch# set routing-instances evpn2 protocols evpn extended-vlan-list 2 
    user@switch# set routing-instances evpn2 switch-options service-id 2 
    user@switch# set routing-instances evpn2 vlans v1 vlan-id 2
    user@switch# set routing-instances evpn2 vlans v1 l3-interface irb.2
    user@switch# set routing-instances evpn3 instance-type virtual-switch 
    user@switch# set routing-instances evpn3 interface xe-2/0/6.3 
    user@switch# set routing-instances evpn3 route-distinguisher 1:32 
    user@switch# set routing-instances evpn3 vrf-target target:1:7 
    user@switch# set routing-instances evpn3 protocols evpn extended-vlan-list 3 
    user@switch# set routing-instances evpn3 switch-options service-id 3 
    user@switch# set routing-instances evpn3 vlans v1 vlan-id 3
    user@switch# set routing-instances evpn3 vlans v1 l3-interface irb.3
    
footer-navigation