diff --git a/config/samples/evpn-vxlan/01-devices/kustomization.yaml b/config/samples/evpn-vxlan/01-devices/kustomization.yaml new file mode 100644 index 00000000..ae9905c8 --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - secret.yaml + - leaf1.yaml + - leaf2.yaml + - leaf3.yaml + - spine1.yaml + - spine2.yaml diff --git a/config/samples/evpn-vxlan/01-devices/leaf1.yaml b/config/samples/evpn-vxlan/01-devices/leaf1.yaml new file mode 100644 index 00000000..7eac47f5 --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/leaf1.yaml @@ -0,0 +1,11 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Device +metadata: + labels: + networking.metal.ironcore.dev/role: evpn-leaf + name: leaf1 +spec: + endpoint: + address: 192.168.5.2:50011 + secretRef: + name: fabric-credentials diff --git a/config/samples/evpn-vxlan/01-devices/leaf2.yaml b/config/samples/evpn-vxlan/01-devices/leaf2.yaml new file mode 100644 index 00000000..432ad8a4 --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/leaf2.yaml @@ -0,0 +1,11 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Device +metadata: + labels: + networking.metal.ironcore.dev/role: evpn-leaf + name: leaf2 +spec: + endpoint: + address: 192.168.5.2:50012 + secretRef: + name: fabric-credentials diff --git a/config/samples/evpn-vxlan/01-devices/leaf3.yaml b/config/samples/evpn-vxlan/01-devices/leaf3.yaml new file mode 100644 index 00000000..b426aebc --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/leaf3.yaml @@ -0,0 +1,11 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Device +metadata: + labels: + networking.metal.ironcore.dev/role: evpn-leaf + name: leaf3 +spec: + endpoint: + address: 192.168.5.2:50013 + secretRef: + name: fabric-credentials diff --git a/config/samples/evpn-vxlan/01-devices/secret.yaml b/config/samples/evpn-vxlan/01-devices/secret.yaml new file mode 100644 index 00000000..8d36691c --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: fabric-credentials +type: kubernetes.io/basic-auth +stringData: + username: admin + password: admin diff --git a/config/samples/evpn-vxlan/01-devices/spine1.yaml b/config/samples/evpn-vxlan/01-devices/spine1.yaml new file mode 100644 index 00000000..1d602b44 --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/spine1.yaml @@ -0,0 +1,11 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Device +metadata: + labels: + networking.metal.ironcore.dev/role: evpn-spine + name: spine1 +spec: + endpoint: + address: 192.168.5.2:50001 + secretRef: + name: fabric-credentials diff --git a/config/samples/evpn-vxlan/01-devices/spine2.yaml b/config/samples/evpn-vxlan/01-devices/spine2.yaml new file mode 100644 index 00000000..75927715 --- /dev/null +++ b/config/samples/evpn-vxlan/01-devices/spine2.yaml @@ -0,0 +1,11 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Device +metadata: + labels: + networking.metal.ironcore.dev/role: evpn-spine + name: spine2 +spec: + endpoint: + address: 192.168.5.2:50002 + secretRef: + name: fabric-credentials diff --git a/config/samples/evpn-vxlan/02-loopbacks/kustomization.yaml b/config/samples/evpn-vxlan/02-loopbacks/kustomization.yaml new file mode 100644 index 00000000..79c10172 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-lo0.yaml + - leaf1-lo1.yaml + - leaf2-lo0.yaml + - leaf2-lo1.yaml + - leaf3-lo0.yaml + - leaf3-lo1.yaml + - spine1-lo0.yaml + - spine1-lo1.yaml + - spine2-lo0.yaml + - spine2-lo1.yaml diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo0.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo0.yaml new file mode 100644 index 00000000..8bfc7457 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo0.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-lo0 +spec: + deviceRef: + name: leaf1 + name: lo0 + description: Router-ID Leaf1 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.10/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo1.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo1.yaml new file mode 100644 index 00000000..f47b2f29 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf1-lo1.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-lo1 +spec: + deviceRef: + name: leaf1 + name: lo1 + description: VTEP Leaf1 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.1.10/32 + - 10.1.0.10/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo0.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo0.yaml new file mode 100644 index 00000000..45516012 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo0.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-lo0 +spec: + deviceRef: + name: leaf2 + name: lo0 + description: Router-ID Leaf2 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.11/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo1.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo1.yaml new file mode 100644 index 00000000..130b7d2e --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf2-lo1.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-lo1 +spec: + deviceRef: + name: leaf2 + name: lo1 + description: VTEP Leaf2 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.1.11/32 + - 10.1.0.10/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo0.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo0.yaml new file mode 100644 index 00000000..83e3bd7a --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo0.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf3-lo0 +spec: + deviceRef: + name: leaf3 + name: lo0 + description: Router-ID Leaf3 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.12/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo1.yaml b/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo1.yaml new file mode 100644 index 00000000..e81d0ce3 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/leaf3-lo1.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf3-lo1 +spec: + deviceRef: + name: leaf3 + name: lo1 + description: VTEP Leaf3 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.1.12/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/spine1-lo0.yaml b/config/samples/evpn-vxlan/02-loopbacks/spine1-lo0.yaml new file mode 100644 index 00000000..152916d7 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/spine1-lo0.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine1-lo0 +spec: + deviceRef: + name: spine1 + name: lo0 + description: Router-ID Spine1 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.1/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/spine1-lo1.yaml b/config/samples/evpn-vxlan/02-loopbacks/spine1-lo1.yaml new file mode 100644 index 00000000..19548f52 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/spine1-lo1.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine1-lo1 +spec: + deviceRef: + name: spine1 + name: lo1 + description: Anycast RP + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.100/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/spine2-lo0.yaml b/config/samples/evpn-vxlan/02-loopbacks/spine2-lo0.yaml new file mode 100644 index 00000000..18192995 --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/spine2-lo0.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine2-lo0 +spec: + deviceRef: + name: spine2 + name: lo0 + description: Router-ID Spine2 + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.2/32 diff --git a/config/samples/evpn-vxlan/02-loopbacks/spine2-lo1.yaml b/config/samples/evpn-vxlan/02-loopbacks/spine2-lo1.yaml new file mode 100644 index 00000000..6e43bf7b --- /dev/null +++ b/config/samples/evpn-vxlan/02-loopbacks/spine2-lo1.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine2-lo1 +spec: + deviceRef: + name: spine2 + name: lo1 + description: Anycast RP + adminState: Up + type: Loopback + ipv4: + addresses: + - 10.0.0.100/32 diff --git a/config/samples/evpn-vxlan/03-vpc-keepalive/kustomization.yaml b/config/samples/evpn-vxlan/03-vpc-keepalive/kustomization.yaml new file mode 100644 index 00000000..fc9d023b --- /dev/null +++ b/config/samples/evpn-vxlan/03-vpc-keepalive/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-vpc-keepalive.yaml + - leaf2-vpc-keepalive.yaml + - leaf1-eth1-30.yaml + - leaf2-eth1-30.yaml diff --git a/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-eth1-30.yaml b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-eth1-30.yaml new file mode 100644 index 00000000..8474cf22 --- /dev/null +++ b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-eth1-30.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-eth1-30 +spec: + deviceRef: + name: leaf1 + name: eth1/30 + description: vPC Keepalive + adminState: Up + type: Physical + vrfRef: + name: leaf1-vpc-keepalive + ipv4: + addresses: + - 10.1.1.1/30 diff --git a/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-vpc-keepalive.yaml b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-vpc-keepalive.yaml new file mode 100644 index 00000000..08193500 --- /dev/null +++ b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf1-vpc-keepalive.yaml @@ -0,0 +1,9 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: VRF +metadata: + name: leaf1-vpc-keepalive +spec: + deviceRef: + name: leaf1 + name: VPC_KEEPALIVE + description: VRF for vPC Keepalive diff --git a/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-eth1-30.yaml b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-eth1-30.yaml new file mode 100644 index 00000000..6fa4af76 --- /dev/null +++ b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-eth1-30.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-eth1-30 +spec: + deviceRef: + name: leaf2 + name: eth1/30 + description: vPC Keepalive + adminState: Up + type: Physical + vrfRef: + name: leaf2-vpc-keepalive + ipv4: + addresses: + - 10.1.1.2/30 diff --git a/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-vpc-keepalive.yaml b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-vpc-keepalive.yaml new file mode 100644 index 00000000..abd193ec --- /dev/null +++ b/config/samples/evpn-vxlan/03-vpc-keepalive/leaf2-vpc-keepalive.yaml @@ -0,0 +1,9 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: VRF +metadata: + name: leaf2-vpc-keepalive +spec: + deviceRef: + name: leaf2 + name: VPC_KEEPALIVE + description: VRF for vPC Keepalive diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/kustomization.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/kustomization.yaml new file mode 100644 index 00000000..9a4a87fb --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-eth1-31.yaml + - leaf1-eth1-32.yaml + - leaf1-po1.yaml + - leaf2-eth1-31.yaml + - leaf2-eth1-32.yaml + - leaf2-po1.yaml diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-31.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-31.yaml new file mode 100644 index 00000000..7cdb0f5c --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-31.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf1-eth1-31 +spec: + deviceRef: + name: leaf1 + name: eth1/31 + description: vPC Peer-Link + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-32.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-32.yaml new file mode 100644 index 00000000..d8833af2 --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-eth1-32.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf1-eth1-32 +spec: + deviceRef: + name: leaf1 + name: eth1/32 + description: vPC Peer-Link + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-po1.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-po1.yaml new file mode 100644 index 00000000..fc15f70f --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf1-po1.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf1-po1 +spec: + deviceRef: + name: leaf1 + name: po1 + description: vPC Peer-Link + adminState: Up + type: Aggregate + switchport: + mode: Trunk + nativeVlan: 1 + aggregation: + controlProtocol: + mode: Active + memberInterfaceRefs: + - name: leaf1-eth1-31 + - name: leaf1-eth1-32 diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-31.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-31.yaml new file mode 100644 index 00000000..aeaeae61 --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-31.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf2-eth1-31 +spec: + deviceRef: + name: leaf2 + name: eth1/31 + description: vPC Peer-Link + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-32.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-32.yaml new file mode 100644 index 00000000..cec79672 --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-eth1-32.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf2-eth1-32 +spec: + deviceRef: + name: leaf2 + name: eth1/32 + description: vPC Peer-Link + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 diff --git a/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-po1.yaml b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-po1.yaml new file mode 100644 index 00000000..8cafb3e3 --- /dev/null +++ b/config/samples/evpn-vxlan/04-vpc-peerlink/leaf2-po1.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + annotations: + nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type: "network" + name: leaf2-po1 +spec: + deviceRef: + name: leaf2 + name: po1 + description: vPC Peer-Link + adminState: Up + type: Aggregate + switchport: + mode: Trunk + nativeVlan: 1 + aggregation: + controlProtocol: + mode: Active + memberInterfaceRefs: + - name: leaf2-eth1-31 + - name: leaf2-eth1-32 diff --git a/config/samples/evpn-vxlan/05-vpc-domain/kustomization.yaml b/config/samples/evpn-vxlan/05-vpc-domain/kustomization.yaml new file mode 100644 index 00000000..954f6652 --- /dev/null +++ b/config/samples/evpn-vxlan/05-vpc-domain/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-vpc-domain.yaml + - leaf2-vpc-domain.yaml diff --git a/config/samples/evpn-vxlan/05-vpc-domain/leaf1-vpc-domain.yaml b/config/samples/evpn-vxlan/05-vpc-domain/leaf1-vpc-domain.yaml new file mode 100644 index 00000000..e40e9e26 --- /dev/null +++ b/config/samples/evpn-vxlan/05-vpc-domain/leaf1-vpc-domain.yaml @@ -0,0 +1,22 @@ +apiVersion: nx.cisco.networking.metal.ironcore.dev/v1alpha1 +kind: VPCDomain +metadata: + name: leaf1-vpcdomain +spec: + deviceRef: + name: leaf1 + domainId: 1 + adminState: Up + peer: + adminState: Up + interfaceRef: + name: leaf1-po1 + switch: + enabled: true + gateway: + enabled: true + keepalive: + source: 10.1.1.1 + destination: 10.1.1.2 + vrfRef: + name: leaf1-vpc-keepalive diff --git a/config/samples/evpn-vxlan/05-vpc-domain/leaf2-vpc-domain.yaml b/config/samples/evpn-vxlan/05-vpc-domain/leaf2-vpc-domain.yaml new file mode 100644 index 00000000..cc6dfca9 --- /dev/null +++ b/config/samples/evpn-vxlan/05-vpc-domain/leaf2-vpc-domain.yaml @@ -0,0 +1,22 @@ +apiVersion: nx.cisco.networking.metal.ironcore.dev/v1alpha1 +kind: VPCDomain +metadata: + name: leaf2-vpcdomain +spec: + deviceRef: + name: leaf2 + domainId: 1 + adminState: Up + peer: + adminState: Up + interfaceRef: + name: leaf2-po1 + switch: + enabled: true + gateway: + enabled: true + keepalive: + source: 10.1.1.2 + destination: 10.1.1.1 + vrfRef: + name: leaf2-vpc-keepalive diff --git a/config/samples/evpn-vxlan/06-interconnects/kustomization.yaml b/config/samples/evpn-vxlan/06-interconnects/kustomization.yaml new file mode 100644 index 00000000..511e695b --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-eth1-1.yaml + - leaf1-eth1-2.yaml + - leaf2-eth1-1.yaml + - leaf2-eth1-2.yaml + - leaf3-eth1-1.yaml + - leaf3-eth1-2.yaml + - spine1-eth1-1.yaml + - spine1-eth1-2.yaml + - spine1-eth1-3.yaml + - spine2-eth1-1.yaml + - spine2-eth1-2.yaml + - spine2-eth1-3.yaml diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-1.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-1.yaml new file mode 100644 index 00000000..e8be3bd3 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-1.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-eth1-1 +spec: + deviceRef: + name: leaf1 + name: eth1/1 + description: Leaf1 to Spine1 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf1-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-2.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-2.yaml new file mode 100644 index 00000000..a0a6afad --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf1-eth1-2.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-eth1-2 +spec: + deviceRef: + name: leaf1 + name: eth1/2 + description: Leaf1 to Spine2 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf1-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-1.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-1.yaml new file mode 100644 index 00000000..e1d47337 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-1.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-eth1-1 +spec: + deviceRef: + name: leaf2 + name: eth1/1 + description: Leaf2 to Spine1 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf2-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-2.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-2.yaml new file mode 100644 index 00000000..ee7e0b17 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf2-eth1-2.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-eth1-2 +spec: + deviceRef: + name: leaf2 + name: eth1/2 + description: Leaf2 to Spine2 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf2-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-1.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-1.yaml new file mode 100644 index 00000000..ed565a86 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-1.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf3-eth1-1 +spec: + deviceRef: + name: leaf3 + name: eth1/1 + description: Leaf3 to Spine1 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf3-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-2.yaml b/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-2.yaml new file mode 100644 index 00000000..6dd5c871 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/leaf3-eth1-2.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf3-eth1-2 +spec: + deviceRef: + name: leaf3 + name: eth1/2 + description: Leaf3 to Spine2 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: leaf3-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-1.yaml b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-1.yaml new file mode 100644 index 00000000..de48e366 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-1.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine1-eth1-1 +spec: + deviceRef: + name: spine1 + name: eth1/1 + description: Spine1 to Leaf1 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine1-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-2.yaml b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-2.yaml new file mode 100644 index 00000000..561ac992 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-2.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine1-eth1-2 +spec: + deviceRef: + name: spine1 + name: eth1/2 + description: Spine1 to Leaf2 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine1-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-3.yaml b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-3.yaml new file mode 100644 index 00000000..a0e3ad46 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine1-eth1-3.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine1-eth1-3 +spec: + deviceRef: + name: spine1 + name: eth1/3 + description: Spine1 to Leaf3 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine1-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-1.yaml b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-1.yaml new file mode 100644 index 00000000..135119b9 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-1.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine2-eth1-1 +spec: + deviceRef: + name: spine2 + name: eth1/1 + description: Spine2 to Leaf1 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine2-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-2.yaml b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-2.yaml new file mode 100644 index 00000000..d175b309 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-2.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine2-eth1-2 +spec: + deviceRef: + name: spine2 + name: eth1/2 + description: Spine2 to Leaf2 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine2-lo0 diff --git a/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-3.yaml b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-3.yaml new file mode 100644 index 00000000..517a8ed2 --- /dev/null +++ b/config/samples/evpn-vxlan/06-interconnects/spine2-eth1-3.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: spine2-eth1-3 +spec: + deviceRef: + name: spine2 + name: eth1/3 + description: Spine2 to Leaf3 + adminState: Up + type: Physical + mtu: 9216 + ipv4: + unnumbered: + interfaceRef: + name: spine2-lo0 diff --git a/config/samples/evpn-vxlan/07-underlay/kustomization.yaml b/config/samples/evpn-vxlan/07-underlay/kustomization.yaml new file mode 100644 index 00000000..a1feecc5 --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-ospf.yaml + - leaf2-ospf.yaml + - leaf3-ospf.yaml + - spine1-ospf.yaml + - spine2-ospf.yaml diff --git a/config/samples/evpn-vxlan/07-underlay/leaf1-ospf.yaml b/config/samples/evpn-vxlan/07-underlay/leaf1-ospf.yaml new file mode 100644 index 00000000..f551d2ed --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/leaf1-ospf.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: OSPF +metadata: + name: leaf1-underlay +spec: + deviceRef: + name: leaf1 + instance: UNDERLAY + routerId: 10.0.0.10 + logAdjacencyChanges: true + interfaceRefs: + - name: leaf1-lo0 + area: 0.0.0.0 + passive: true + - name: leaf1-lo1 + area: 0.0.0.0 + passive: true + - name: leaf1-eth1-1 + area: 0.0.0.0 + - name: leaf1-eth1-2 + area: 0.0.0.0 diff --git a/config/samples/evpn-vxlan/07-underlay/leaf2-ospf.yaml b/config/samples/evpn-vxlan/07-underlay/leaf2-ospf.yaml new file mode 100644 index 00000000..e4872baa --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/leaf2-ospf.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: OSPF +metadata: + name: leaf2-underlay +spec: + deviceRef: + name: leaf2 + instance: UNDERLAY + routerId: 10.0.0.11 + logAdjacencyChanges: true + interfaceRefs: + - name: leaf2-lo0 + area: 0.0.0.0 + passive: true + - name: leaf2-lo1 + area: 0.0.0.0 + passive: true + - name: leaf2-eth1-1 + area: 0.0.0.0 + - name: leaf2-eth1-2 + area: 0.0.0.0 diff --git a/config/samples/evpn-vxlan/07-underlay/leaf3-ospf.yaml b/config/samples/evpn-vxlan/07-underlay/leaf3-ospf.yaml new file mode 100644 index 00000000..b9d4eadc --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/leaf3-ospf.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: OSPF +metadata: + name: leaf3-underlay +spec: + deviceRef: + name: leaf3 + instance: UNDERLAY + routerId: 10.0.0.12 + logAdjacencyChanges: true + interfaceRefs: + - name: leaf3-lo0 + area: 0.0.0.0 + passive: true + - name: leaf3-lo1 + area: 0.0.0.0 + passive: true + - name: leaf3-eth1-1 + area: 0.0.0.0 + - name: leaf3-eth1-2 + area: 0.0.0.0 diff --git a/config/samples/evpn-vxlan/07-underlay/spine1-ospf.yaml b/config/samples/evpn-vxlan/07-underlay/spine1-ospf.yaml new file mode 100644 index 00000000..055ef06e --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/spine1-ospf.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: OSPF +metadata: + name: spine1-underlay +spec: + deviceRef: + name: spine1 + instance: UNDERLAY + routerId: 10.0.0.1 + logAdjacencyChanges: true + interfaceRefs: + - name: spine1-lo0 + area: 0.0.0.0 + passive: true + - name: spine1-lo1 + area: 0.0.0.0 + passive: true + - name: spine1-eth1-1 + area: 0.0.0.0 + - name: spine1-eth1-2 + area: 0.0.0.0 + - name: spine1-eth1-3 + area: 0.0.0.0 diff --git a/config/samples/evpn-vxlan/07-underlay/spine2-ospf.yaml b/config/samples/evpn-vxlan/07-underlay/spine2-ospf.yaml new file mode 100644 index 00000000..30dad91a --- /dev/null +++ b/config/samples/evpn-vxlan/07-underlay/spine2-ospf.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: OSPF +metadata: + name: spine2-underlay +spec: + deviceRef: + name: spine2 + instance: UNDERLAY + routerId: 10.0.0.2 + logAdjacencyChanges: true + interfaceRefs: + - name: spine2-lo0 + area: 0.0.0.0 + passive: true + - name: spine2-lo1 + area: 0.0.0.0 + passive: true + - name: spine2-eth1-1 + area: 0.0.0.0 + - name: spine2-eth1-2 + area: 0.0.0.0 + - name: spine2-eth1-3 + area: 0.0.0.0 diff --git a/config/samples/evpn-vxlan/08-pim/kustomization.yaml b/config/samples/evpn-vxlan/08-pim/kustomization.yaml new file mode 100644 index 00000000..a6c17831 --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-pim.yaml + - leaf2-pim.yaml + - leaf3-pim.yaml + - spine1-pim.yaml + - spine2-pim.yaml diff --git a/config/samples/evpn-vxlan/08-pim/leaf1-pim.yaml b/config/samples/evpn-vxlan/08-pim/leaf1-pim.yaml new file mode 100644 index 00000000..06a39544 --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/leaf1-pim.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: PIM +metadata: + name: leaf1-pim +spec: + deviceRef: + name: leaf1 + rendezvousPoints: + - address: 10.0.0.100 + multicastGroups: + - 224.0.0.0/4 + interfaceRefs: + - name: leaf1-lo0 + mode: Sparse + - name: leaf1-lo1 + mode: Sparse + - name: leaf1-eth1-1 + mode: Sparse + - name: leaf1-eth1-2 + mode: Sparse diff --git a/config/samples/evpn-vxlan/08-pim/leaf2-pim.yaml b/config/samples/evpn-vxlan/08-pim/leaf2-pim.yaml new file mode 100644 index 00000000..00dc213c --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/leaf2-pim.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: PIM +metadata: + name: leaf2-pim +spec: + deviceRef: + name: leaf2 + rendezvousPoints: + - address: 10.0.0.100 + multicastGroups: + - 224.0.0.0/4 + interfaceRefs: + - name: leaf2-lo0 + mode: Sparse + - name: leaf2-lo1 + mode: Sparse + - name: leaf2-eth1-1 + mode: Sparse + - name: leaf2-eth1-2 + mode: Sparse diff --git a/config/samples/evpn-vxlan/08-pim/leaf3-pim.yaml b/config/samples/evpn-vxlan/08-pim/leaf3-pim.yaml new file mode 100644 index 00000000..dcd5bc69 --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/leaf3-pim.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: PIM +metadata: + name: leaf3-pim +spec: + deviceRef: + name: leaf3 + rendezvousPoints: + - address: 10.0.0.100 + multicastGroups: + - 224.0.0.0/4 + interfaceRefs: + - name: leaf3-lo0 + mode: Sparse + - name: leaf3-lo1 + mode: Sparse + - name: leaf3-eth1-1 + mode: Sparse + - name: leaf3-eth1-2 + mode: Sparse diff --git a/config/samples/evpn-vxlan/08-pim/spine1-pim.yaml b/config/samples/evpn-vxlan/08-pim/spine1-pim.yaml new file mode 100644 index 00000000..c88f1fac --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/spine1-pim.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: PIM +metadata: + name: spine1-pim +spec: + deviceRef: + name: spine1 + rendezvousPoints: + - address: 10.0.0.100 + multicastGroups: + - 224.0.0.0/4 + anycastAddresses: + - 10.0.0.1 + - 10.0.0.2 + interfaceRefs: + - name: spine1-lo0 + mode: Sparse + - name: spine1-lo1 + mode: Sparse + - name: spine1-eth1-1 + mode: Sparse + - name: spine1-eth1-2 + mode: Sparse + - name: spine1-eth1-3 + mode: Sparse diff --git a/config/samples/evpn-vxlan/08-pim/spine2-pim.yaml b/config/samples/evpn-vxlan/08-pim/spine2-pim.yaml new file mode 100644 index 00000000..d9b581e7 --- /dev/null +++ b/config/samples/evpn-vxlan/08-pim/spine2-pim.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: PIM +metadata: + name: spine2-pim +spec: + deviceRef: + name: spine2 + rendezvousPoints: + - address: 10.0.0.100 + multicastGroups: + - 224.0.0.0/4 + anycastAddresses: + - 10.0.0.1 + - 10.0.0.2 + interfaceRefs: + - name: spine2-lo0 + mode: Sparse + - name: spine2-lo1 + mode: Sparse + - name: spine2-eth1-1 + mode: Sparse + - name: spine2-eth1-2 + mode: Sparse + - name: spine2-eth1-3 + mode: Sparse diff --git a/config/samples/evpn-vxlan/09-bgp-router/kustomization.yaml b/config/samples/evpn-vxlan/09-bgp-router/kustomization.yaml new file mode 100644 index 00000000..d859aa25 --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-bgp.yaml + - leaf2-bgp.yaml + - leaf3-bgp.yaml + - spine1-bgp.yaml + - spine2-bgp.yaml diff --git a/config/samples/evpn-vxlan/09-bgp-router/leaf1-bgp.yaml b/config/samples/evpn-vxlan/09-bgp-router/leaf1-bgp.yaml new file mode 100644 index 00000000..7a7be80b --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/leaf1-bgp.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGP +metadata: + name: leaf1-bgp +spec: + deviceRef: + name: leaf1 + asNumber: 65000 + routerId: 10.0.0.10 + addressFamilies: + ipv4Unicast: + enabled: true diff --git a/config/samples/evpn-vxlan/09-bgp-router/leaf2-bgp.yaml b/config/samples/evpn-vxlan/09-bgp-router/leaf2-bgp.yaml new file mode 100644 index 00000000..75d911bb --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/leaf2-bgp.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGP +metadata: + name: leaf2-bgp +spec: + deviceRef: + name: leaf2 + asNumber: 65000 + routerId: 10.0.0.11 + addressFamilies: + ipv4Unicast: + enabled: true diff --git a/config/samples/evpn-vxlan/09-bgp-router/leaf3-bgp.yaml b/config/samples/evpn-vxlan/09-bgp-router/leaf3-bgp.yaml new file mode 100644 index 00000000..174744fa --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/leaf3-bgp.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGP +metadata: + name: leaf3-bgp +spec: + deviceRef: + name: leaf3 + asNumber: 65000 + routerId: 10.0.0.12 + addressFamilies: + ipv4Unicast: + enabled: true diff --git a/config/samples/evpn-vxlan/09-bgp-router/spine1-bgp.yaml b/config/samples/evpn-vxlan/09-bgp-router/spine1-bgp.yaml new file mode 100644 index 00000000..0900ad1b --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/spine1-bgp.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGP +metadata: + name: spine1-bgp +spec: + deviceRef: + name: spine1 + asNumber: 65000 + routerId: 10.0.0.1 + addressFamilies: + ipv4Unicast: + enabled: true diff --git a/config/samples/evpn-vxlan/09-bgp-router/spine2-bgp.yaml b/config/samples/evpn-vxlan/09-bgp-router/spine2-bgp.yaml new file mode 100644 index 00000000..f8faf0a4 --- /dev/null +++ b/config/samples/evpn-vxlan/09-bgp-router/spine2-bgp.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGP +metadata: + name: spine2-bgp +spec: + deviceRef: + name: spine2 + asNumber: 65000 + routerId: 10.0.0.2 + addressFamilies: + ipv4Unicast: + enabled: true diff --git a/config/samples/evpn-vxlan/10-bgp-peers/kustomization.yaml b/config/samples/evpn-vxlan/10-bgp-peers/kustomization.yaml new file mode 100644 index 00000000..fa668a12 --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-bgp-peers.yaml + - leaf2-bgp-peers.yaml + - leaf3-bgp-peers.yaml + - spine1-bgp-peers.yaml + - spine2-bgp-peers.yaml diff --git a/config/samples/evpn-vxlan/10-bgp-peers/leaf1-bgp-peers.yaml b/config/samples/evpn-vxlan/10-bgp-peers/leaf1-bgp-peers.yaml new file mode 100644 index 00000000..e25631b7 --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/leaf1-bgp-peers.yaml @@ -0,0 +1,33 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf1-spine1 +spec: + deviceRef: + name: leaf1 + address: 10.0.0.1 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf1-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf1-spine2 +spec: + deviceRef: + name: leaf1 + address: 10.0.0.2 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf1-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both diff --git a/config/samples/evpn-vxlan/10-bgp-peers/leaf2-bgp-peers.yaml b/config/samples/evpn-vxlan/10-bgp-peers/leaf2-bgp-peers.yaml new file mode 100644 index 00000000..da048809 --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/leaf2-bgp-peers.yaml @@ -0,0 +1,33 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf2-spine1 +spec: + deviceRef: + name: leaf2 + address: 10.0.0.1 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf2-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf2-spine2 +spec: + deviceRef: + name: leaf2 + address: 10.0.0.2 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf2-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both diff --git a/config/samples/evpn-vxlan/10-bgp-peers/leaf3-bgp-peers.yaml b/config/samples/evpn-vxlan/10-bgp-peers/leaf3-bgp-peers.yaml new file mode 100644 index 00000000..da03db0e --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/leaf3-bgp-peers.yaml @@ -0,0 +1,33 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf3-spine1 +spec: + deviceRef: + name: leaf3 + address: 10.0.0.1 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf3-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: leaf3-spine2 +spec: + deviceRef: + name: leaf3 + address: 10.0.0.2 + asNumber: 65000 + localAddress: + interfaceRef: + name: leaf3-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both diff --git a/config/samples/evpn-vxlan/10-bgp-peers/spine1-bgp-peers.yaml b/config/samples/evpn-vxlan/10-bgp-peers/spine1-bgp-peers.yaml new file mode 100644 index 00000000..0db1934c --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/spine1-bgp-peers.yaml @@ -0,0 +1,53 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine1-leaf1 +spec: + deviceRef: + name: spine1 + address: 10.0.0.10 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine1-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine1-leaf2 +spec: + deviceRef: + name: spine1 + address: 10.0.0.11 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine1-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine1-leaf3 +spec: + deviceRef: + name: spine1 + address: 10.0.0.12 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine1-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true diff --git a/config/samples/evpn-vxlan/10-bgp-peers/spine2-bgp-peers.yaml b/config/samples/evpn-vxlan/10-bgp-peers/spine2-bgp-peers.yaml new file mode 100644 index 00000000..1e84b1ca --- /dev/null +++ b/config/samples/evpn-vxlan/10-bgp-peers/spine2-bgp-peers.yaml @@ -0,0 +1,53 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine2-leaf1 +spec: + deviceRef: + name: spine2 + address: 10.0.0.10 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine2-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine2-leaf2 +spec: + deviceRef: + name: spine2 + address: 10.0.0.11 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine2-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true +--- +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: BGPPeer +metadata: + name: spine2-leaf3 +spec: + deviceRef: + name: spine2 + address: 10.0.0.12 + asNumber: 65000 + localAddress: + interfaceRef: + name: spine2-lo0 + addressFamilies: + l2vpnEvpn: + enabled: true + sendCommunity: Both + routeReflectorClient: true diff --git a/config/samples/evpn-vxlan/11-nve/kustomization.yaml b/config/samples/evpn-vxlan/11-nve/kustomization.yaml new file mode 100644 index 00000000..b2544ce6 --- /dev/null +++ b/config/samples/evpn-vxlan/11-nve/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-nve1.yaml + - leaf2-nve1.yaml + - leaf3-nve1.yaml diff --git a/config/samples/evpn-vxlan/11-nve/leaf1-nve1.yaml b/config/samples/evpn-vxlan/11-nve/leaf1-nve1.yaml new file mode 100644 index 00000000..78f3c3a2 --- /dev/null +++ b/config/samples/evpn-vxlan/11-nve/leaf1-nve1.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: NetworkVirtualizationEdge +metadata: + name: leaf1-nve1 +spec: + deviceRef: + name: leaf1 + adminState: Up + hostReachability: BGP + sourceInterfaceRef: + name: leaf1-lo1 + multicastGroups: + l2: 224.0.0.2 + anycastGateway: + virtualMAC: 00:00:11:11:22:22 diff --git a/config/samples/evpn-vxlan/11-nve/leaf2-nve1.yaml b/config/samples/evpn-vxlan/11-nve/leaf2-nve1.yaml new file mode 100644 index 00000000..14f8067e --- /dev/null +++ b/config/samples/evpn-vxlan/11-nve/leaf2-nve1.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: NetworkVirtualizationEdge +metadata: + name: leaf2-nve1 +spec: + deviceRef: + name: leaf2 + adminState: Up + hostReachability: BGP + sourceInterfaceRef: + name: leaf2-lo1 + multicastGroups: + l2: 224.0.0.2 + anycastGateway: + virtualMAC: 00:00:11:11:22:22 diff --git a/config/samples/evpn-vxlan/11-nve/leaf3-nve1.yaml b/config/samples/evpn-vxlan/11-nve/leaf3-nve1.yaml new file mode 100644 index 00000000..988d1663 --- /dev/null +++ b/config/samples/evpn-vxlan/11-nve/leaf3-nve1.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: NetworkVirtualizationEdge +metadata: + name: leaf3-nve1 +spec: + deviceRef: + name: leaf3 + adminState: Up + hostReachability: BGP + sourceInterfaceRef: + name: leaf3-lo1 + multicastGroups: + l2: 224.0.0.2 + anycastGateway: + virtualMAC: 00:00:11:11:22:22 diff --git a/config/samples/evpn-vxlan/12-vlan/kustomization.yaml b/config/samples/evpn-vxlan/12-vlan/kustomization.yaml new file mode 100644 index 00000000..0721d8b8 --- /dev/null +++ b/config/samples/evpn-vxlan/12-vlan/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-vlan-10.yaml + - leaf2-vlan-10.yaml + - leaf3-vlan-10.yaml diff --git a/config/samples/evpn-vxlan/12-vlan/leaf1-vlan-10.yaml b/config/samples/evpn-vxlan/12-vlan/leaf1-vlan-10.yaml new file mode 100644 index 00000000..068fafe6 --- /dev/null +++ b/config/samples/evpn-vxlan/12-vlan/leaf1-vlan-10.yaml @@ -0,0 +1,8 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: VLAN +metadata: + name: leaf1-vlan-10 +spec: + deviceRef: + name: leaf1 + id: 10 diff --git a/config/samples/evpn-vxlan/12-vlan/leaf2-vlan-10.yaml b/config/samples/evpn-vxlan/12-vlan/leaf2-vlan-10.yaml new file mode 100644 index 00000000..276c9ee6 --- /dev/null +++ b/config/samples/evpn-vxlan/12-vlan/leaf2-vlan-10.yaml @@ -0,0 +1,8 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: VLAN +metadata: + name: leaf2-vlan-10 +spec: + deviceRef: + name: leaf2 + id: 10 diff --git a/config/samples/evpn-vxlan/12-vlan/leaf3-vlan-10.yaml b/config/samples/evpn-vxlan/12-vlan/leaf3-vlan-10.yaml new file mode 100644 index 00000000..f699d0ad --- /dev/null +++ b/config/samples/evpn-vxlan/12-vlan/leaf3-vlan-10.yaml @@ -0,0 +1,8 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: VLAN +metadata: + name: leaf3-vlan-10 +spec: + deviceRef: + name: leaf3 + id: 10 diff --git a/config/samples/evpn-vxlan/13-host/kustomization.yaml b/config/samples/evpn-vxlan/13-host/kustomization.yaml new file mode 100644 index 00000000..815444bc --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-eth1-10.yaml + - leaf1-po10.yaml + - leaf2-eth1-10.yaml + - leaf2-po10.yaml + - leaf3-eth1-10.yaml diff --git a/config/samples/evpn-vxlan/13-host/leaf1-eth1-10.yaml b/config/samples/evpn-vxlan/13-host/leaf1-eth1-10.yaml new file mode 100644 index 00000000..7b2da969 --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/leaf1-eth1-10.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-eth1-10 +spec: + deviceRef: + name: leaf1 + name: eth1/10 + description: Leaf1 to Host1 + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 + allowedVlans: [10] diff --git a/config/samples/evpn-vxlan/13-host/leaf1-po10.yaml b/config/samples/evpn-vxlan/13-host/leaf1-po10.yaml new file mode 100644 index 00000000..75613c4e --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/leaf1-po10.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf1-po-10 +spec: + deviceRef: + name: leaf1 + name: po10 + description: vPC Leaf1 to Host1 + adminState: Up + type: Aggregate + switchport: + mode: Trunk + nativeVlan: 1 + allowedVlans: [10] + aggregation: + controlProtocol: + mode: Active + memberInterfaceRefs: + - name: leaf1-eth1-10 + multichassis: + id: 10 diff --git a/config/samples/evpn-vxlan/13-host/leaf2-eth1-10.yaml b/config/samples/evpn-vxlan/13-host/leaf2-eth1-10.yaml new file mode 100644 index 00000000..dc86ec26 --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/leaf2-eth1-10.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-eth1-10 +spec: + deviceRef: + name: leaf2 + name: eth1/10 + description: Leaf2 to Host1 + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 + allowedVlans: [10] diff --git a/config/samples/evpn-vxlan/13-host/leaf2-po10.yaml b/config/samples/evpn-vxlan/13-host/leaf2-po10.yaml new file mode 100644 index 00000000..dd065b26 --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/leaf2-po10.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf2-po-10 +spec: + deviceRef: + name: leaf2 + name: po10 + description: vPC Leaf2 to Host1 + adminState: Up + type: Aggregate + switchport: + mode: Trunk + nativeVlan: 1 + allowedVlans: [10] + aggregation: + controlProtocol: + mode: Active + memberInterfaceRefs: + - name: leaf2-eth1-10 + multichassis: + id: 10 diff --git a/config/samples/evpn-vxlan/13-host/leaf3-eth1-10.yaml b/config/samples/evpn-vxlan/13-host/leaf3-eth1-10.yaml new file mode 100644 index 00000000..d31503a9 --- /dev/null +++ b/config/samples/evpn-vxlan/13-host/leaf3-eth1-10.yaml @@ -0,0 +1,15 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: Interface +metadata: + name: leaf3-eth1-10 +spec: + deviceRef: + name: leaf3 + name: eth1/10 + description: Leaf3 to Host2 + adminState: Up + type: Physical + switchport: + mode: Trunk + nativeVlan: 1 + allowedVlans: [10] diff --git a/config/samples/evpn-vxlan/14-vxlan/kustomization.yaml b/config/samples/evpn-vxlan/14-vxlan/kustomization.yaml new file mode 100644 index 00000000..eefdf964 --- /dev/null +++ b/config/samples/evpn-vxlan/14-vxlan/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - leaf1-vxlan-100010.yaml + - leaf2-vxlan-100010.yaml + - leaf3-vxlan-100010.yaml diff --git a/config/samples/evpn-vxlan/14-vxlan/leaf1-vxlan-100010.yaml b/config/samples/evpn-vxlan/14-vxlan/leaf1-vxlan-100010.yaml new file mode 100644 index 00000000..f8b60bb4 --- /dev/null +++ b/config/samples/evpn-vxlan/14-vxlan/leaf1-vxlan-100010.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: EVPNInstance +metadata: + name: leaf1-vxlan-100010 +spec: + deviceRef: + name: leaf1 + vni: 100010 + type: Bridged + multicastGroupAddress: 239.1.1.100 + vlanRef: + name: leaf1-vlan-10 diff --git a/config/samples/evpn-vxlan/14-vxlan/leaf2-vxlan-100010.yaml b/config/samples/evpn-vxlan/14-vxlan/leaf2-vxlan-100010.yaml new file mode 100644 index 00000000..6e35e0bb --- /dev/null +++ b/config/samples/evpn-vxlan/14-vxlan/leaf2-vxlan-100010.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: EVPNInstance +metadata: + name: leaf2-vxlan-100010 +spec: + deviceRef: + name: leaf2 + vni: 100010 + type: Bridged + multicastGroupAddress: 239.1.1.100 + vlanRef: + name: leaf2-vlan-10 diff --git a/config/samples/evpn-vxlan/14-vxlan/leaf3-vxlan-100010.yaml b/config/samples/evpn-vxlan/14-vxlan/leaf3-vxlan-100010.yaml new file mode 100644 index 00000000..4e693fab --- /dev/null +++ b/config/samples/evpn-vxlan/14-vxlan/leaf3-vxlan-100010.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.metal.ironcore.dev/v1alpha1 +kind: EVPNInstance +metadata: + name: leaf3-vxlan-100010 +spec: + deviceRef: + name: leaf3 + vni: 100010 + type: Bridged + multicastGroupAddress: 239.1.1.100 + vlanRef: + name: leaf3-vlan-10 diff --git a/config/samples/evpn-vxlan/demo.sh b/config/samples/evpn-vxlan/demo.sh new file mode 100755 index 00000000..193b759b --- /dev/null +++ b/config/samples/evpn-vxlan/demo.sh @@ -0,0 +1,115 @@ +#!/bin/bash +# shellcheck disable=SC2034,SC1091,SC2145 + +if [ ! -f /tmp/demo-magic.sh ]; then + curl -sSL https://raw.githubusercontent.com/paxtonhare/demo-magic/refs/heads/master/demo-magic.sh -o /tmp/demo-magic.sh +fi + +source /tmp/demo-magic.sh + +TYPE_SPEED=69420 + +function de() { + p "$@" + run_cmd "$@ --show-events=false | awk '/^Name:/ || /^Spec:/ {p=1} /^[A-Z]/ && !/^(Name:|Spec:)/ {p=0} p'" +} + +function ds() { + p "$@" + run_cmd "$@ | grep -v -E '^Labels:' | grep -v -E 'Namespace:' | grep -v -E 'Annotations:'" +} + +# Clear the screen +clear + +pe 'kubectl get deployment -n network-operator-system' + +p "# Device Configuration" +pe 'kubectl apply -k ./01-devices' +de 'kubectl describe device leaf1' +ds "kubectl describe secret fabric-credentials" +pe 'kubectl get device -o wide' + +p "# Loopback Interface Configuration" +pe 'kubectl apply -k ./02-loopbacks' +de 'kubectl describe interface leaf1-lo0' +de 'kubectl describe interface leaf1-lo1' +pe 'watch kubectl get interface -o wide' + +p "# VPC Keepalive Configuration" +pe 'kubectl apply -k ./03-vpc-keepalive' +de 'kubectl describe vrf leaf1-vpc-keepalive' +de 'kubectl describe interface leaf1-eth1-30' +de 'kubectl describe interface leaf2-eth1-30' +pe 'watch kubectl get vrf -o wide' +pe 'watch kubectl get interface -o wide' +pe '# leaf1: ping 10.1.1.2 vrf VPC_KEEPALIVE source 10.1.1.1' +pe 'kubectl get interface -l networking.metal.ironcore.dev/vrf-name=leaf1-vpc-keepalive' + +p "# VPC Peerlink Configuration" +pe 'kubectl apply -k ./04-vpc-peerlink' +de 'kubectl describe interface leaf1-po1' +pe 'watch kubectl get interface -o wide' +pe 'kubectl get interface -l networking.metal.ironcore.dev/aggregate-name=leaf1-po1' + +p "# VPC Domain Configuration" +pe 'kubectl apply -k ./05-vpc-domain' +de 'kubectl describe vpcdomain leaf1-vpcdomain' +pe 'watch kubectl get vpcdomain -o wide' +pe '# leaf1: show vpc brief' + +p "# Interconnect Interface Configuration" +pe 'kubectl apply -k ./06-interconnects' +de 'kubectl describe interface leaf1-eth1-1' +pe 'watch kubectl get interface -o wide' + +p "# OSPF Underlay Configuration" +pe 'kubectl apply -k ./07-underlay' +de 'kubectl describe ospf leaf1-underlay' +pe 'watch kubectl get ospf -o wide' +pe '# leaf1: show ip ospf neighbors' +pe '# leaf1: show ip route ospf' +pe '# leaf1: ping 10.0.0.12' + +p "# PIM Configuration" +pe 'kubectl apply -k ./08-pim' +de 'kubectl describe pim leaf1-pim' +de 'kubectl describe pim spine1-pim' +pe 'watch kubectl get pim -o wide' +pe '# leaf1: show ip pim neighbor' + +p "# BGP EVPN Control Plane" +pe 'kubectl apply -k ./09-bgp-router' +de 'kubectl describe bgp leaf1-bgp' +pe 'watch kubectl get bgp -o wide' + +p "# BGP Peer Configuration" +pe 'kubectl apply -k ./10-bgp-peers' +de 'kubectl describe bgppeer leaf1-spine1' +pe 'watch kubectl get bgppeer -o wide' +pe '# leaf1: show bgp sessions' + +p "# NVE Configuration" +pe 'kubectl apply -k ./11-nve' +de 'kubectl describe nve leaf1-nve1' +pe 'watch kubectl get nve -o wide' + +p "# VLAN Configuration" +pe 'kubectl apply -k ./12-vlan' +de 'kubectl describe vlan leaf1-vlan-10' +pe 'watch kubectl get vlan -o wide' + +p "# Host Interface Configuration" +pe 'kubectl apply -k ./13-host' +de 'kubectl describe interface leaf1-eth1-10' +de 'kubectl describe interface leaf1-po-10' +pe 'watch kubectl get interface -o wide' + +p "# L2EVI/MAC-VRF Configuration" +pe 'kubectl apply -k ./14-vxlan' +de 'kubectl describe evi leaf1-vxlan-100010' +pe 'watch kubectl get evi -o wide' + +pe 'watch kubectl get bgppeer -o wide' + +p "# host1: ping 192.168.10.2" diff --git a/config/samples/evpn-vxlan/evpn-vxlan-fabric.clab.yaml b/config/samples/evpn-vxlan/evpn-vxlan-fabric.clab.yaml new file mode 100644 index 00000000..5a8b5ec0 --- /dev/null +++ b/config/samples/evpn-vxlan/evpn-vxlan-fabric.clab.yaml @@ -0,0 +1,95 @@ +name: evpn-vxlan-fabric +topology: + defaults: + kind: cisco_n9kv + kinds: + cisco_n9kv: + image: ${IMAGE:=vrnetlab/cisco_n9kv:9300-10.4.6} + # Note: Uncomment the following lines when running a N9kv-lite image. + # env: + # QEMU_MEMORY: 6144 # N9kv-lite requires minimum 6GB memory + # QEMU_SMP: 2 # N9kv-lite requires minimum 2 CPUs + linux: + image: ghcr.io/hellt/network-multitool + env: + PS1: '\h: ' + nodes: + spine1: + group: spine + startup-config: | + hostname spine1 + grpc port 9339 + interface Ethernet1/1-64 + shutdown + spine2: + group: spine + startup-config: | + hostname spine2 + grpc port 9339 + interface ethernet1/1-64 + shutdown + leaf1: + group: leaf + startup-config: | + hostname leaf1 + grpc port 9339 + interface Ethernet1/1-64 + shutdown + leaf2: + group: leaf + startup-config: | + hostname leaf2 + grpc port 9339 + interface Ethernet1/1-64 + shutdown + leaf3: + group: leaf + startup-config: | + hostname leaf3 + grpc port 9339 + interface Ethernet1/1-64 + shutdown + host1: + kind: linux + group: server + exec: + - ip link add name bond0 type bond + - ip link set dev bond0 address 00:00:00:00:00:01 + - echo 802.3ad >/sys/class/net/bond0/bonding/mode + - echo fast >/sys/class/net/bond0/bonding/lacp_rate + - ip link set dev eth1 down + - ip link set dev eth2 down + - ip link set dev eth1 master bond0 + - ip link set dev eth2 master bond0 + - ip link set dev eth1 up + - ip link set dev eth2 up + - ip link set dev bond0 up + - ip link add link bond0 name bond0.10 type vlan id 10 + - ip link set dev bond0.10 up + - ip addr add 192.168.10.1/24 dev bond0.10 + host2: + kind: linux + group: server + exec: + - ip link set dev eth1 up + - ip link set eth1 address 00:00:00:00:00:02 + - ip link add link eth1 name eth1.10 type vlan id 10 + - ip link set dev eth1.10 up + - ip addr add 192.168.10.2/24 dev eth1.10 + links: + # Spine 1 + - endpoints: ["spine1:eth1", "leaf1:eth1"] + - endpoints: ["spine1:eth2", "leaf2:eth1"] + - endpoints: ["spine1:eth3", "leaf3:eth1"] + # Spine 2 + - endpoints: ["spine2:eth1", "leaf1:eth2"] + - endpoints: ["spine2:eth2", "leaf2:eth2"] + - endpoints: ["spine2:eth3", "leaf3:eth2"] + # vPC + - endpoints: ["leaf1:eth30", "leaf2:eth30"] + - endpoints: ["leaf1:eth31", "leaf2:eth31"] + - endpoints: ["leaf1:eth32", "leaf2:eth32"] + # Host + - endpoints: ["leaf1:eth10", "host1:eth1"] + - endpoints: ["leaf2:eth10", "host1:eth2"] + - endpoints: ["leaf3:eth10", "host2:eth1"] diff --git a/config/samples/evpn-vxlan/kustomization.yaml b/config/samples/evpn-vxlan/kustomization.yaml new file mode 100644 index 00000000..90e6b2bc --- /dev/null +++ b/config/samples/evpn-vxlan/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- 01-devices +- 02-loopbacks +- 03-vpc-keepalive +- 04-vpc-peerlink +- 05-vpc-domain +- 06-interconnects +- 07-underlay +- 08-pim +- 09-bgp-router +- 10-bgp-peers +- 12-vlan +- 13-host +- 14-vxlan diff --git a/internal/provider/cisco/nxos/nve.go b/internal/provider/cisco/nxos/nve.go index c7ba4d00..8d4ed6b0 100644 --- a/internal/provider/cisco/nxos/nve.go +++ b/internal/provider/cisco/nxos/nve.go @@ -10,9 +10,11 @@ import ( "github.com/ironcore-dev/network-operator/internal/provider/cisco/gnmiext/v2" ) -var _ gnmiext.Configurable = (*NVE)(nil) -var _ gnmiext.Configurable = (*NVEInfraVLANs)(nil) -var _ gnmiext.Configurable = (*FabricFwd)(nil) +var ( + _ gnmiext.Configurable = (*NVE)(nil) + _ gnmiext.Configurable = (*NVEInfraVLANs)(nil) + _ gnmiext.Configurable = (*FabricFwd)(nil) +) // NVE represents the Network Virtualization Edge interface (nve1). // Note: NXOS only supports a single NVE interface with epId=1. @@ -108,7 +110,7 @@ type NVEInfraVLANs struct { InfraVLANList []*NVEInfraVLAN `json:"InfraVlan-list,omitempty"` } -func (n *NVEInfraVLANs) XPath() string { +func (*NVEInfraVLANs) XPath() string { return "System/pltfm-items/nve-items/NVE-list[id=1]/infravlan-items" } diff --git a/internal/provider/cisco/nxos/provider.go b/internal/provider/cisco/nxos/provider.go index 36827ae2..6e0b1f13 100644 --- a/internal/provider/cisco/nxos/provider.go +++ b/internal/provider/cisco/nxos/provider.go @@ -1990,10 +1990,9 @@ func (p *Provider) EnsureVRF(ctx context.Context, req *provider.VRFRequest) erro if req.VRF.Spec.Description != "" { v.Descr = NewOption(req.VRF.Spec.Description) } - v.Encap = "unknown" if req.VRF.Spec.VNI > 0 { v.L3Vni = true - v.Encap = "vxlan-" + strconv.FormatUint(uint64(req.VRF.Spec.VNI), 10) + v.Encap = NewOption("vxlan-" + strconv.FormatUint(uint64(req.VRF.Spec.VNI), 10)) } dom := new(VRFDom) @@ -2505,6 +2504,9 @@ func (p *Provider) EnsureNVE(ctx context.Context, req *provider.NVERequest) erro n.AdvertiseVmac = vc.Spec.AdvertiseVirtualMAC } + conf := make([]gnmiext.Configurable, 0, 3) + conf = append(conf, n) + iv := new(NVEInfraVLANs) for _, ivList := range vc.Spec.InfraVLANs { if ivList.ID != 0 { @@ -2516,13 +2518,27 @@ func (p *Provider) EnsureNVE(ctx context.Context, req *provider.NVERequest) erro } } + if len(iv.InfraVLANList) == 0 { + if err := p.client.GetConfig(ctx, iv); err != nil && !errors.Is(err, gnmiext.ErrNil) { + return err + } + if len(iv.InfraVLANList) != 0 { + if err := p.client.Delete(ctx, iv); err != nil { + return err + } + } + } else { + conf = append(conf, iv) + } + ag := new(FabricFwd) if req.NVE.Spec.AnycastGateway != nil { ag.AdminSt = string(AdminStEnabled) ag.Address = req.NVE.Spec.AnycastGateway.VirtualMAC } + conf = append(conf, ag) - return p.Patch(ctx, n, iv, ag) + return p.Patch(ctx, conf...) } func (p *Provider) DeleteNVE(ctx context.Context, req *provider.NVERequest) error { diff --git a/internal/provider/cisco/nxos/vrf.go b/internal/provider/cisco/nxos/vrf.go index 953e0baa..364be490 100644 --- a/internal/provider/cisco/nxos/vrf.go +++ b/internal/provider/cisco/nxos/vrf.go @@ -11,7 +11,7 @@ const DefaultVRFName = "default" var _ gnmiext.Configurable = (*VRF)(nil) type VRF struct { - Encap string `json:"encap"` + Encap Option[string] `json:"encap"` L3Vni bool `json:"l3vni"` Name string `json:"name"` Descr Option[string] `json:"descr"` diff --git a/internal/provider/cisco/nxos/vrf_test.go b/internal/provider/cisco/nxos/vrf_test.go index d2e99a84..8820e8b5 100644 --- a/internal/provider/cisco/nxos/vrf_test.go +++ b/internal/provider/cisco/nxos/vrf_test.go @@ -24,7 +24,7 @@ func init() { vrf := new(VRF) vrf.Name = "CC-CLOUD01" vrf.L3Vni = true - vrf.Encap = "vxlan-101" + vrf.Encap = NewOption("vxlan-101") vrf.Descr = NewOption("CC-CLOUD01 VRF") vrf.DomItems.DomList.Set(dom) Register("vrf", vrf)