FlexE实践笔记
1、FlexE概述
FlexE(Flexible Ethernet,灵活的以太网)技术基于高速以太网接口,通过以太网MAC速率和PHY速率的解耦,实现灵活控制接口速率,以适应不同的网络传输结构
技术优点
FlexE技术具有如下优点:
- a、让接口速率可变,不再受制于IEEE802.3标准所定义的10-25-40-50-100-200-400GE的阶梯型速率体系。
- b、接口的带宽可以按需灵活满足,且不受制于光传输网络能力。
2、FlexE技术实现
2.1 概念介绍
FlexE是OIF组织基于IEEE802.3/1制定的标准体系架构的扩展研究。如图1所示,它基于OSI七层模型,在PHY层(物理层)和MAC层(数据链路层)中间增加了Shim层,用来实现MAC和PHY的解耦。
图1 FlexE结构示意图
如图2所示,FlexE基于Client/Group架构定义,可以支持任意多个不同子接口(FlexE Client)在任意一组PHY(FlexE Group)上的映射和传输,从而实现上述捆绑、通道化及子速率等功能。其中:
FlexE Group:每个FlexE Group由1个或多个(最多254个)基于802.3标准的以太网PHY组成,组内所有的PHY使用相同的物理层,每个PHY在FlexE Group都有一个唯一的编号。
FlexE Shim:处于MAC和PHY层之间,是FlexE的核心处理逻辑层。它将MAC层的FlexE Client数据流映射到FlexE Group的PHY上进行传输;并且也支持将FlexE Group内的PHY传输的数据反映射到MAC层的FlexE Client数据流。FlexE Shim可以基于组对组内PHY的带宽进行捆绑、子速率、通道化处理。
FlexE Client:对应于以太网络中的传统接口,是基于MAC层速率的以太网数据流,其速率不固定,用于对接不同速率需求的UNI(User Network Interface,网络用户接口)。FlexE Client的数据流按照64B/66B编码形成多个数据块(blocks),这些blocks会插入到FlexE Group的某个位置的Sub-Calendar中。
FlexE Calendar:是FlexE Shim处理映射和反映射处理的机制。将FlexE Group内100G的PHY拆分成20个Slot,每个PHY的一组Slot称为Sub-Calendar,每个Slot承载5G速率。FlexE Calendar将FlexE Group内每个PHY上的Sub-Calendar上承载的66B数据块分配给指定的FlexE Client。理论上每个FlexE Client可以被设置的带宽为5G的倍数。
图2 FlexE通用架构示意图
2.2 FlexE支持的功能
2.2.1 捆绑
如图3所示,FlexE支持捆绑多个IEEE 802.3标准的物理接口,使多个PHY一起工作,以支持更高速率。例如,将2个100G物理接口捆绑,实现200G的MAC层速率。
图3 捆绑功能示意图
2.2.2 通道化
如图4所示,对基于IEEE 802.3标准的物理接口的通道化是指多个低速率数据流共享一个PHY或多个PHY。例如,在1个100G速率的物理接口上承载25G和75G两个MAC层速率的数据流。
图4 通道化功能示意图
2.2.3 子速率
如图5所示,基于IEEE 802.3标准物理接口的子速率是指一个低速率的数据流共享一个PHY或多个PHY。例如,在2个100G速率的物理接口上仅仅承载50G的MAC层速率。
图5 子速率功能示意图
3、FlexE实验
3.1 实验内容和目标
本次实验需求实根据实际操作过的笔记记录,搭建实验拓扑,并完成以下实验任务:
任意2台骨干设备采用100G链路互联,在100G链路上灵活分配带宽,起loopback口模拟业务网段进行测试验证。
左边设备M6000-S1:ZTE M6000-S ,业务地址为loopback12:12.12.12.1 32
右边设备M6000-S2:ZTE M6000-S ,业务地址为loopback12:14.14.14.14 32
本次实验为把100G链路划分为2个不同带宽的通道,承载不通业务。
3.2 RouterA配置步骤
3.2.1 配置端口工作模式
开启物理接口的flexe工作模式
M6000-S1(config)#interface cgei-0/2/1/1
M6000-S1($-if-cgei-0/2/1/1)#work-mode flexe
M6000-S1($-if-cgei-0/2/1/1)#show this
!<firload>work-mode flexe
!</firload>
!<if-intf>no shutdown
!</if-intf>
3.2.2 配置FlexE Group
创建FlexE组
进入接口配置模式
配置FlexE_group的编号
配置flexe_group的接收调度模式,并配置claendar模板
配置flexe_group绑定物理接口
M6000-S1(config)#interface flexe flexe_group1
M6000-S1(config)#interface flexe_group1
M6000-S1($-if-flexe_group1)#group-number 1
M6000-S1($-if-flexe_group1)#receive-mode auto
M6000-S1($-if-flexe_group1)# bind interface cgei-0/2/1/1 phy-number 1 timeslots all
M6000-S1($-if-flexe_group1)#rx-calendar A
M6000-S1($-if-flexe_group1)#tx-calendar A
M6000-S1($-if-flexe_group1)#show this
!<port-physical-config>group-number 1bind interface cgei-0/2/1/1 phy-number 1 timeslots all
!</port-physical-config>
3.2.3 配置Flexe_Client
创建Flexe_client1
进入flexe_client1接口配置模式
配置FlexE_client1的编号 *必须和对端一致
配置flexe_client1的终结模式
配置flexe_client1占用的时隙
使能flexe_client1接口
M6000-S1(config)#interface flexe flexe_client1
M6000-S1(config)#interface flexe_client1
M6000-S1($-if-flexe_client1)#client-number 1
M6000-S1($-if-flexe_client1)#terminal-mode enable
M6000-S1($-if-flexe_client1)#bind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 0-4
M6000-S1($-if-flexe_client1)#no shutdown
M6000-S1($-if-flexe_client1)#sho th
!<port-physical-config>terminal-mode enablebind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 0-4client-number 1
!</port-physical-config>
创建Flexe_client2
进入flexe_client2接口配置模式
配置FlexE_client2的编号 *必须和对端一致
配置flexe_client2的终结模式
配置flexe_client2占用的时隙
使能flexe_client2接口
M6000-S1(config)# interface flexe flexe_client2
M6000-S1(config)#interface flexe_client2
M6000-S1($-if-flexe_client2)#client-number 2
M6000-S1($-if-flexe_client2)#terminal-mode enable
M6000-S1($-if-flexe_client2)#bind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 5-19
M6000-S1($-if-flexe_client2)#no shutdown
M6000-S1($-if-flexe_client2)#sho th
!<port-physical-config>terminal-mode enablebind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 5-19client-number 2
!</port-physical-config>
3.2.4 配置VEI
创建VEI1
进入VEI接口
配置VEI与flexe_client的绑定
配置VEI接口的IP地址
启用VEI接口
M6000-S1(config)#interface vei vei1
M6000-S1(config)#interface vei1
M6000-S1(config-if-vei1)#bind flexe_client flexe_client1
M6000-S1(config-if-vei1)#ip address 11.11.11.1 255.255.255.0
M6000-S1(config-if-vei1)#no shutdown
M6000-S1(config-if-vei1)#sho th
!<if-intf>ip address 11.11.11.1 255.255.255.0
!</if-intf>
!<port-physical-config>bind flexe_client flexe_client1
!</port-physical-config>
创建VEI2
进入VEI接口
配置VEI与flexe_client的绑定
配置VEI接口的IP地址
启用VEI接口
M6000-S1(config)#interface vei vei2
M6000-S1(config)#interface vei2
M6000-S1(config-if-vei2)#bind flexe_client flexe_client2
M6000-S1(config-if-vei2)#ip add 22.22.22.1 255.255.255.0
M6000-S1(config-if-vei2)#no shutdown
3.3 RouterB配置步骤
3.3.1 配置端口工作模式
开启物理接口的flexe工作模式
M6000-S2(config)#interface cgei-0/2/1/1
M6000-S2(config)#no shutdown
M6000-S2($-if-cgei-0/2/1/1)#sho th
!<firload>work-mode flexe
!</firload>
!<if-intf>no shutdown
!</if-intf>
3.3.2 配置FlexE Group
创建FlexE组
进入接口配置模式
配置FlexE_group的编号
配置flexe_group的接收调度模式,并配置claendar模板
配置flexe_group绑定物理接口
M6000-S2(config)#interface flexe flexe_group1
M6000-S2(config)#interface flexe_group1
M6000-S2($-if-flexe_group1)#group-number 1
M6000-S2($-if-flexe_group1)#receive-mode auto
M6000-S2($-if-flexe_group1)# bind interface cgei-0/2/1/1 phy-number 1 timeslots all
M6000-S2($-if-flexe_group1)#rx-calendar A
M6000-S2($-if-flexe_group1)#tx-calendar A
M6000-S2($-if-flexe_group1)#show this
!<port-physical-config>group-number 1bind interface cgei-0/2/1/1 phy-number 1 timeslots all
!</port-physical-config>
3.3.3 配置Flexe_Client
创建Flexe_client1
进入flexe_client1接口配置模式
配置FlexE_client1的编号 *必须和对端一致
配置flexe_client1的终结模式
配置flexe_client1占用的时隙
使能flexe_client1接口
M6000-S2(config)#interface flexe flexe_client1
M6000-S2(config)#interface flexe_client1
M6000-S2($-if-flexe_client1)#client-number 1
M6000-S2($-if-flexe_client1)#terminal-mode enable
M6000-S2($-if-flexe_client1)#bind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 0-4
M6000-S2($-if-flexe_client1)#no shutdown
M6000-S2($-if-flexe_client1)#sho th
!<port-physical-config>terminal-mode enablebind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 0-4client-number 1
!</port-physical-config>
创建Flexe_client2
进入flexe_client2接口配置模式
配置FlexE_client2的编号 *必须和对端一致
配置flexe_client2的终结模式
配置flexe_client2占用的时隙
使能flexe_client2接口
M6000-S2(config)# interface flexe flexe_client2
M6000-S2(config)#interface flexe_client2
M6000-S2($-if-flexe_client2)#client-number 2
M6000-S2($-if-flexe_client2)#terminal-mode enable
M6000-S2($-if-flexe_client2)#bind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 5-19
M6000-S2($-if-flexe_client2)#no shutdown
M6000-S2($-if-flexe_client2)#sho th
!<port-physical-config>terminal-mode enablebind flexe_group flexe_group1 calendar-template A interface cgei-0/2/1/1 timeslots 5-19client-number 2
!</port-physical-config>
3.3.4 配置VEI
创建VEI1
进入VEI接口
配置VEI与flexe_client的绑定
配置VEI接口的IP地址
启用VEI接口
M6000-S2(config)#interface vei vei1
M6000-S2(config)#interface vei1
M6000-S2(config-if-vei1)#bind flexe_client flexe_client1
M6000-S2(config-if-vei1)#ip address 11.11.11.2 255.255.255.0
M6000-S2(config-if-vei1)#no shutdown
M6000-S2(config-if-vei1)#sho th
!<if-intf>ip address 11.11.11.2 255.255.255.0
!</if-intf>
!<port-physical-config>bind flexe_client flexe_client1
!</port-physical-config>
创建VEI2
进入VEI接口
配置VEI与flexe_client的绑定
配置VEI接口的IP地址
启用VEI接口
M6000-S2(config)#interface vei vei2
M6000-S2(config)#interface vei2
M6000-S2(config-if-vei2)#bind flexe_client flexe_client2
M6000-S2(config-if-vei2)#ip add 22.22.22.2 255.255.255.0
M6000-S2(config-if-vei2)#no shutdown
M6000-S2(config-if-vei2)#sho th
!<if-intf>ip address 22.22.22.2 255.255.255.0
!</if-intf>
!<port-physical-config>bind flexe_client flexe_client2
3.4 配置业务地址
3.4.1 M6000-S1业务地址
flexe_client1的业务地址loopback11:12.12.12.1/32
flexe_client2的业务地址loopback12:13.13.13.1/32
M6000-S1(config)#interface loopback11
M6000-S1(config-if-loopback11)#ip add 12.12.12.1 255.255.255.255
M6000-S1(config)#interface loopback12
M6000-S1(config-if-loopback12)#ip add 13.13.13.1 255.255.255.255
M6000-S1(config)#ip route 14.14.14.14 255.255.255.255 11.11.11.2
M6000-S1(config)#ip route 15.15.15.15 255.255.255.255 22.22.22.2
3.4.2 M6000-S2业务地址
flexe_client1的业务地址loopback11:14.14.14.1432
flexe_client2的业务地址loopback12:15.15.15.15/32
M6000-S2(config)#interface loopback11
M6000-S2(config-if-loopback11)#ip add 14.14.14.14 255.255.255.255
M6000-S2(config)#interface loopback12
M6000-S2(config-if-loopback12)#ip add 15.15.15.15 255.255.255.255
M6000-S2(config)#ip route 12.12.12.1 255.255.255.255 11.11.11.1
M6000-S2(config)#ip route 13.13.13.1 255.255.255.255 22.22.22.1
3.5验证
3.5.1 查看flexe_group组带宽
M6000-S1(config)#show interface flexe_group1
flexe_group1 is up, ifindex: 8395Line protocol is up, IPv4 protocol is up, IPv6 protocol is down,detected status is RX-OK/TX-OKLast line protocol up time : 2025-08-14 10:44:04 Hardware is FlexE Group, address is d4c1.c895.f950BW 100 Gbit/sMTU 9622 bytes
M6000-S2(config)#show interface flexe_group1
flexe_group1 is up, ifindex: 8391Line protocol is up, IPv4 protocol is up, IPv6 protocol is down,detected status is RX-OK/TX-OKLast line protocol up time : 2025-08-14 10:52:06 Hardware is FlexE Group, address is d4c1.c895.f7d0BW 100 Gbit/sMTU 9622 bytes
3.5.2 查看接口状态
查看flexe_group、flexe_client和vei接口状态,可以看到接口都UP状态。
注:
中兴设备默认一个时隙5G,flexe_client是0-4共5个时隙,所以25G。
第一台M6000-S1
M6000-S1(config)#show interface brief
Interface Attribute Mode BW Admin Phy Prot Description
cgei-0/0/0/1 optical Duplex/full 100G up up up
cgei-0/0/0/2 optical Duplex/full 100G up up up
vei1 optical Duplex/full 25G up up up
vei2 optical Duplex/full 75G up up up
flexe_client1 N/A N/A 25G up up up
flexe_client2 N/A N/A 75G up up up
flexe_group1 N/A N/A 100G up up up
cgei-0/0/1/1 optical Duplex/full 100G up up up
M6000-S1(config)#show ip int brief | in vei
vei1 11.11.11.1 255.255.255.0 up up up
vei2 22.22.22.1 255.255.255.0 up up up
第二台M6000-S2
M6000-S2(config)#show interface brief
Interface Attribute Mode BW Admin Phy Prot Description
cgei-0/0/0/1 optical Duplex/full 100G up up up
cgei-0/0/0/2 optical Duplex/full 100G up up up
vei1 optical Duplex/full 25G up up up
vei2 optical Duplex/full 75G up up up
flexe_client1 N/A N/A 25G up up up
flexe_client2 N/A N/A 75G up up up
flexe_group1 N/A N/A 100G up up up
cgei-0/0/1/1 optical Duplex/full 100G up up up
M6000-S2(config)#show ip interface brief | in vei
vei1 11.11.11.2 255.255.255.0 up up up
vei2 22.22.22.2 255.255.255.0 up up up
3.5.3 业务地址测试
M6000-S1(config)#ping 14.14.14.14 source 12.12.12.1
sending 5,100-byte ICMP echo(es) to 14.14.14.14,timeout is 2 second(s).
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max= 1/1/1 ms.
[finish]M6000-S1#ping 15.15.15.15 source 13.13.13.1
sending 5,100-byte ICMP echo(es) to 15.15.15.15,timeout is 2 second(s).
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max= 1/1/1 ms.
[finish]