Dell Networking SONiC 如何在 MCLAG Keepalive 链接(源 ip 和对等 ip)的 VRF 中使用 IP 地址

Summary: 本文介绍如何在 Dell Networking SONiC 的 MCLAG Keepalive 链路(源 ip 和对等 ip)中使用 VRF 中的 IP 地址。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

前提条件
 

我们使用标准接口命名来演示概念。请参阅文章  Dell Networking S 系列:基本接口配置 - SONIC 4.0,了解有关接口命名的更多信息。

 


MCLAG 对等链路同步对等状态,用于在两个对等体之间传输心跳。为此,我们可以使用分配给 VLAN、接口、管理接口的 IP 地址。  

从 Dell SONiC 4.2 版本开始,我们可以在非默认 VRF 中使用 IP 地址。
 
提醒: 
 - 在配置为 Keepalive 链路时,确保 source-ip 可以访问 Peer-IP。使用 ping 命令验证连接。
 - 对于默认 VRF,请勿使用命令 session-vrf。
- 我们可以使用在 Vlan 或第 3 层接口中分配的 IP 地址进行 Keepalive 链路
- 使用 Vlan 作为 Keepalive 链路时,请确保在配置中使用mclag-separate-ip
    有关更多详细信息,请参阅何时
应在 Dell Networking Enterprise SONiC OS MF-CLI 中使用“mclag-separate-ip”。

示例配置
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Vlan 10
DELLSONiC(config-if-Vlan10)# ip address 192.168.1.2/24
DELLSONiC(config-if-Vlan10)# mclag-separate-ip

 


配置语法
 
配置 说明
admin@ DELLSONiC:~$ sonic-cli
登录 Dell MF-CLI
DELLSONiC# configure
输入配置模式。
DELLSONiC(config)# mclag domain <Domain ID>
定义 MCLAG 域 ID。1-4095
DELLSONiC(config-mclag-domain-1)# peer-ip <IP address>
配置对等 IP 以保持连接
DELLSONiC(config-mclag-domain-1)# source-ip <IP address>
配置源 IP 以实现keepalive
DELLSONiC(config-mclag-domain-1)# session-vrf <VRF-NAME>
(可选)对于默认 VRF,不需要此配置。
DELLSONiC(config-mclag-domain-1)# session-vrf mgmt
(可选)如果我们使用的是 mgmt,请使用此命令。VRF的。



配置

示例目标:让我们在 MCLAG 对等交换机 2 中配置 Keepalive 链路。带外管理端口在管理 VRF 中配置为 IP 192.168.1.2。对等 IP 为 192.168.1.1。

image.png

考虑到管理端口(带外)位于 vrf 管理中,我们将其用作 Keepalive 链接。
 
DELLSONiC# show ip vrf
VRF-NAME            INTERFACES
----------------------------------------------------------------
default
mgmt                Management0


让我们在 mclag 域中将 session-vrf 分配为 mgmt
 
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# mclag domain 1
DELLSONiC(config-mclag-domain-1)# source-ip 192.168.1.2
DELLSONiC(config-mclag-domain-1)# peer-ip 192.168.1.1
DELLSONiC(config-mclag-domain-1)# session-vrf mgmt
DELLSONiC(config-mclag-domain-1)# exit
DELLSONiC(config)# exit
DELLSONiC#


让我们执行 ping 测试,以确保 vrf 管理中的 source-ip 192.168.1.2 和对等 ip 192.168.1.1 之间有连接
 
DELLSONiC# ping vrf mgmt 192.168.1.1 -I 192.168.1.2
sudo: unable to resolve host DELLSONiC: Temporary failure in name resolution
PING 192.168.1.1 (192.168.1.1) from 192.168.1.2 : 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=4.73 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.13 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.846 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=4.71 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=4.75 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=1.03 ms
^C
--- 192.168.1.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5023ms
rtt min/avg/max/mdev = 0.846/2.867/4.746/1.865 ms


让我们验证会话状态。使用下面的命令 show mclag brief
 
DELLSONiC# show mclag brief

Domain ID            : 1
Role                 : standby
Session Status       : up                     ======>We can see keepalive session is up
Peer Link Status     : up
Source Address       : 192.168.1.2
Peer Address         : 192.168.1.1
Session Vrf          : mgmt                   ======>The Keepalive session use mgmt vrf
Peer Link            : Eth1/1
Keepalive Interval   : 1 secs
Session Timeout      : 30 secs
Delay Restore        : 300 secs
System Mac           : 0c:de:4c:81:00:0a
Mclag System Mac     :


Number of MLAG Interfaces:1
-----------------------------------------------------------
MLAG Interface       Local/Remote Status
-----------------------------------------------------------
PortChannel1             up/up
DELLSONiC#

Affected Products

PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON , PowerSwitch Z9432F-ON ...
Article Properties
Article Number: 000222932
Article Type: How To
Last Modified: 11 Mar 2024
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.