Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions api/core/v1alpha1/evpninstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ type EVPNInstanceSpec struct {
// +kubebuilder:validation:Format=ipv4
MulticastGroupAddress string `json:"multicastGroupAddress,omitempty"`

// MultisiteIngRepl controls per-VNI multisite ingress replication.
// When enabled, BUM traffic for this VNI is replicated to remote VTEP peers
// in the multisite domain via ingress replication.
// Typically used on Border Gateway (BGW) nodes.
// +optional
// +kubebuilder:default=Disabled
MultisiteIngRepl MultisiteIngReplMode `json:"multisiteIngRepl,omitempty"`

// RouteDistinguisher is the route distinguisher for the EVI.
// This field is only applicable when Type is Bridged (MAC-VRF).
// For Routed type, the route distinguisher is configured on the referenced VRF instead.
Expand Down Expand Up @@ -101,6 +109,19 @@ const (
EVPNInstanceTypeRouted EVPNInstanceType = "Routed"
)

// MultisiteIngReplMode defines the per-VNI multisite ingress-replication mode.
// +kubebuilder:validation:Enum=Disabled;Enabled;EnabledOptimized
type MultisiteIngReplMode string

const (
// MultisiteIngReplDisabled disables multisite ingress replication (default).
MultisiteIngReplDisabled MultisiteIngReplMode = "Disabled"
// MultisiteIngReplEnabled enables multisite ingress replication.
MultisiteIngReplEnabled MultisiteIngReplMode = "Enabled"
// MultisiteIngReplEnabledOptimized enables optimized multisite ingress replication.
MultisiteIngReplEnabledOptimized MultisiteIngReplMode = "EnabledOptimized"
)

type EVPNRouteTarget struct {
// Value is the route target value, must have the format as RouteDistinguisher.
// +required
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/crd/bases/networking.metal.ironcore.dev_evpninstances.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/api-reference/index.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions internal/provider/cisco/nxos/nve.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,21 @@ func (n *NVE) XPath() string {
return "System/eps-items/epId-items/Ep-list[epId=1]"
}

// MultisiteIngRepl represents the per-VNI multisite ingress-replication state
// on NX-OS (nvo_MultisiteIngReplStateT).
type MultisiteIngRepl string

const (
MultisiteIngReplDisable MultisiteIngRepl = "disable"
MultisiteIngReplEnable MultisiteIngRepl = "enable"
MultisiteIngReplEnableOptimized MultisiteIngRepl = "enableOptimized"
)

type VNI struct {
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
Vni int32 `json:"vni"`
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
MultisiteIngRepl MultisiteIngRepl `json:"multisiteIngRepl"`
Vni int32 `json:"vni"`
}

func (*VNI) IsListItem() {}
Expand Down
17 changes: 15 additions & 2 deletions internal/provider/cisco/nxos/nve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,23 @@ func init() {
Register("nve", nve)

vni := &VNI{
Vni: 100010,
McastGroup: NewOption("239.1.1.100"),
Vni: 100010,
McastGroup: NewOption("239.1.1.100"),
MultisiteIngRepl: MultisiteIngReplDisable,
}
Register("vni", vni)

vniMultisite := &VNI{
Vni: 100010,
MultisiteIngRepl: MultisiteIngReplEnable,
}
Register("vni_multisite_ingress_replication", vniMultisite)

vniMultisiteOptimized := &VNI{
Vni: 100010,
MultisiteIngRepl: MultisiteIngReplEnableOptimized,
}
Register("vni_multisite_ingress_replication_optimized", vniMultisiteOptimized)
nveInfraVLANs := &NVEInfraVLANs{
InfraVLANList: []*NVEInfraVLAN{
{ID: 4052},
Expand Down
8 changes: 8 additions & 0 deletions internal/provider/cisco/nxos/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,14 @@ func (p *Provider) EnsureEVPNInstance(ctx context.Context, req *provider.EVPNIns
if req.EVPNInstance.Spec.MulticastGroupAddress != "" {
vni.McastGroup = NewOption(req.EVPNInstance.Spec.MulticastGroupAddress)
}
switch req.EVPNInstance.Spec.MultisiteIngRepl {
case v1alpha1.MultisiteIngReplEnabled:
vni.MultisiteIngRepl = MultisiteIngReplEnable
case v1alpha1.MultisiteIngReplEnabledOptimized:
vni.MultisiteIngRepl = MultisiteIngReplEnableOptimized
default:
vni.MultisiteIngRepl = MultisiteIngReplDisable
}
sb.Update(vni)

switch req.EVPNInstance.Spec.Type {
Expand Down
1 change: 1 addition & 0 deletions internal/provider/cisco/nxos/testdata/vni.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
"associateVrfFlag": false,
"mcastGroup": "239.1.1.100",
"multisiteIngRepl": "disable",
"vni": 100010
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"eps-items": {
"epId-items": {
"Ep-list": [
{
"epId": "1",
"nws-items": {
"vni-items": {
"Nw-list": [
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"multisiteIngRepl": "enable",
"vni": 100010
}
]
}
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"eps-items": {
"epId-items": {
"Ep-list": [
{
"epId": "1",
"nws-items": {
"vni-items": {
"Nw-list": [
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"multisiteIngRepl": "enableOptimized",
"vni": 100010
}
]
}
}
}
]
}
}
}
1 change: 1 addition & 0 deletions test/gnmi/testdata/cisco-nxos-gnmi/evpninstance.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ spec:
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"multisiteIngRepl": "disable",
"vni": 10100
}
]
Expand Down