手册下载
H3C数据中心交换机S-MLAG最佳实践-6W100-整本手册.pdf (742.34 KB)
H3C数据中心交换机S-MLAG最佳实践
资料版本:6W100-20220930
Copyright © 2022 新华三技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
通过S-MLAG(Simple Multichassis Link Aggregation,简单跨设备链路聚合)功能将多台物理设备在聚合层面虚拟成一台设备实现简单的跨设备链路聚合,在服务器对接的场景中提供设备级冗余保护和流量负载分担。
IRF(Intelligent Resilient Framework,智能弹性架构)是H3C自主研发的软件虚拟化技术。它的核心思想是将多台设备连接在一起,进行必要的配置后,虚拟化成一台设备。使用这种虚拟化技术可以集合多台设备的硬件资源和软件处理能力,实现多台设备的协同工作、统一管理和不间断维护。
M-LAG(Multichassis link aggregation,跨设备链路聚合)是一种跨设备链路聚合技术,将两台物理设备在聚合层面虚拟成一台设备来实现跨设备链路聚合,从而提供设备级冗余保护和流量负载分担。
IRF、M-LAG、和S-MLAG都能提供设备级的冗余保护和流量负载分担功能,三者的对比如表1-1所示。
表1-1 IRF、M-LAG和S-MLAG对比
项目 |
IRF |
M-LAG |
S-MLAG |
控制面 |
· 所有成员设备控制面统一,集中管理 · 所有成员设备需要同步所有表项 · 成员设备之间必须有专用物理链路(IRF Link) |
· 两台独立设备,控制平面解耦,运维风险降低 · 主要同步MAC表项/ARP表项/ND表项 · 成员设备之间有互连链路peer-link |
· 两台独立设备,控制平面解耦,运维风险降低 · 不需要同步MAC表项/ARP表项/ND表项,使用BGP同步主机路由的方式实现类似表项同步的目的,并要求所有报文都由设备作三层转发(网关配置ARP代理、禁止服务器广播ARP) · 成员设备之间没有互连链路即可实现双活,但要求服务器支持双发ARP |
版本升级 |
· 需要成员设备同步升级,或者主设备、从设备分开升级但操作较复杂 · 升级时业务中断时间2s左右 |
· 可独立升级,升级时业务中断时间小于1s · 对于支持GIR(Graceful Insertion and Removal,平滑插入和移除)的版本,可以做到不中断 |
可独立升级,升级时业务中断时间较小(例如:S6850 R6635版本中断时间为79毫秒) |
配置管理 |
统一配置,统一管理,操作简单 |
独立配置,配置复杂度有所增加 |
独立配置,配置复杂度有所增加 |
故障处理 |
IRF成员设备之间采用IRF物理链路互连,一台成员设备连接服务器的链路故障时,服务器互访流量可以通过IRF物理链路绕行到对端成员设备转发 |
M-LAG设备之间采用peer-link互连,一台M-LAG设备连接服务器的链路故障时,服务器互访流量可以通过peer-link绕行到对端M-LAG设备转发 |
配置S-MLAG的设备之间没有互连链路,S-MLAG中的一台设备连接服务器的链路故障时,同组S-MLAG连接的服务器互访的一半流量需要绕行上级设备 |
每两台Leaf设备配置S-MLAG,为服务器提供设备级的冗余备份,并实现流量负载分担。
每组Leaf设备配置VLAN双活网关,网关接口开启本地代理ARP功能,要求服务器只能学习到网关的MAC地址,服务器与其他服务器或设备之间三层互访。
Leaf与Spine之间通过EBGP等价路由实现负载分担。BGP路由有两种配置方案:
· 方案一:所有Spine设备配置同一AS号,所有Leaf设备配置同一AS号。
· 方案二:所有Spine设备、所有Leaf设备均配置不同的AS号。
采用方案二时,网络节点规模不要超过1000,否则会造成网络设备计算负担过重。
Leaf设备配置Monitor Link,所有上行Spine的接口为uplink口,所有下行服务器的接口为downlink口,以便Leaf设备上行口down时能够联动下行服务器的聚合成员口切换。
图2-1 S-MLAG典型组网图(路由配置方案一)
图2-2 S-MLAG典型组网图(路由配置方案二)
正常运行情况下,Server间通信和Server与Core间通信如图2-3所示。
Leaf下行链路故障时,Server间通信如图2-4所示。
图2-4 Leaf下行链路故障流量示意
Leaf上行链路故障时,Server间通信和Server与Core间通信如图2-5所示。
图2-5 Leaf上行链路故障流量示意
Leaf设备故障时,Server间通信和Server与Core间通信如图2-6所示。
图2-6 Leaf设备故障流量示意
服务器网卡使用bond4工作模式时,其接入交换机需要配置动态聚合,且服务器需要支持两个上行口双发ARP使两台接入交换机都能学到服务器的ARP。当服务器侧聚合组任一成员口发生down->up的状态变化时都要发送ARP给接入交换机以便交换机刷新ARP表项并生成主机路由。
服务器网卡使用bond1工作模式(主备模式)时有如下要求:
· 接入交换机采用动态聚合或静态聚合都可以。服务器网卡需要支持接口发生inactive-active状态变化时发送ARP给接入交换机以便交换机刷新ARP表项并生成主机路由。
· 当交换机配置动态聚合时,需要将接入交换机聚合接口配置为聚合边缘接口(lacp edge-port命令)。
· 建议将ARP老化时间配置为30秒,使得服务器网卡接口切换为inactive,但是状态没有down的情况下,交换机能够尽快刷新ARP表项并生成主机路由以减少丢包时间。ARP老化时间不建议配置更小,否则会加重CPU负担。
如图4-1所示:
· Leaf 1和Leaf 2作为接入设备通过二层以太网接口分别与Server 1,Server 2的二层以太网接口相连。
· 服务器网卡使用bond4工作模式。
现要求:
· 配置S-MLAG功能,使服务器通过聚合接口双上行接入到Leaf设备,为服务器设备提供冗余保护和流量负载分担。
· Server 1、Server 2自动获取IPv4、IPv6地址,方便用户装机。
· Leaf 1和Leaf 2作为Server 1、Server 2的双活网关,Server与Server、Server与Core间通过三层网络通信。为提高安全性,用户希望Leaf 1、Leaf 2非本机的ARP报文、ND报文不会泄露到其他设备上。
· 为了提高可靠性,用户希望Leaf 1、Leaf 2设备可以动态感知上联端口故障并联动下行端口Down,以便保护业务流量。
图4-1 S-MLAG典型组网配置举例组网图
设备 |
接口 |
地址 |
接口说明及对接设备和接口 |
Leaf 1 |
Vlan-int100 |
100.1.1.1 |
服务器网关接口 |
100::1 |
|||
LoopBack0 |
1.1.1.1 |
- |
|
1::1 |
|||
HGE1/0/25 |
101.1.1.1 |
上行接口,连接Spine 1:HGE1/0/1 |
|
101::1 |
|||
HGE1/0/26 |
103.1.1.1 |
上行接口,连接Spine 2:HGE1/0/2 |
|
103::1 |
|||
WGE1/0/1 |
-- |
S-MLAG聚合成员口,连接Server 1 |
|
WGE1/0/2 |
-- |
S-MLAG聚合成员口,连接Server 2 |
|
Leaf 2 |
Vlan-int100 |
100.1.1.1 |
服务器网关接口 |
100::1 |
|||
LoopBack0 |
2.2.2.2 |
- |
|
2::2 |
|||
HGE1/0/25 |
102.1.1.1 |
上行接口,连接Spine 2:HGE1/0/1 |
|
102::1 |
|||
HGE1/0/26 |
104.1.1.1 |
上行接口,连接Spine 1:HGE1/0/2 |
|
104::1 |
|||
WGE1/0/1 |
-- |
S-MLAG聚合成员口,连接Server 2 |
|
WGE1/0/2 |
-- |
S-MLAG聚合成员口,连接Server 1 |
|
Spine 1 |
LoopBack0 |
3.3.3.3 |
- |
3::3 |
- |
||
HGE1/0/1 |
101.1.1.2 |
下行接口,连接Leaf 1:HGE1/0/25 |
|
101::2 |
|||
HGE1/0/2 |
104.1.1.2 |
下行接口,连接Leaf 2:HGE1/0/26 |
|
104::2 |
|||
Spine 2 |
LoopBack0 |
4.4.4.4 |
- |
4::4 |
- |
||
HGE1/0/1 |
102.1.1.2 |
下行接口,连接Leaf 2:HGE1/0/25 |
|
102::2 |
|||
HGE1/0/2 |
103.1.1.2 |
下行接口,连接Leaf 1:HGE1/0/26 |
|
103::2 |
|||
Server 1 |
Eth1&Eth2 |
100.1.1.22 |
连接Leaf 1、Leaf 2 |
100::22 |
连接Leaf 1、Leaf 2 |
||
Server 2 |
Eth1&Eth2 |
100.1.1.33 |
连接Leaf 1、Leaf 2 |
100::33 |
连接Leaf 1、Leaf 2 |
Leaf 1、Leaf 2配置S-MLAG实现服务器双上行接入。
Leaf 1、Leaf 2连接服务器的VLAN接口配置相同的IP地址和MAC地址作为双活网关,并配置直连路由发布功能。
Leaf设备连接服务器的VLAN接口开启本地ARP代理功能和ND代理功能,使同组Leaf设备同一网段的主机之间三层互通。
Leaf 1和Leaf 2配置DHCP Relay来转发DHCP报文,协助服务器获取IP地址。
配置BGP路由协议。同级设备配置相同的AS,所有Leaf设备配置AS 100,所有Spine设备配置AS 200。Leaf设备与Spine设备间建立EBGP对等体。
Leaf设备配置路由策略,添加Community属性0:100。
Spine设备配置路由策略,匹配Community属性0:100的路由,将从Leaf收到的路由的AS替换为本地AS,否则Leaf设备无法学习其他Leaf发布的路由(设备收到BGP邻居发布的路由会检查AS_PATH属性,如果路由的AS_PATH中包含自身AS号,则不会学习该路由)。本配置可以实现Leaf下行链路故障时,服务器间的互访流量可以绕行Spine互通,如图2-4 Leaf下行链路故障流量示意。
Leaf设备配置扩展团体SoO属性,实现从Spine收到携带相同SoO属性的路由时,不会将该路由再发送到其他Spine以避免环路。
Spine设备配置扩展团体SoO属性,实现从Core收到携带相同SoO属性的路由时,不会将该路由再发送到其他Core以避免环路。
团体(COMMUNITY)属性:BGP将具有相同特征的路由归为一组,称为一个团体,通过在路由中携带团体属性标识路由所属的团体。团体没有物理上的边界,不同AS的路由可以属于同一个团体。根据需要,一条路由可以携带一个或多个团体属性值(每个团体属性值用一个四字节的整数表示)。接收到该路由的路由器可以通过比较团体属性值对路由作出适当的处理(比如决定是否发布该路由、在什么范围发布等),而不需要匹配复杂的过滤规则(如ACL),从而简化路由策略的应用和降低维护管理的难度。
SoO扩展团体属性用来标识路由的原始站点。路由器不会将带有SoO属性的路由发布给该SoO标识的站点,确保来自某个站点的路由不会再被发布到该站点,从而避免路由环路。在AS路径信息丢失时,可以通过SoO属性来避免发生环路。
配置BGP路由协议。所有设备配置不同的AS。Leaf 1配置AS 101,Leaf 2配置AS 102。Spine 1配置AS 201,Spine 2配置AS 202。Leaf设备与Spine设备间建立EBGP对等体。
为实现负载分担,Leaf设备和Spine设备需要配置AS_PATH属性内容不同但长度相同的路由之间能够形成BGP负载分担。
Leaf设备配置扩展团体SoO属性,实现从Spine收到携带相同SoO属性的路由时,不会将该路由再发送到其他Spine以避免环路。
Spine设备配置扩展团体SoO属性,实现从Core收到携带相同SoO属性的路由时,不会将该路由再发送到其他Core以避免环路。
团体(COMMUNITY)属性:BGP将具有相同特征的路由归为一组,称为一个团体,通过在路由中携带团体属性标识路由所属的团体。团体没有物理上的边界,不同AS的路由可以属于同一个团体。根据需要,一条路由可以携带一个或多个团体属性值(每个团体属性值用一个四字节的整数表示)。接收到该路由的路由器可以通过比较团体属性值对路由作出适当的处理(比如决定是否发布该路由、在什么范围发布等),而不需要匹配复杂的过滤规则(如ACL),从而简化路由策略的应用和降低维护管理的难度。
SoO扩展团体属性用来标识路由的原始站点。路由器不会将带有SoO属性的路由发布给该SoO标识的站点,确保来自某个站点的路由不会再被发布到该站点,从而避免路由环路。在AS路径信息丢失时,可以通过SoO属性来避免发生环路。
Leaf设备配置QoS策略,只允许连接服务器的VLAN接口发送的ARP报文,禁止其他ARP报文转发,防止ARP报文泄露到其他设备。防止ARP泄露的配置目的如下:存在ARP泄露的情况下,同组Leaf连接的服务器会互相学习到对方的ARP,例如Server 2学习到Server 1的ARP,此时如果Leaf 1连接Server 1的链路故障,Leaf 1学习不到Server1的ARP,但是Server 2发往Server 1的流量有一半会发送到Leaf 1上,导致Server 2发往Server 1的一半流量丢失。
对于广播报文敏感的网络(如RDMA网络),Leaf连接服务器的物理端口配置广播、组播、未知单播风暴抑制功能,不允许广播、组播、未知单播报文转发。ND报文为组播报文,本配置也可以防止ND泄露。
Leaf设备配置ARP生成32位主机路由功能,当其中一台S-MLAG成员设备连接服务器的链路故障时,可以及时更新路由信息,使下行流量切换到同组Leaf的另一台成员设备上。
Leaf设备配置Monitor Link,当上行接口down时联动连接服务器的下行接口down,使服务器的上行流量切换到对端Leaf设备。否则,当Leaf上行接口故障时,服务器无法感知依然会向Leaf设备发送流量,造成流量持续丢失。
设备 |
软件版本 |
S6805/S6825/S6850/S9850/S9820-64H/S9820-8C |
R6635版本 |
· 组网中同时部署IPv4和IPv6时,建议设备进行如下两条配置:
¡ hardware-resource switch-mode DUAL-STACK:配置MAC地址表、ARP表/ND表、路由表容量模式为双栈模式。
¡ hardware-resource routing-mode ipv6-128:开启前缀大于64位的IPv6路由功能。
· 如果设备需要区分服务类型时,需要所有接口配置qos trust dscp,信任报文携带的DSCP优先级。
· S-MLAG只能应用在动态类型二层以太网聚合接口上。
设备 |
配置任务 |
配置步骤 |
Leaf |
配置S-MLAG |
|
配置下行VLAN接口 包括配置双活网关、ARP/ND代理、ARP/ND直连路由发布、DHCP Relay |
||
配置下行物理接口 主要配置未知单播、组播、广播报文抑制 |
||
配置上行物理接口 |
||
配置ARP防泄漏 |
||
配置Monitor Link |
||
配置BGP |
方式一:4.6.1 7. 方式二:4.6.1 8. |
|
Spine |
配置下行物理口 |
|
配置BGP |
方式一:4.6.2 2. 方式二:4.6.2 3. |
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
lacp system-mac 0000-5e00-0101 |
lacp system-mac 0000-5e00-0101 |
配置LACP的系统MAC地址 |
Leaf 1和Leaf 2需要配置一样 |
lacp system-priority 200 |
lacp system-priority 200 |
配置LACP的系统优先级 |
Leaf 1和Leaf 2需要配置一样 |
lacp system-number 1 |
lacp system-number 2 |
配置LACP的系统编号 |
Leaf 1和Leaf 2的LACP系统编号不能相同 |
interface bridge-aggregation 1 |
interface bridge-aggregation 1 |
创建二层聚合接口1 |
- |
link-aggregation mode dynamic |
link-aggregation mode dynamic |
配置聚合组工作在动态聚合模式 |
仅工作在动态聚合模式下的二层聚合接口可以加入S-MLAG组 |
lacp edge-port |
lacp edge-port |
配置聚合接口为聚合边缘接口 |
- |
port s-mlag group 1 |
port s-mlag group 1 |
配置聚合接口加入S-MLAG组1 |
仅工作在动态聚合模式下的二层聚合接口可以加入S-MLAG组 |
stp edged-port |
stp edged-port |
配置端口为STP边缘端口 |
- |
quit |
quit |
退出接口视图 |
- |
interface bridge-aggregation 2 |
interface bridge-aggregation 2 |
创建二层聚合接口2 |
- |
link-aggregation mode dynamic |
link-aggregation mode dynamic |
配置聚合组工作在动态聚合模式 |
仅工作在动态聚合模式下的二层聚合接口可以加入S-MLAG组 |
lacp edge-port |
lacp edge-port |
配置聚合接口为聚合边缘接口 |
- |
port s-mlag group 2 |
port s-mlag group 2 |
配置聚合接口加入S-MLAG组2 |
仅工作在动态聚合模式下的二层聚合接口可以加入S-MLAG组 |
stp edged-port |
stp edged-port |
配置端口为STP边缘端口 |
- |
quit |
quit |
退出接口视图 |
- |
interface Twenty-FiveGigE1/0/1 |
interface Twenty-FiveGigE1/0/1 |
进入连接服务器的物理端口视图 |
- |
port link-aggregation group 1 |
port link-aggregation group 1 |
配置端口加入聚合口1 |
- |
quit |
quit |
退出接口视图 |
- |
interface Twenty-FiveGigE1/0/2 |
interface Twenty-FiveGigE1/0/2 |
进入连接服务器的物理端口视图 |
- |
port link-aggregation group 2 |
port link-aggregation group 2 |
配置端口加入聚合口2 |
- |
quit |
quit |
退出接口视图 |
- |
· S-MLAG聚合接口配置
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
vlan 100 |
vlan 100 |
创建VLAN 100 |
连接服务器的端口所属VLAN |
quit |
quit |
退出VLAN视图 |
- |
interface Bridge-Aggregation 1 |
interface Bridge-Aggregation 1 |
进入二层以太网聚合接口1视图 |
- |
port link-type trunk |
port link-type trunk |
配置端口的链路类型为Trunk |
- |
undo port trunk permit vlan 1 |
undo port trunk permit vlan 1 |
取消允许VLAN 1的报文通过 |
- |
port trunk permit vlan 100 |
port trunk permit vlan 100 |
允许指定的VLAN通过当前Trunk端口 |
- |
port trunk pvid vlan 100 |
port trunk pvid vlan 100 |
配置Trunk端口的缺省VLAN |
- |
quit |
quit |
退出接口视图 |
- |
interface Bridge-Aggregation 2 |
interface Bridge-Aggregation 2 |
进入二层以太网聚合接口2视图 |
- |
port link-type trunk |
port link-type trunk |
配置端口的链路为Trunk型 |
- |
undo port trunk permit vlan 1 |
undo port trunk permit vlan 1 |
取消允许VLAN 1的报文通过 |
- |
port trunk permit vlan 100 |
port trunk permit vlan 100 |
允许指定的VLAN通过当前Trunk端口 |
- |
port trunk pvid vlan 100 |
port trunk pvid vlan 100 |
配置Trunk端口的缺省VLAN |
- |
quit |
quit |
退出接口视图 |
- |
· IPv4配置
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
interface vlan-interface 100 |
interface vlan-interface 100 |
创建VLAN接口并进入VLAN接口视图 |
- |
ip address 100.1.1.1 24 |
ip address 100.1.1.1 24 |
配置接口的IP地址 |
- |
ip address 110.1.1.1 24 sub |
ip address 110.1.1.1 24 sub |
配置接口的从IP地址 |
配置多个地址,该地址可以作为装机地址 |
mac-address 0000-5e00-0101 |
mac-address 0000-5e00-0101 |
配置接口的MAC地址 |
建议和lacp system-mac配置一致 由于5. 配置ARP防泄露中,需要匹配网关的MAC地址并在全局出方向下发QoS策略,因此建议不同网关接口均指定相同的MAC地址 |
local-proxy-arp enable |
local-proxy-arp enable |
开启本地代理ARP功能 |
- |
arp timer aging second 90 |
arp timer aging second 90 |
配置动态ARP表项的老化时间 |
- |
arp route-direct advertise |
arp route-direct advertise |
开启ARP直连路由通告功能 开启本功能后,ARP模块将ARP表项信息通告给路由管理模块,生成对应的直连路由条目 |
- |
dhcp select relay |
dhcp select relay |
配置接口工作在DHCP中继模式 |
- |
dhcp relay server-address 111.1.1.1 |
dhcp relay server-address 111.1.1.1 |
在DHCP中继上指定DHCP服务器的地址 |
- |
dhcp relay gateway 110.1.1.1 |
dhcp relay gateway 110.1.1.1 |
配置DHCP中继在DHCP报文中填充的中继地址 |
装机获取该网段的地址 |
quit |
quit |
退出接口视图 |
- |
· IPv6配置
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
interface vlan-interface 100 |
interface vlan-interface 100 |
创建VLAN接口并进入VLAN接口视图 |
- |
ipv6 address 100::1 56 |
ipv6 address 100::1 56 |
配置接口的IPv6地址 |
- |
ipv6 address 100:1::1 56 |
ipv6 address 100:1::1 56 |
配置接口的IPv6地址 |
配置多个地址,该地址可以作为装机地址 |
ipv6 address FE80::100:1 link-local |
ipv6 address FE80::100:1 link-local |
配置接口的IPv6 link-local地址 |
配置接口的IPv6 link-local地址 |
ipv6 nd ra prefix 100::/56 4294967295 4294967295 no-autoconfig off-link |
ipv6 nd ra prefix 100::/56 4294967295 4294967295 no-autoconfig off-link |
配置RA消息中的前缀信息为不用于无状态,并设置L-bit值 |
可选配置。当服务器支持L-bit属性时,让服务器不学远端服务器的ND的MAC,只能学网关MAC。ND代理和此配置选一 |
ipv6 nd ra prefix 100:1::/56 4294967295 4294967295 off-link |
ipv6 nd ra prefix 100:1::/56 4294967295 4294967295 off-link |
配置RA消息中的前缀信息为用于无状态,并设置L-bit值 |
|
mac-address 0000-5e00-0101 |
mac-address 0000-5e00-0101 |
配置接口的MAC地址 |
建议和lacp system-mac配置一样 由于5. 配置ARP防泄露中,需要匹配网关的MAC地址并在全局出方向下发QoS策略,因此建议不同网关接口均指定相同的MAC地址 |
local-proxy-nd enable |
local-proxy-nd enable |
开启本地代理ND功能 |
优选配置。与ipv6 nd ra prefix任选其一 |
ipv6 nd nud reachable-time 10000 |
ipv6 nd nud reachable-time 10000 |
配置接口保持邻居可达状态的时间 |
单位为毫秒 |
ipv6 neighbor timer stale-aging second 90 |
ipv6 neighbor timer stale-aging second 90 |
配置接口上STALE状态ND表项的老化时间 |
- |
ipv6 nd unsolicited-na-learning enable |
ipv6 nd unsolicited-na-learning enable |
开启接口从未经请求的NA报文中学习邻居信息的功能 |
可选配置。服务器不支持双发时,使用该配置让S-MLAG设备学习到ND表项 |
undo ipv6 nd ra halt |
undo ipv6 nd ra halt |
配置取消对RA消息发布的抑制 |
- |
ipv6 nd route-direct prefix 100:: 56 convert-length 64 |
ipv6 nd route-direct prefix 100:: 56 convert-length 64 |
配置匹配指定IPv6前缀的ND表项生成网段路由的前缀长度 |
可选配置。默认转128位路由。进行本配置后服务器地址后64位需为0 |
ipv6 nd route-direct prefix 100:1:: 56 convert-length 64 |
ipv6 nd route-direct prefix 100:1:: 56 convert-length 64 |
配置匹配指定IPv6前缀的ND表项生成网段路由的前缀长度 |
可选配置。默认转128位路由。进行本配置后服务器地址后64位需为0 |
ipv6 nd autoconfig managed-address-flag |
ipv6 nd autoconfig managed-address-flag |
配置被管理地址的配置标志位为1,即主机通过有状态自动配置获取IPv6地址 |
可选配置。配合DHCPv6使用 |
ipv6 nd autoconfig other-flag |
ipv6 nd autoconfig other-flag |
配置其他信息配置标志位为1,即主机通过有状态自动配置获取除IPv6地址外的其他信息 |
可选配置。配合DHCPv6使用 |
ipv6 dhcp select relay |
ipv6 dhcp select relay |
配置接口工作在DHCPv6中继模式 |
可选配置 |
ipv6 dhcp relay server-address 111::1 |
ipv6 dhcp relay server-address 111::1 |
指定DHCPv6服务器的地址 |
可选配置 |
ipv6 dhcp relay gateway 100:1::1 |
ipv6 dhcp relay gateway 100:1::1 |
配置DHCPv6中继为DHCPv6客户端分配的网关地址 |
可选配置 |
ipv6 nd ra boot-file-url tftp://169.254.0.1/file/softimg.iso |
ipv6 nd ra boot-file-url tftp://169.254.0.1/file/softimg.iso |
配置RA消息中携带的下载Boot文件的URL地址 |
可选配置 |
quit |
quit |
退出接口视图 |
- |
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
interface Twenty-FiveGigE1/0/1 |
interface Twenty-FiveGigE1/0/1 |
进入连接服务器的物理接口视图 |
- |
link-delay up 5 |
linl-delay up 5 |
设置以太网接口物理连接up状态抑制功能,抑制5秒 |
可选配置 |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
配置端口优先级信任模式dscp |
broadcast-suppression pps 0 |
broadcast-suppression pps 0 |
配置开启端口广播风暴抑制功能 |
设置阈值为0,不允许广播报文进入 |
multicast-suppression pps 0 |
multicast-suppression pps 0 |
配置开启端口组播风暴抑制功能 |
设置阈值为0,不允许组播报文进入 |
unicast-suppression pps 0 |
unicast-suppression pps 0 |
配置开启端口未知单播风暴抑制功能 |
设置阈值为0,不允许未知单播报文进入 |
quit |
quit |
退出接口视图 |
- |
interface Twenty-FiveGigE1/0/2 |
interface Twenty-FiveGigE1/0/2 |
进入连接服务器的物理接口视图 |
- |
link-delay up 5 |
linl-delay up 5 |
设置以太网接口物理连接up状态抑制功能,抑制5秒 |
可选配置 |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
配置端口优先级信任模式dscp |
broadcast-suppression pps 0 |
broadcast-suppression pps 0 |
开启端口广播风暴抑制功能 |
设置阈值为0,不允许广播报文进入 |
multicast-suppression pps 0 |
multicast-suppression pps 0 |
开启端口组播风暴抑制功能 |
设置阈值为0,不允许组播报文进入 |
unicast-suppression pps 0 |
unicast-suppression pps 0 |
开启端口未知单播风暴抑制功能 |
设置阈值为0,不允许未知单播报文进入 |
quit |
quit |
退出接口视图 |
- |
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
interface HundredGigE1/0/25 |
interface HundredGigE1/0/25 |
进入连接服务器的物理接口视图 |
- |
port link-mode route |
port link-mode route |
配置以太网接口的工作模式为三层 |
- |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
- |
ip address 101.1.1.1 255.255.255.0 |
ip address 102.1.1.1 255.255.255.0 |
配置接口的IP地址 |
- |
ipv6 address 101::1/64 |
ipv6 address 102::1/64 |
配置接口的IPv6地址 |
- |
quit |
quit |
退出接口视图 |
- |
interface HundredGigE1/0/26 |
interface HundredGigE1/0/26 |
进入连接服务器的物理接口视图 |
- |
port link-mode route |
port link-mode route |
配置以太网接口的工作模式为三层模式 |
- |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
- |
ip address 103.1.1.1 255.255.255.0 |
ip address 104.1.1.1 255.255.255.0 |
配置接口的IP地址 |
- |
ipv6 address 103::1/64 |
ipv6 address 104::1/64 |
配置接口的IPv6地址 |
- |
quit |
quit |
退出接口视图 |
- |
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
acl number 4000 |
acl number 4000 |
创建二层ACL,并进入ACL视图 |
- |
rule 0 permit type 0806 ffff |
rule 0 permit type 0806 ffff |
配置创建一条规则,匹配ARP报文 |
- |
quit |
quit |
退出ACL视图 |
- |
traffic classifier Arp-Forwarding operator and |
traffic classifier Arp-Forwarding operator and |
创建一个类,并进入类视图;该类匹配本地ARP报文 |
- |
if-match source-mac 0000-5e00-0101 |
if-match source-mac 0000-5e00-0101 |
匹配源MAC地址 |
指定MAC地址为连接服务器的VLAN接口的地址 |
if-match acl mac 4000 |
if-match acl mac 4000 |
匹配ACL 4000 |
- |
quit |
quit |
退出类视图 |
- |
traffic classifier Arp-No-Forwarding operator and |
traffic classifier Arp-No-Forwarding operator and |
创建一个类,并进入类视图;该类匹配所有ARP报文 |
- |
if-match acl mac 4000 |
if-match acl mac 4000 |
匹配ACL 4000 |
- |
quit |
quit |
退出类视图 |
- |
traffic behavior Forwarding |
traffic behavior Forwarding |
创建一个流行为,并进入流行为视图 |
- |
filter permit |
filter permit |
配置流量过滤动作为允许通过 |
- |
quit |
quit |
- |
- |
traffic behavior No-Forwarding |
traffic behavior No-Forwarding |
创建一个流行为,并进入流行为视图 |
- |
filter deny |
filter deny |
配置流量过滤动作为丢弃 |
- |
quit |
quit |
- |
- |
qos policy hw-forwarding |
qos policy hw-forwarding |
创建一个QoS策略,并进入QoS策略视图 |
- |
classifier Arp-Forwarding behavior Forwarding |
classifier Arp-Forwarding behavior Forwarding |
为类指定流行为;允许本机ARP报文通过 |
先配置允许本地ARP的CB对,再配置丢弃所有ARP的CB对 |
classifier Arp-No-Forwarding behavior No-Forwarding |
classifier Arp-No-Forwarding behavior No-Forwarding |
为类指定流行为;丢弃非本机ARP报文 |
先配置允许本地ARP的CB对,再配置丢弃所有ARP的CB对 |
quit |
quit |
- |
- |
qos apply policy hw-forwarding global outbound |
qos apply policy hw-forwarding global outbound |
全局出方向应用QOS策略 |
- |
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
monitor-link group 1 |
monitor-link group 1 |
创建Monitor Link组,并进入Monitor Link组视图 |
- |
downlink up-delay 120 |
downlink up-delay 120 |
配置Monitor Link组下行接口的回切延时 |
可选配置。可根据实际情况调整配置值 |
port HundredGigE1/0/25 uplink |
port HundredGigE1/0/25 uplink |
配置Monitor Link组上行接口 |
需要配置在物理接口上 |
port HundredGigE1/0/26 uplink |
port HundredGigE1/0/26 uplink |
配置Monitor Link组上行接口 |
需要配置在物理接口上 |
port Twenty-FiveGigE1/0/1 downlink |
port Twenty-FiveGigE1/0/1 downlink |
配置Monitor Link组下行接口 |
需要配置在物理接口上 |
port Twenty-FiveGigE1/0/2 downlink |
port Twenty-FiveGigE1/0/2 downlink |
配置Monitor Link组下行接口 |
需要配置在物理接口上 |
quit |
quit |
退出接口视图 |
- |
选择本方式时,Spine侧选择4.6.2 2. 配置BGP(方式一)配置。
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
ip prefix-list Arp index 10 permit 0.0.0.0 0 greater-equal 32 |
ip prefix-list Arp index 10 permit 0.0.0.0 0 greater-equal 32 |
配置一个IPv4地址前缀列表允许32位主机路由 |
- |
ipv6 prefix-list Nd index 10 permit :: 0 greater-equal 128 |
ipv6 prefix-list Nd index 10 permit :: 0 greater-equal 128 |
配置一个IPv6地址前缀列表允许128位主机路由 |
- |
route-policy Arp permit node 10 |
route-policy Arp permit node 10 |
创建路由策略Arp,并进入该路由策略视图 |
- |
if-match ip address prefix-list Arp |
if-match ip address prefix-list Arp |
匹配32位主机路由 |
- |
apply community 0:100 |
apply community 0:100 |
配置BGP路由信息的团体属性 |
- |
quit |
quit |
- |
- |
route-policy Arp deny node 5 |
route-policy Arp deny node 5 |
创建路由策略Arp,并进入该路由策略视图 |
注意节点编号应该小于permit节点 |
if-match interface LoopBack0 |
if-match interface LoopBack0 |
匹配LoopBack0接口路由(实现LoopBack0接口路由(如Leaf 1的1.1.1.1)不发布到Spine) |
- |
quit |
quit |
- |
- |
route-policy Nd permit node 10 |
route-policy Nd permit node 10 |
创建路由策略Nd,并进入该路由策略视图 |
- |
if-match ipv6 address prefix-list Nd |
if-match ipv6 address prefix-list Nd |
匹配128位主机路由 |
- |
apply community 0:100 |
apply community 0:100 |
配置BGP路由信息的团体属性 |
- |
quit |
quit |
- |
- |
route-policy Nd deny node 5 |
route-policy Nd deny node 5 |
创建路由策略Nd ,并进入该路由策略视图 |
- |
if-match interface LoopBack0 |
if-match interface LoopBack0 |
匹配LoopBack0接口路由(实现LoopBack0接口路由不发布到Spine) |
- |
quit |
quit |
- |
- |
bgp 100 |
bgp 100 |
启动实例default,指定该BGP实例的本地AS号为100,并进入BGP实例视图 |
- |
bgp update-delay on-startup 120 |
bgp update-delay on-startup 120 |
配置设备重启且BGP进程恢复后,延迟发布路由更新消息,延迟120秒 |
配置目的为故障时有充分时间恢复 |
non-stop-routing |
non-stop-routing |
配置开启BGP NSR功能 |
- |
router-id 1.1.1.1 |
router-id 2.2.2.2 |
配置BGP路由器的Router ID |
地址为loopack0地址 |
timer keepalive 10 hold 30 |
timer keepalive 10 hold 30 |
配置BGP会话的存活时间间隔和保持时间,单位为秒 |
- |
group SPINE external |
group SPINE external |
创建EBGP对等体组SPINE |
- |
peer SPINE as-number 200 |
peer SPINE as-number 200 |
指定对等体组SPINE的AS号 |
- |
peer SPINE route-update-interval 0 |
peer SPINE route-update-interval 0 |
配置向对等体组SPINE发布同一路由的时间间隔为0秒 |
- |
peer 101.1.1.2 group SPINE |
peer 102.1.1.2 group SPINE |
向对等体组中添加指定的对等体,即Spine设备 |
- |
peer 103.1.1.2 group SPINE |
peer 104.1.1.2 group SPINE |
向对等体组中添加指定的对等体,即Spine设备 |
- |
group SPINEv6 external |
group SPINEv6 external |
创建EBGP对等体组SPINEv6 |
- |
peer SPINEv6 as-number 200 |
peer SPINEv6 as-number 200 |
指定对等体组SPINEv6的AS号 |
- |
peer SPINEv6 route-update-interval 0 |
peer SPINEv6 route-update-interval 0 |
配置向对等体组SPINEv6发布同一路由的时间间隔为0秒 |
- |
peer 101::2 group SPINEv6 |
peer 102::2 group SPINEv6 |
配置向对等体组SPINEv6中添加指定的对等体,即Spine设备 |
- |
peer 103::2 group SPINEv6 |
peer 104::2 group SPINEv6 |
配置向对等体组SPINEv6中添加指定的对等体,即Spine设备 |
- |
address-family ipv4 unicast |
address-family ipv4 unicast |
创建BGP IPv4单播地址族,并进入BGP IPv4单播地址族视图 |
- |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
- |
network 100.1.1.0 255.255.255.0 |
network 100.1.1.0 255.255.255.0 |
发布业务地址段 |
- |
network 110.1.1.0 255.255.255.0 |
network 110.1.1.0 255.255.255.0 |
发布装机地址段 |
- |
import-route direct route-policy Arp |
import-route direct route-policy Arp |
配置直连路由引入BGP,并应用路由策略Arp过滤路由 |
此配置只引入32位主机路由,但不引入Loopback接口的路由 |
peer SPINE enable |
peer SPINE enable |
允许本地路由器与对等体组SPINE交换路由信息 |
- |
peer SPINE advertise-community |
peer SPINE advertise-community |
向对等体组SPINE发布团体属性 |
此配置可以发布路由属性community |
peer SPINE advertise-ext-community |
peer SPINE advertise-ext-community |
向对等体组SPINE发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer SPINE soo 0:100 |
peer SPINE soo 0:100 |
为对等体组SPINE配置SoO属性 |
配置SoO为0:100的路由,不会再发向此对等体 |
quit |
quit |
- |
- |
address-family ipv6 unicast |
address-family ipv6 unicast |
创建BGP IPv6单播地址族,并进入BGP IPv6单播地址族视图 |
- |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
- |
network 100:: 56 |
network 100:: 56 |
发布业务地址段 |
- |
network 100:1::0 56 |
network 100:1::0 56 |
发布装机地址段 |
- |
import-route direct route-policy Nd |
import-route direct route-policy Nd |
配置直连路由引入BGP,并应用路由策略Nd过滤路由 |
此配置只引入128位主机路由,但不引入Loopback接口的路由 |
peer SPINEv6 enable |
peer SPINEv6 enable |
允许本地路由器与对等体组SPINEv6交换路由信息 |
- |
peer SPINEv6 advertise-community |
peer SPINEv6 advertise-community |
配置向对等体组SPINEv6发布团体属性 |
此配置可以发布路由属性community |
peer SPINEv6 advertise-ext-community |
peer SPINEv6 advertise-ext-community |
配置向对等体组SPINEv6发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer SPINEv6 soo 0:100 |
peer SPINEv6 soo 0:100 |
为对等体组SPINEv6配置SoO属性 |
配置SoO为0:100的路由,不会再发向此对等体 |
quit |
quit |
- |
- |
quit |
quit |
- |
- |
选择本方式时,Spine侧选择4.6.2 3. 配置BGP(方式二)配置。
Leaf 1 |
Leaf 2 |
命令说明 |
注意事项 |
ip prefix-list Arp index 10 permit 0.0.0.0 0 greater-equal 32 |
ip prefix-list Arp index 10 permit 0.0.0.0 0 greater-equal 32 |
配置一个IPv4地址前缀列表允许32位主机路由 |
- |
ipv6 prefix-list Nd index 10 permit :: 0 greater-equal 128 |
ipv6 prefix-list Nd index 10 permit :: 0 greater-equal 128 |
配置一个IPv6地址前缀列表允许128位主机路由 |
- |
route-policy Arp permit node 10 |
route-policy Arp permit node 10 |
创建路由策略Arp,并进入该路由策略视图 |
- |
if-match ip address prefix-list Arp |
if-match ip address prefix-list Arp |
匹配32位主机路由 |
- |
apply community 0:100 |
apply community 0:100 |
配置BGP路由信息的团体属性 |
- |
quit |
quit |
- |
- |
route-policy Arp deny node 5 |
route-policy Arp deny node 5 |
进入路由策略Arp节点编号5视图 |
- |
if-match interface LoopBack0 |
if-match interface LoopBack0 |
匹配LoopBack0接口路由(实现LoopBack0接口路由(如Leaf 1的1.1.1.1)不发布到Spine) |
- |
quit |
quit |
- |
- |
route-policy Nd permit node 10 |
route-policy Nd permit node 10 |
创建路由策略Nd,并进入该路由策略视图 |
- |
if-match ipv6 address prefix-list Nd |
if-match ipv6 address prefix-list Nd |
匹配128位主机路由 |
- |
apply community 0:100 |
apply community 0:100 |
配置BGP路由信息的团体属性 |
- |
quit |
quit |
- |
- |
route-policy Nd deny node 5 |
route-policy Nd deny node 5 |
进入路由策略Nd节点编号5视图 |
- |
if-match interface LoopBack0 |
if-match interface LoopBack0 |
匹配LoopBack0接口路由(实现LoopBack0接口路由不发布到Spine) |
- |
quit |
quit |
- |
- |
bgp 101 |
bgp 102 |
启动实例default,指定该BGP实例的本地AS号,并进入BGP实例视图 不同设备指定不同的AS号 |
- |
bgp update-delay on-startup 120 |
bgp update-delay on-startup 120 |
配置设备重启且BGP进程恢复后,延迟发布路由更新消息,延迟120秒 |
- |
non-stop-routing |
non-stop-routing |
配置开启BGP NSR功能 |
- |
router-id 1.1.1.1 |
router-id 2.2.2.2 |
配置BGP路由器的Router ID |
地址为loopack0接口地址 |
timer keepalive 10 hold 30 |
timer keepalive 10 hold 30 |
配置BGP会话的存活时间间隔和保持时间,单位为秒 |
- |
peer 101.1.1.2 as-number 201 |
peer 102.1.1.2 as-number 201 |
创建EBGP对等体,即Spine设备,并指定对等体的AS号 |
- |
peer 101.1.1.2 route-update-interval 0 |
peer 102.1.1.2 route-update-interval 0 |
配置向对等体组SPINE发布同一路由的时间间隔为0秒 |
- |
peer 103.1.1.2 as-number 202 |
peer 104.1.1.2 as-number 202 |
创建EBGP对等体,即Spine设备,并指定对等体的AS号 |
- |
peer 103.1.1.2 route-update-interval 0 |
peer 104.1.1.2 route-update-interval 0 |
配置向对等体组SPINE发布同一路由的时间间隔为0秒 |
- |
peer 101::2 as-number 201 |
peer 102::2 as-number 201 |
创建IPv6 EBGP对等体,即Spine设备,并指定对等体的AS号 |
- |
peer 101::2 route-update-interval 0 |
peer 102::2 route-update-interval 0 |
配置向对等体组SPINE发布同一路由的时间间隔为0秒 |
- |
peer 103::2 as-number 202 |
peer 104::2 as-number 202 |
创建IPv6 EBGP对等体,即Spine设备,并指定对等体的AS号 |
- |
peer 103::2 route-update-interval 0 |
peer 104::2 route-update-interval 0 |
配置向对等体组SPINE发布同一路由的时间间隔为0秒 |
- |
address-family ipv4 unicast |
address-family ipv4 unicast |
创建BGP IPv4单播地址族,并进入BGP IPv4单播地址族视图 |
- |
balance as-path-relax |
balance as-path-relax |
配置AS_PATH属性内容不同但长度相同的路由之间能够形成BGP负载分担 |
- |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
- |
network 100.1.1.0 255.255.255.0 |
network 100.1.1.0 255.255.255.0 |
发布业务地址段 |
- |
network 110.1.1.0 255.255.255.0 |
network 110.1.1.0 255.255.255.0 |
发布装机地址段 |
- |
import-route direct route-policy Arp |
import-route direct route-policy Arp |
配置直连路由引入BGP,并应用路由策略Arp过滤路由 |
此配置只引入32位主机路由,但不引入Loopback接口的路由 |
peer 101.1.1.2 enable |
peer 102.1.1.2 enable |
允许本地路由器与指定对等体(即Spine设备)交换路由信息 |
- |
peer 103.1.1.2 enable |
peer 104.1.1.2 enable |
允许本地路由器与指定对等体(即Spine设备)交换路由信息 |
- |
peer 101.1.1.2 advertise-ext-community |
peer 102.1.1.2 advertise-ext-community |
配置向对等体发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer 101.1.1.2 soo 0:100 |
peer 102.1.1.2 soo 0:100 |
为对等体配置SoO属性 |
此配置SoO为0:100的路由,不会再发向此对等体 |
peer 103.1.1.2 advertise-ext-community |
peer 104.1.1.2 advertise-ext-community |
配置向对等体发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer 103.1.1.2 soo 0:100 |
peer 104.1.1.2 soo 0:100 |
为对等体配置SoO属性 |
配置SoO为0:100的路由,不会再发向此对等体 |
quit |
quit |
- |
- |
address-family ipv6 unicast |
address-family ipv6 unicast |
创建BGP IPv6单播地址族,并进入BGP IPv6单播地址族视图 |
- |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
- |
network 100:: 56 |
network 100:: 56 |
发布业务地址段 |
- |
network 100:1::0 56 |
network 100:1::0 56 |
发布装机地址段 |
- |
balance as-path-relax |
balance as-path-relax |
配置AS_PATH属性内容不同但长度相同的路由之间能够形成BGP负载分担 |
- |
import-route direct route-policy Nd |
import-route direct route-policy Nd |
配置直连路由引入BGP,并应用路由策略Nd过滤路由 |
此配置只引入128位主机路由,但不引入Loopback接口的路由 |
peer 101::2 enable |
peer 102::2 enable |
允许本地路由器与指定IPv6对等体(即Spine设备)交换路由信息 |
- |
peer 103::2 enable |
peer 104::2 enable |
允许本地路由器与指定IPv6对等体(即Spine设备)交换路由信息 |
- |
peer 101::2 advertise-ext-community |
peer 102::2 advertise-ext-community |
配置向IPv6对等体发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer 101::2 soo 0:100 |
peer 102::2 soo 0:100 |
为IPv6对等体配置SoO属性 |
配置SoO为0:100的路由,不会再发向此对等体 |
peer 103::2 advertise-ext-community |
peer 104::2 advertise-ext-community |
配置向IPv6对等体发布扩展团体属性 |
此配置可以发布扩展团体属性SoO |
peer 103::2 soo 0:100 |
peer 104::2 soo 0:100 |
为IPv6对等体配置SoO属性 |
配置SoO为0:100的路由,不会再发向此对等体 |
quit |
quit |
- |
- |
Spine 1 |
Spine 2 |
命令说明 |
interface HundredGigE1/0/1 |
interface HundredGigE1/0/1 |
进入端口HundredGigE1/0/1视图 |
port link-mode route |
port link-mode route |
配置以太网接口的工作模式为三层模式 |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
ip address 101.1.1.2 255.255.255.0 |
ip address 103.1.1.2 255.255.255.0 |
配置接口的IP地址 |
ipv6 address 101::2/64 |
ipv6 address 103::1/64 |
配置接口的IPv6地址 |
quit |
quit |
- |
interface HundredGigE1/0/2 |
interface HundredGigE1/0/2 |
进入端口HundredGigE1/0/2视图 |
port link-mode route |
port link-mode route |
配置以太网接口的工作模式为三层模式 |
qos trust dscp |
qos trust dscp |
配置端口信任报文的DSCP优先级 |
ip address 102.1.1.2 255.255.255.0 |
ip address 104.1.1.1 255.255.255.0 |
配置接口的IP地址 |
ipv6 address 102::2/64 |
ipv6 address 104::1/64 |
配置接口的IPv6地址 |
quit |
quit |
- |
选择本方式时,Leaf侧选择4.6.1 7. 配置BGP(方式一)配置。
Spine 1 |
Spine 2 |
命令说明 |
ip community-list 100 permit 0:100 |
ip community-list 100 permit 0:100 |
配置一个团体属性列表100允许0:100团体属性的路由通过 |
route-policy AS_Replace permit node 10 |
route-policy AS_Replace permit node 10 |
创建路由策略AS_Replace,并进入该路由策略视图 |
apply as-path 200 replace |
apply as-path 200 replace |
替换BGP路由信息AS_PATH属性为200 |
quit |
quit |
- |
route-policy SPINEtoCORE deny node 10 |
route-policy SPINEtoCORE deny node 10 |
创建路由策略SPINEtoCORE,并进入该路由策略视图 |
if-match community 100 |
if-match community 100 |
匹配团体属性列表100 |
quit |
quit |
- |
route-policy SPINEtoCORE permit node 1000 |
route-policy SPINEtoCORE permit node 1000 |
进入路由策略SPINEtoCORE视图 |
quit |
quit |
- |
bgp 200 |
bgp 200 |
启动实例default,指定该BGP实例的本地AS号为200,并进入BGP实例视图 |
bgp update-delay on-startup 120 |
bgp update-delay on-startup 120 |
配置设备重启且BGP进程恢复后,延迟发布路由更新消息,延迟发布120秒 |
non-stop-routing |
non-stop-routing |
开启BGP NSR功能 |
router-id 3.3.3.3 |
router-id 4.4.4.4 |
配置BGP路由器的Router ID |
timer keepalive 10 hold 30 |
timer keepalive 10 hold 30 |
配置BGP会话的存活时间间隔和保持时间,单位为秒 |
group LEAF external |
group LEAF external |
创建EBGP对等体组LEAF |
peer LEAF as-number 100 |
peer LEAF as-number 100 |
指定对等体组LEAF的AS号 |
peer LEAF route-update-interval 0 |
peer LEAF route-update-interval 0 |
配置向对等体组LEAF发布同一路由的时间间隔为0秒 |
peer 101.1.1.1 group LEAF |
peer 103.1.1.1 group LEAF |
将Leaf 1添加到等体组LEAF |
peer 104.1.1.1 group LEAF |
peer 102.1.1.1 group LEAF |
将Leaf 2添加到等体组LEAF |
group CORE external |
group CORE external |
配置创建EBGP对等体组CORE |
peer CORE route-update-interval 0 |
peer CORE route-update-interval 0 |
配置向对等体组CORE发布同一路由的时间间隔为0秒 |
peer CORE as-number XXX |
peer CORE as-number XXX |
指定对等体组CORE的AS号 |
peer X.X.X.X group CORE |
peer X.X.X.X group CORE |
将Core设备添加到对等体组CORE中 |
group LEAFv6 external |
group LEAFv6 external |
配置创建EBGP对等体组LEAFv6 |
peer LEAFv6 as-number 100 |
peer LEAFv6 as-number 100 |
指定对等体组LEAFv6的AS号 |
peer 101::1 group LEAFv6 |
peer 103::1 group LEAFv6 |
将Leaf 1添加到对等体组LEAFv6中 |
peer 104::1 group LEAFv6 |
peer 102::1 group LEAFv6 |
将Leaf 2添加到对等体组LEAFv6中 |
peer LEAFv6 route-update-interval 0 |
peer LEAFv6 route-update-interval 0 |
配置向对等体组LEAFv6发布同一路由的时间间隔为0秒 |
group COREv6 external |
group COREv6 external |
创建EBGP对等体组COREv6 |
peer COREv6 as-number XXX |
peer COREv6 as-number XXX |
指定对等体组COREv6的AS号 |
peer COREv6 route-update-interval 0 |
peer COREv6 route-update-interval 0 |
配置向对等体组COREv6发布同一路由的时间间隔为0秒 |
peer X::X group COREv6 |
peer X::X group COREv6 |
将Core设备添加到对等体组COREv6中 |
address-family ipv4 unicast |
address-family ipv4 unicast |
配置创建BGP IPv4单播地址族,并进入BGP IPv4单播地址族视图 |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
preference 20 200 10 |
preference 20 200 10 |
配置EBGP路由的优先级为20,IBGP路由的优先级为200,本地产生的BGP路由的优先级为10 |
route-select delay 100 |
route-select delay 100 |
开启延迟路由优选功能,单位为秒 通过配置本命令,可以使BGP在路由发生变化时延迟一段时间后再进行重新选路,从而避免切换路径时造成的流量丢失 |
peer LEAF enable |
peer LEAF enable |
允许本地路由器与对等体组LEAF交换路由信息 |
peer LEAF route-policy AS_Replace import |
peer LEAF route-policy AS_Replace import |
对接收的LEAF对等体组的路由应用路由策略AS_Replace,对入方向路由进行AS_PATH属性替换 |
peer CORE enable |
peer CORE enable |
允许本地路由器与对等体组CORE交换路由信息 |
peer CORE route-policy SPINEtoCORE export |
peer CORE route-policy SPINEtoCORE export |
对发布CORE对等体组的路由应用路由策略SPINEtoCORE |
peer CORE advertise-ext-community |
peer CORE advertise-ext-community |
配置向对等体组CORE发布扩展团体属性 |
peer CORE soo 0:100 |
peer CORE soo 0:100 |
为对等体组CORE配置SoO属性 |
quit |
quit |
- |
address-family ipv6 unicast |
address-family ipv6 unicast |
创建BGP IPv6单播地址族,并进入BGP IPv6单播地址族视图 |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
preference 20 200 10 |
preference 20 200 10 |
配置EBGP路由的优先级为20,IBGP路由的优先级为200,本地产生的BGP路由的优先级为10 |
route-select delay 100 |
route-select delay 100 |
配置开启延迟路由优选功能,单位为秒 通过配置本命令,可以使BGP在路由发生变化时延迟一段时间后再进行重新选路,从而避免切换路径时造成的流量丢失 |
peer LEAFv6 enable |
peer LEAFv6 enable |
允许本地路由器与对等体组LEAFv6交换路由信息 |
peer LEAFv6 route-policy AS_Replace import |
peer LEAFv6 route-policy AS_Replace import |
对接收的LEAFv6对等体组的路由应用路由策略AS_Replace,对入方向路由进行AS_PATH属性替换 |
peer COREv6 enable |
peer COREv6 enable |
允许本地路由器与对等体组COREv6 交换路由信息 |
peer COREv6 route-policy SPINEtoCORE export |
peer COREv6 route-policy SPINEtoCORE export |
配置发布到对等体组COREv6 的路由应用路由策略SPINEtoCORE |
peer COREv6 advertise-ext-community |
peer COREv6 advertise-ext-community |
配置向对等体组COREv6发布扩展团体属性 |
peer COREv6 soo 0:100 |
peer COREv6 soo 0:100 |
为对等体组COREv6配置SoO属性 |
quit |
quit |
- |
选择本方式时,Leaf侧选择4.6.1 8. 配置BGP(方式二)配置。
Spine 1 |
Spine 2 |
命令说明 |
ip community-list 100 permit 0:100 |
ip community-list 100 permit 0:100 |
配置一个团体属性列表100允许0:100团体属性的路由通过 |
quit |
quit |
- |
route-policy SPINEtoCORE deny node 10 |
route-policy SPINEtoCORE deny node 10 |
创建路由策略SPINEtoCORE,并进入该路由策略视图 |
if-match community 100 |
if-match community 100 |
匹配团体属性列表100 |
quit |
quit |
- |
route-policy SPINEtoCORE permit node 1000 |
route-policy SPINEtoCORE permit node 1000 |
进入路由策略SPINEtoCORE视图 |
quit |
quit |
- |
bgp 201 |
bgp 202 |
启动实例default,指定该BGP实例的本地AS号,并进入BGP实例视图 不同设备指定不同的AS号 |
bgp update-delay on-startup 120 |
bgp update-delay on-startup 120 |
配置设备重启且BGP进程恢复后,延迟发布路由更新消息,延迟发布120秒 |
non-stop-routing |
non-stop-routing |
配置开启BGP NSR功能 |
router-id 3.3.3.3 |
router-id 4.4.4.4 |
配置BGP路由器的Router ID |
timer keepalive 10 hold 30 |
timer keepalive 10 hold 30 |
配置BGP会话的存活时间间隔和保持时间,单位为秒 |
peer 101.1.1.1 as-number 101 |
peer 101.1.1.1 as-number 103 |
创建BGP对等体101.1.1.1(即Leaf 1),并指定对等体的AS号 |
peer 101.1.1.1 route-update-interval 0 |
peer 101.1.1.1 route-update-interval 0 |
配置向对等体发布同一路由的时间间隔为0秒 |
peer 102.1.1.1 as-number 102 |
peer 102.1.1.1 as-number 104 |
创建BGP对等体102.1.1.1(即Leaf 2),并指定对等体的AS号 |
peer 102.1.1.1 route-update-interval 0 |
peer 102.1.1.1 route-update-interval 0 |
配置向对等体发布同一路由的时间间隔为0秒 |
peer X.X.X.X as-number XXX |
peer X.X.X.X as-number XXX |
配置创建BGP对等体,即与Core设备建立对等体,并指定对等体的AS号 |
peer X.X.X.X route-update-interval 0 |
peer X.X.X.X route-update-interval 0 |
配置向CORE对等体发布同一路由的时间间隔为0秒 |
peer 101::1 as-number 101 |
peer 101::1 as-number 103 |
创建IPv6 BGP对等体101::1(即Leaf 1),并指定对等体的AS号 |
peer 101::1 route-update-interval 0 |
peer 101::1 route-update-interval 0 |
配置向对等体发布同一路由的时间间隔为0秒 |
peer 102::1 as-number 102 |
peer 102::1 as-number 104 |
创建IPv6 BGP对等体102::1(即Leaf 2),并指定对等体的AS号 |
peer 102::1 route-update-interval 0 |
peer 102::1 route-update-interval 0 |
配置向对等体发布同一路由的时间间隔为0秒 |
peer X::X as-number XXX |
peer X::X as-number XXX |
创建IPv6 BGP对等体,即与Core设备建立对等体,并指定对等体的AS号 |
peer X::X route-update-interval 0 |
peer X::X route-update-interval 0 |
配置向Core对等体发布同一路由的时间间隔为0秒 |
address-family ipv4 unicast |
address-family ipv4 unicast |
配置创建BGP IPv4单播地址族,并进入BGP IPv4单播地址族视图 |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
balance as-path-relax |
balance as-path-relax |
配置AS_PATH属性内容不同但长度相同的路由之间能够形成BGP负载分担 |
preference 20 200 10 |
preference 20 200 10 |
配置EBGP路由的优先级为20,IBGP路由的优先级为200,本地产生的BGP路由的优先级为10 |
route-select delay 100 |
route-select delay 100 |
配置开启延迟路由优选功能,单位为秒 通过配置本命令,可以使BGP在路由发生变化时延迟一段时间后再进行重新选路,从而避免切换路径时造成的流量丢失 |
peer 101.1.1.1 enable |
peer 103.1.1.1 enable |
允许本地路由器与对等体Leaf 1交换路由信息 |
peer 102.1.1.1 enable |
peer 104.1.1.1 enable |
允许本地路由器与对等体Leaf 2交换路由信息 |
peer X.X.X.X enable |
peer X.X.X.X enable |
允许本地路由器与Core设备对等体交换路由信息 |
peer X.X.X.X route-policy SPINEtoCORE export |
peer X.X.X.X route-policy SPINEtoCORE export |
对发布CORE对等体组的路由应用路由策略SPINEtoCORE |
peer X.X.X.X advertise-ext-community |
peer X.X.X.X advertise-ext-community |
配置向Core对等体发布扩展团体属性 |
peer X.X.X.X soo 0:100 |
peer X.X.X.X soo 0:100 |
为Core对等体配置SoO属性 |
quit |
quit |
- |
address-family ipv6 unicast |
address-family ipv6 unicast |
配置创建BGP IPv6单播地址族,并进入BGP IPv6单播地址族视图 |
balance 32 |
balance 32 |
配置BGP负载分担的路由条数 |
balance as-path-relax |
balance as-path-relax |
配置AS_PATH属性内容不同但长度相同的路由之间能够形成BGP负载分担 |
preference 20 200 10 |
preference 20 200 10 |
配置EBGP路由的优先级为20,IBGP路由的优先级为200,本地产生的BGP路由的优先级为10 |
route-select delay 100 |
route-select delay 100 |
配置开启延迟路由优选功能,单位为秒 通过配置本命令,可以使BGP在路由发生变化时延迟一段时间后再进行重新选路,从而避免切换路径时造成的流量丢失 |
peer 101::1 enable |
peer 103::1 enable |
允许本地路由器与对等体Leaf 1交换路由信息 |
peer 102::1 enable |
peer 104::1 enable |
允许本地路由器与对等体Leaf 2交换路由信息 |
peer X.X.X.X enable |
peer X.X.X.X enable |
允许本地路由器与Core对等体交换路由信息 |
peer X::X route-policy SPINEtoCORE export |
peer X::X route-policy SPINEtoCORE export |
对发布CORE对等体组的路由应用路由策略SPINEtoCORE |
peer X.X.X.X advertise-ext-community |
peer X.X.X.X advertise-ext-community |
配置向Core对等体发布扩展团体属性 |
peer X.X.X.X soo 0:100 |
peer X.X.X.X soo 0:100 |
为Core对等体配置SoO属性 |
项目 |
说明 |
系统版本 |
Centos 7.4版本 |
系统内核 |
4.14.50版本 |
网卡驱动 |
mellanox |
修改内核文件bond_main.c 文件,使服务器支持ARP和ND双发,操作方式如下。
# 显示Leaf 1聚合组详细信息,确保S-MLAG聚合成员端口处于选中状态。
[Leaf1] display link-aggregation verbose Bridge-Aggregation
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Bridge-Aggregation1
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0xc8, 0000-5e00-0101
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/1(R) S 32768 16385 50001 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1 32768 1 1 0x8000, 1451-7eae-dafe {ACDEF}
Aggregate Interface: Bridge-Aggregation2
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0xc8, 0000-5e00-0101
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/2(R) S 32768 16386 50002 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/2 32768 1 1 0x8000, 5cc9-995f-1122 {ACDEF}
# 显示Leaf 2聚合组详细信息,确保S-MLAG聚合成员端口处于选中状态。
[Leaf2] display link-aggregation verbose Bridge-Aggregation
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Bridge-Aggregation1
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0xc8, 0000-5e00-0101
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/1(R) S 32768 32769 50001 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1 32768 2 1 0x8000, 1451-7eae-dafe {ACDEF}
Aggregate Interface: Bridge-Aggregation2
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0xc8, 0000-5e00-0101
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/2(R) S 32768 32770 50002 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/2 32768 2 1 0x8000, 5cc9-995f-1122 {ACDEF}
# 查看Leaf 1 S-MLAG聚合接口学习的ARP信息,确认学习到接口连接的主机的ARP信息。
[Leaf1] display arp interface Bridge-Aggregation 1
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
100.1.1.22 0010-9400-0002 100 BAGG1 83 D
[Leaf1] display arp interface Bridge-Aggregation 2
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
100.1.1.33 0010-9400-0003 100 BAGG2 80 D
# 查看Leaf 1 S-MLAG聚合接口学习的ND信息,确认学习到接口连接的主机的ND信息。
[Leaf 1] display ipv6 neighbors interface Bridge-Aggregation 1
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
100::22 0010-9400-0002 100 BAGG1 STALE D 37
[Leaf 1]display ipv6 neighbors interface Bridge-Aggregation 2
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
100::33 0010-9400-0003 100 BAGG2 STALE D 40
# 查看Leaf 2 S-MLAG聚合接口学习的ARP信息,与Leaf 1相同。
[Leaf2] display arp interface Bridge-Aggregation 1
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
100.1.1.22 0010-9400-0002 100 BAGG1 88 D
[Leaf2]display arp interface Bridge-Aggregation 2
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
100.1.1.33 0010-9400-0003 100 BAGG2 89 D
[Leaf2]
# 查看Leaf 2 S-MLAG聚合接口学习的ND信息,与Leaf 1相同。
[Leaf2] display ipv6 neighbors interface Bridge-Aggregation 1
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
100::22 0010-9400-0002 100 BAGG1 STALE D 37
[Leaf2]display ipv6 neighbors interface Bridge-Aggregation 2
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
100::33 0010-9400-0003 100 BAGG2 STALE D 40
# 查看Leaf 1 IPv4路由信息,可以看到主机ARP生成的主机路由。
[Leaf1] display ip routing-table | include 100.1.1.
100.1.1.0/24 Direct 0 0 100.1.1.1 Vlan100
100.1.1.0/32 Direct 0 0 100.1.1.1 Vlan100
100.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
100.1.1.22/32 Direct 0 0 100.1.1.22 Vlan100
100.1.1.33/32 Direct 0 0 100.1.1.33 Vlan100
100.1.1.255/32 Direct 0 0 100.1.1.1 Vlan100
# 查看Leaf 1 IPv6路由信息,可以看到ND生成的主机路由。
<Leaf1> display ipv6 routing-table 100::22
Summary count : 2
Destination: 100::/56 Protocol : Direct
NextHop : :: Preference: 0
Interface : Vlan100 Cost : 0
Destination: 100::22/128 Protocol : Direct
NextHop : 100::22 Preference: 0
Interface : Vlan100 Cost : 0
<Leaf1> display ipv6 routing-table 100::33
Summary count : 2
Destination: 100::/56 Protocol : Direct
NextHop : :: Preference: 0
Interface : Vlan100 Cost : 0
Destination: 100::33/128 Protocol : Direct
NextHop : 100::33 Preference: 0
Interface : Vlan100 Cost : 0
# 查看Leaf 2 IPv4路由信息,可以看到ARP生成的主机路由。
[Leaf2] display ip routing-table | include 100.1.1.
100.1.1.0/24 Direct 0 0 100.1.1.1 Vlan100
100.1.1.0/32 Direct 0 0 100.1.1.1 Vlan100
100.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
100.1.1.22/32 Direct 0 0 100.1.1.22 Vlan100
100.1.1.33/32 Direct 0 0 100.1.1.33 Vlan100
100.1.1.255/32 Direct 0 0 100.1.1.1 Vlan100
# 查看Leaf 2 IPv6路由信息,可以看到ND生成的主机路由。
<Leaf2> display ipv6 routing-table 100::22
Summary count : 2
Destination: 100::/56 Protocol : Direct
NextHop : :: Preference: 0
Interface : Vlan100 Cost : 0
Destination: 100::22/128 Protocol : Direct
NextHop : 100::22 Preference: 0
Interface : Vlan100 Cost : 0
<Leaf2> display ipv6 routing-table 100::33
Summary count : 2
Destination: 100::/56 Protocol : Direct
NextHop : :: Preference: 0
Interface : Vlan100 Cost : 0
Destination: 100::33/128 Protocol : Direct
NextHop : 100::33 Preference: 0
Interface : Vlan100 Cost : 0
# 显示Leaf 1 IPv4 EBGP状态信息,Leaf 1和Spine建立EBGP成功。
<Leaf1> display bgp peer ipv4
BGP local router ID: 1.1.1.1
Local AS number: 100
Total number of peers: 2 Peers in established state: 2
* - Dynamically created peer
^ - Peer created through link-local address
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
101.1.1.2 200 38189 40535 0 5 0091h09m Established
103.1.1.2 200 42648 36483 0 5 0091h09m Established
# 显示Leaf 1 IPv6 EBGP状态信息,Leaf 1和Spine建立EBGP成功。
<Leaf1> display bgp peer ipv6
BGP local router ID: 1.1.1.1
Local AS number: 100
Total number of peers: 2 Peers in established state: 2
* - Dynamically created peer
^ - Peer created through link-local address
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
101::2 200 35691 43195 0 5 0091h09m Established
103::2 200 43779 34926 0 5 0091h09m Established
# 显示Leaf 2 IPv4 EBGP状态信息,Leaf 2和Spine建立EBGP成功。
<Leaf2> display bgp peer ipv4
BGP local router ID: 2.2.2.2
Local AS number: 100
Total number of peers: 2 Peers in established state: 2
* - Dynamically created peer
^ - Peer created through link-local address
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
102.1.1.2 200 34024 39283 0 7 0091h35m Established
104.1.1.2 200 43762 50955 0 7 0111h45m Established
# 显示Leaf 2 IPv6 EBGP状态信息,Leaf 2和Spine建立EBGP成功。
<Leaf2> display bgp peer ipv6
BGP local router ID: 2.2.2.2
Local AS number: 100
Total number of peers: 2 Peers in established state: 2
* - Dynamically created peer
^ - Peer created through link-local address
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
102::2 200 52519 41574 0 7 0110h49m Established
104::2 200 41502 50309 0 7 0111h45m Established
# 查看Leaf 1 ARP生成主机路由引入BGP的路由信息,两条IPv4路由属性Community均携带了0:100。
<Leaf1> display bgp routing-table ipv4 100.1.1.22
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100.1.1.22/32:
Imported route.
Original nexthop: 100.1.1.22
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
<Leaf1> display bgp routing-table ipv4 100.1.1.33
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100.1.1.33/32:
Imported route.
Original nexthop: 100.1.1.33
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# 查看Leaf 1 ND生成主机路由引入BGP的路由信息,IPv6路由属性Community携带了0:100。
[Leaf1] display bgp routing-table ipv6 100::22 128
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100::22/128:
Imported route.
Original nexthop: 100::22
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
[Leaf1] display bgp routing-table ipv6 100::33 128
BGP local router ID: 1.1.1.1
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100::33/128:
Imported route.
Original nexthop: 100::33
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# 查看Leaf 2 ARP生成主机路由引入BGP的路由信息,两条IPv4路由属性Community均携带了0:100。
<Leaf2> display bgp routing-table ipv4 100.1.1.22
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100.1.1.22/32:
Imported route.
Original nexthop: 100.1.1.22
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
<Leaf2> display bgp routing-table ipv4 100.1.1.33
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100.1.1.33/32:
Imported route.
Original nexthop: 100.1.1.33
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# 查看Leaf 2 ND生成主机路由引入BGP的路由信息,IPv6路由属性Community携带了0:100。
[Leaf2] display bgp routing-table ipv6 100::22 128
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100::22/128:
Imported route.
Original nexthop: 100::22
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
[Leaf2] display bgp routing-table ipv6 100::33 128
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100::33/128:
Imported route.
Original nexthop: 100::33
OutLabel : NULL
Community : <0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : (null)
Origin : incomplete
Attribute value : MED 0, pref-val 32768
State : valid, local, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
# 查看Spine 1 IPv4路由,从Leaf发布来的路由形成ECMP。
[Spine1] display ip routing-table protocol bgp
Summary count : 4
BGP Routing table status : <Active>
Summary count : 4
Destination/Mask Proto Pre Cost NextHop Interface
100.1.1.22/32 BGP 255 0 101.1.1.1 HGE1/0/22
102.1.1.1 HGE1/0/21
100.1.1.33/32 BGP 255 0 101.1.1.1 HGE1/0/22
102.1.1.1 HGE1/0/21
BGP Routing table status : <Inactive>
Summary count : 0
# 查看Spine 1 IPv6路由,从Leaf发布来的路由形成ECMP。
[Spine1] display ipv6 routing-table protocol bgp4+
Summary count : 4
BGP4+ Routing table status : <Active>
Summary count : 4
Destination: 100::22/128 Protocol : BGP4+
NextHop : 101::1 Preference: 255
Interface : HGE1/0/22 Cost : 0
Destination: 100::22/128 Protocol : BGP4+
NextHop : 102::1 Preference: 255
Interface : HGE1/0/21 Cost : 0
Destination: 100::33/128 Protocol : BGP4+
NextHop : 101::1 Preference: 255
Interface : HGE1/0/22 Cost : 0
Destination: 100::33/128 Protocol : BGP4+
NextHop : 102::1 Preference: 255
Interface : HGE1/0/21 Cost : 0
BGP4+ Routing table status : <Inactive>
Summary count : 0
# 查看Spine 2 IPv4路由,从Leaf发布来的路由形成ECMP。
[Spine2] display ip routing-table protocol bgp
Summary count : 4
BGP Routing table status : <Active>
Summary count : 4
Destination/Mask Proto Pre Cost NextHop Interface
100.1.1.22/32 BGP 255 0 103.1.1.1 HGE1/0/22
104.1.1.1 HGE1/0/21
100.1.1.33/32 BGP 255 0 103.1.1.1 HGE1/0/22
104.1.1.1 HGE1/0/21
BGP Routing table status : <Inactive>
Summary count : 0
# 查看Spine 2 IPv6路由,从Leaf发布来的路由形成ECMP。
[Spine2] display ipv6 routing-table protocol bgp4+
Summary count : 4
BGP4+ Routing table status : <Active>
Summary count : 4
Destination: 100::22/128 Protocol : BGP4+
NextHop : 103::1 Preference: 255
Interface : HGE1/0/22 Cost : 0
Destination: 100::22/128 Protocol : BGP4+
NextHop : 104::1 Preference: 255
Interface : HGE1/0/21 Cost : 0
Destination: 100::33/128 Protocol : BGP4+
NextHop : 103::1 Preference: 255
Interface : HGE1/0/22 Cost : 0
Destination: 100::33/128 Protocol : BGP4+
NextHop : 104::1 Preference: 255
Interface : HGE1/0/21 Cost : 0
BGP4+ Routing table status : <Inactive>
Summary count : 0
# 查看Spine 1 BGP路由信息,路由AS_PATH修改为本地AS。
[Spine1] display bgp routing-table ipv4
Total number of routes: 4
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 100.1.1.22/32 101.1.1.1 0 0 200?
* >e 102.1.1.1 0 0 200?
* >e 100.1.1.33/32 101.1.1.1 0 0 200?
* >e 102.1.1.1 0 0 200?
[Spine1] display bgp routing-table ipv6
Total number of routes: 4
BGP local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 100::22 PrefixLen : 128
NextHop : 101::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::22 PrefixLen : 128
NextHop : 102::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::33 PrefixLen : 128
NextHop : 101::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::33 PrefixLen : 128
NextHop : 102::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
# 查看Spine 2 BGP路由信息,路由AS_PATH修改为本地AS。
[Spine2] display bgp routing-table ipv4
Total number of routes: 4
BGP local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 100.1.1.22/32 103.1.1.1 0 0 200?
* >e 104.1.1.1 0 0 200?
* >e 100.1.1.33/32 103.1.1.1 0 0 200?
* >e 104.1.1.1 0 0 200?
[Spine2] display bgp routing-table ipv6
Total number of routes: 4
BGP local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* >e Network : 100::22 PrefixLen : 128
NextHop : 103::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::22 PrefixLen : 128
NextHop : 104::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::33 PrefixLen : 128
NextHop : 103::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
* >e Network : 100::33 PrefixLen : 128
NextHop : 104::1 LocPrf :
PrefVal : 0 OutLabel : NULL
MED : 0
Path/Ogn: 200?
# 验证SoO属性配置,为了较为清晰的观察路由传递,需要shutdown Leaf 2连接Server 1的端口和Leaf 1连接Spine 2的端口。此时Server 1主机路由发布路径Leaf 1->Spine 1->Leaf 2->Spine 2,Leaf 2收到Spine1发布的Server 1的主机路由,检查携带SoO属性相同,Leaf 2不向Spine 2发布Server 1的主机路由。
[Leaf2] display bgp routing-table ipv4 100.1.1.22 32
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100.1.1.22/32:
From : 102.1.1.2 (3.3.3.3)
Rely nexthop : 102.1.1.2
Original nexthop: 102.1.1.2
OutLabel : NULL
Ext-Community : <SOO: 0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : 200 200
Origin : incomplete
Attribute value : pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
上述显示信息表示,Leaf 2收到的Server 1的IPv4主机路由,携带SoO属性。
[Leaf2] display bgp routing-table ipv6 100::22 128
BGP local router ID: 2.2.2.2
Local AS number: 100
Paths: 1 available, 1 best
BGP routing table information of 100::22/128:
Original nexthop: 100::22
OutLabel : NULL
Ext-Community : <SOO: 0:100>
RxPathID : 0x0
TxPathID : 0x0
AS-path : 200 200
Origin : incomplete
Attribute value : pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
Tunnel policy : NULL
Rely tunnel IDs : N/A
上述显示信息表示,Leaf 2收到的Server 1的IPv6主机路由,携带SoO属性。
[Leaf2] display bgp routing-table ipv4 peer 102.1.1.2 advertised-routes
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf Path/Ogn
* > 100.1.1.33/32 100.1.1.33 0 100?
上述信息表示,Leaf 2未向Spine 2发布SoO属性为0:100的Server 1的IPv4主机路由。
[Leaf2] display bgp routing-table ipv6 peer 102::2 advertised-routes
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history
s - suppressed, S - stale, i - internal, e - external
a - additional-path
Origin: i - IGP, e - EGP, ? - incomplete
* > Network : 100::33 PrefixLen : 128
NextHop : 100::33 LocPrf :
MED : 0 OutLabel : NULL
上述信息表示,Leaf 2未向Spine 2发布SoO属性为0:100的Server 1的IPv6主机路由。
# 显示Leaf 1全局入方向QoS策略,确认防止不同Leaf ARP互相泄露的策略下发成功。
[Leaf1] display qos policy global inbound
Direction: Inbound
Policy: hw-forwarding
Classifier: Arp-Forwarding
Operator: AND
Rule(s) :
If-match source-mac 0000-5e00-0101
If-match acl mac 4000
Behavior: Forwarding
Filter enable: Permit
Classifier: Arp-No-Forwarding
Operator: AND
Rule(s) :
If-match acl mac 4000
Behavior: No-Forwarding
Filter enable: Deny
# 显示Leaf 2全局入方向QoS策略,确认防止不同Leaf ARP互相泄露的策略下发成功。
[Leaf2] display qos policy global inbound
Direction: Inbound
Policy: hw-forwarding
Classifier: Arp-Forwarding
Operator: AND
Rule(s) :
If-match source-mac 0000-5e00-0101
If-match acl mac 4000
Behavior: Forwarding
Filter enable: Permit
Classifier: Arp-No-Forwarding
Operator: AND
Rule(s) :
If-match acl mac 4000
Behavior: No-Forwarding
Filter enable: Deny
# 显示Server 1的ARP信息,确认Server 1没有学习到Server 2的MAC。
[root@SER1 ~]# arp -n
Address HWtype HWaddress Flags Mask Iface
100.1.1.1 ether 00:00:5e:00:01:01 C eth1
100.1.1.1 ether 00:00:5e:00:01:01 C eth2
[root@SER1 ~]# ip -6 nei
100::1 dev eth1 lladdr 00:00:5e:00:01:01 router STALE
100::1 dev eth2 lladdr 00:00:5e:00:01:01 router STALE
# 显示Server 2的ARP信息,确认Server 2没有学习到Server 1的MAC。
[root@SER2 ~]# arp -n
Address HWtype HWaddress Flags Mask Iface
100.1.1.1 ether 00:00:5e:00:01:01 C eth1
100.1.1.1 ether 00:00:5e:00:01:01 C eth2
[root@@SER2 ~]# ip -6 nei
100::1 dev eth1 lladdr 00:00:5e:00:01:01 router STALE
100::1 dev eth2 lladdr 00:00:5e:00:01:01 router STALE
# 显示Leaf 1上Monitor Link组的信息,确认Monitor Link组状态为UP。
[Leaf1] display monitor-link group 1
Monitor link group 1 information:
Group status : UP
Downlink up-delay: 120(s)
Last-up-time : 22:27:50 2001/01/28
Last-down-time : -
Up-port-threshold: 1
Member Role Status
--------------------------------------------------------
HGE1/0/25 UPLINK UP
HGE1/0/26 UPLINK UP
WGE1/0/1 DOWNLINK UP
WGE1/0/2 DOWNLINK UP
# 显示Leaf 2上Monitor Link组的信息,确认Monitor Link组状态为UP。
[Leaf2] display monitor-link group 1
Monitor link group 1 information:
Group status : UP
Downlink up-delay: 120(s)
Last-up-time : 22:27:50 2001/01/28
Last-down-time : -
Up-port-threshold: 1
Member Role Status
--------------------------------------------------------
HGE1/0/25 UPLINK UP
HGE1/0/26 UPLINK UP
WGE1/0/1 DOWNLINK UP
WGE1/0/2 DOWNLINK UP
当设备出现故障定位或者版本升级时需要对设备进行隔离操作,以避免或减少业务中断时间。
隔离Leaf设备需要先对下行端口进行隔离操作,再对上行端口进行隔离操作,确保所有流量不再经过隔离设备。
完成故障排除或者版本升级后,先进行上行端口的隔离恢复,确保BGP路由学习完成后,再进行下行端口的隔离恢复。
# shutdown所有S-MLAG链路端口。
[Leaf1] interface range twenty-fivegige 1/0/1 twenty-fivegige 1/0/2
[Leaf1-if-range] shutdown
[Leaf1-if-range] quit
# shutdown所有上行链路端口。
[Leaf1] interface range hundredgige 1/0/25 hundredgige 1/0/26
[Leaf1-if-range] shutdown
[Leaf1-if-range] quit
# undo shutdown所有上行链路端口,恢复上行链路。
[Leaf1] interface range hundredgige 1/0/25 hundredgige 1/0/26
[Leaf1-if-range] undo shutdown
[Leaf1-if-range] quit
# undo shutdown所有S-MLAG链路端口恢复下行链路。
[Leaf1] interface range twenty-fivegige 1/0/1 twenty-fivegige 1/0/2
[Leaf1-if-range] undo shutdown
[Leaf1-if-range] quit
Spine设备隔离需要通过配置路由策略引导流量转发实现。首先配置export方向路由策略,不对外发送路由,确保所有流量不经过隔离设备;再配置import方向路由策略,不接收任何路由;最后配置peer ignore禁止与上行设备和Leaf设备建立对等体,从而将设备彻底隔离出来。
完成故障排除或者版本升级后,隔离恢复需要先删除peer ignore与上行设备和Leaf设备恢复EBGP邻居关系;再删除import方向路由策略,让设备学习路由;最后删除export方向路由策略,使流量切换到设备上。
# 配置路由策略deny,禁止所有路由信息通过。
[Spine1] route-policy deny deny node 0
[Spine1-route-policy-deny-0]
[Spine1-route-policy-deny-0] quit
# 向CORE/COREv6对等体发布路由时应用路由策略deny。
[Spine1] bgp 200
[Spine1-bgp-default] address-family ipv4 unicast
[Spine1-bgp-default-ipv4] peer CORE route-policy deny export
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] peer COREv6 route-policy deny export
[Spine1-bgp-default-ipv6] quit
# 向LEAF/LEAFv6对等体发布路由时应用路由策略deny。
[Spine1-bgp-default-ipv4] peer LEAF route-policy deny export
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] peer LEAFv6 route-policy deny export
[Spine1-bgp-default-ipv6] quit
# 从CORE/COREv6对等体接收路由时应用路由策略deny。
[Spine1-bgp-default-ipv4] peer CORE route-policy deny import
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] peer COREv6 route-policy deny import
[Spine1-bgp-default-ipv6] quit
# 从LEAF/LEAFv6对等体接收路由时应用路由策略deny。
[Spine1-bgp-default-ipv4] peer LEAF route-policy deny import
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] peer LEAFv6 route-policy deny import
[Spine1-bgp-default-ipv6] quit
# 配置peer ignore禁止Spine与上行设备和Leaf设备建立对等体。
[Spine1-bgp-default] peer CORE ignore
[Spine1-bgp-default] peer COREv6 ignore
[Spine1-bgp-default] peer LEAF ignore
[Spine1-bgp-default] peer LEAFv6 ignore
# shutdown所有接口。
具体配置略。
# undo shutdown所有接口。
具体配置略。
# 删除peer ignore,允许Spine与上行设备和Leaf设备建立对等体。
[Spine1] bgp 200
[Spine1-bgp-default] undo peer CORE ignore
[Spine1-bgp-default] undo peer CORE ignore
[Spine1-bgp-default] undo peer COREv6 ignore
[Spine1-bgp-default] undo peer LEAF ignore
[Spine1-bgp-default] undo peer LEAFv6 ignore
# 恢复Leaf原有import方向策略(在隔离步骤中,AS_Replace策略配置被覆盖)。
[Spine1-bgp-default] address-family ipv4 unicast
[Spine1-bgp-default-ipv4] peer LEAF route-policy AS_Replace import
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] peer LEAFv6 route-policy AS_Replace import
[Spine1-bgp-default-ipv6] quit
# 删除从CORE/COREv6对等体接收路由时应用的路由策略deny。
[Spine1-bgp-default] address-family ipv4 unicast
[Spine1-bgp-default-ipv4] undo peer CORE route-policy deny import
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] undo peer COREv6 route-policy deny import
[Spine1-bgp-default-ipv6] quit
# 删除向LEAF/LEAFv6对等体发布路由时应用的路由策略deny。
[Spine1-bgp-default] address-family ipv4 unicast
[Spine1-bgp-default-ipv4] undo peer LEAF route-policy deny export
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] undo peer LEAFv6 route-policy deny export
[Spine1-bgp-default-ipv6] quit
# 删除向CORE/COREv6对等体发布路由时应用的路由策略deny。
[Spine1-bgp-default] address-family ipv4 unicast
[Spine1-bgp-default-ipv4] undo peer CORE route-policy deny export
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] undo peer COREv6 route-policy deny export
[Spine1-bgp-default-ipv6] quit
[Spine1-bgp-default] quit
# 删除从LEAF/LEAFv6对等体接收路由时应用路由策略deny。
[Spine1-bgp-default-ipv4] undo peer LEAF route-policy deny import
[Spine1-bgp-default-ipv4] quit
[Spine1-bgp-default] address-family ipv6 unicast
[Spine1-bgp-default-ipv6] undo peer LEAFv6 route-policy deny import
[Spine1-bgp-default-ipv6] quit
# 删除路由策略deny。
[Spine1] undo route-policy deny deny node 0
故障示意如图4-2所示,在S6850设备R6635版本测试收敛时间如表4-1所示。
设备 |
故障类型 |
流量中断时间 |
Leaf |
成员链路1单点故障 |
73ms |
成员链路1单点故障恢复 |
5ms |
|
上行ECMP链路3单点故障 |
50ms |
|
上行ECMP链路3单点故障恢复 |
3ms |
|
Leaf 1设备故障 |
78ms |
|
Leaf 1故障恢复 |
6ms |
|
隔离Leaf 1(Shutdown所有连接服务器的接口) |
72ms |
|
Leaf 1隔离恢复 |
7ms |
|
Spine |
Spine 1故障 |
124ms |
Spine 1故障恢复 |
0ms |
|
隔离 |
0ms |
|
隔离恢复 |
0ms |