From eaacab66e9bd61ef3829cd654114ccc2c8a2db34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20T=C3=B3th?= Date: Tue, 6 Aug 2024 15:13:54 +0200 Subject: [PATCH] Migrate Openvswitch devices to Aruba devices - reflecting the same configuration as before - using arubaoscx-disk-image-genericx86-p4-10.12.vmdk image - updated documentation --- containerlab/frinx_topo_1/README.md | 26 ++++---- containerlab/frinx_topo_1/assets/demo_lab.svg | 2 +- .../frinx_topo_1/config_r1_olt.partial.txt | 21 +++++++ .../frinx_topo_1/config_r2_cmts.partial.txt | 21 +++++++ .../frinx_topo_1/frinx_topo_1.clab.yml | 32 ++++++---- containerlab/frinx_topo_1/openswitch1.sh | 9 --- containerlab/frinx_topo_1/openswitch2.sh | 63 ------------------- 7 files changed, 78 insertions(+), 96 deletions(-) create mode 100644 containerlab/frinx_topo_1/config_r1_olt.partial.txt create mode 100644 containerlab/frinx_topo_1/config_r2_cmts.partial.txt delete mode 100755 containerlab/frinx_topo_1/openswitch1.sh delete mode 100755 containerlab/frinx_topo_1/openswitch2.sh diff --git a/containerlab/frinx_topo_1/README.md b/containerlab/frinx_topo_1/README.md index 51be2e6..5c4d7c1 100644 --- a/containerlab/frinx_topo_1/README.md +++ b/containerlab/frinx_topo_1/README.md @@ -6,7 +6,7 @@ It consists of MPLS core network, two regions with PE routers and connected CPE Device types: - Core, PE, and PTP GM routers: `vrnetlab/vr-sros:22.10.R7` - CPE routers: `vrnetlab/vr-xrv:6.0.1` -- OLT and CMTS switches: `openvswitch` +- OLT and CMTS switches: `vrnetlab/vr-aoscx:10.12` Configured protocols: - LDP @@ -44,6 +44,8 @@ for each configurable device in the topology: | R2_CPE2 | 172.20.20.205 | 22 | 830 | | | PTP_GM | 172.20.20.9 | 22 | 830 | 57400 | | PTP_GM_BACKUP | 172.20.20.8 | 22 | 830 | 57400 | +| R1_OLT | 172.20.20.206 | 22 | | | +| R2_CMTS | 172.20.20.207 | 22 | | | ## Building required docker images @@ -82,22 +84,24 @@ Requirements: 1. Copy 'iosxrv-k9-6.0.1.vmdk' file to the 'xrv' directory in the vrnetlab repository. 2. Build the docker image using `make docker-image` command. - Built docker image should have 'vr-xrv:6.0.1' tag. + Built docker image should have 'vrnetlab/vr-xrv:6.0.1' tag. + +### vrnetlab/vr-aoscx:10.12 + +Requirements: + +- arubaoscx-disk-image-genericx86-p4-10.12.vmdk image: Download the image from the Aruba support website. + +1. Copy 'arubaoscx-disk-image-genericx86-p4-10.12.vmdk' file to the 'aoscx' directory in the vrnetlab repository. +2. Build the docker image using `make docker-image` command. + Built docker image should have 'vrnetlab/vr-aoscx:10.12' tag. ## Startup process -To start the topology, run the following commands: +To start the topology, run the following command: ```bash -# create openvswitch bridges -sudo ./openswitch1.sh - -# deploy the containerlab topology sudo containerlab deploy - -# wait for the topology to start ... -# configure openvswitch ports -sudo ./openswitch2.sh ``` ## Stopping the topology diff --git a/containerlab/frinx_topo_1/assets/demo_lab.svg b/containerlab/frinx_topo_1/assets/demo_lab.svg index 46eb198..1ac8529 100644 --- a/containerlab/frinx_topo_1/assets/demo_lab.svg +++ b/containerlab/frinx_topo_1/assets/demo_lab.svg @@ -1 +1 @@ -BGPASN 65002BGPASN 65001eth1eth2.810.20.0.8/31eth2eth2.1010.20.0.10/31eth1eth5eth1eth5eth1.0eth110.10.0.0/31eth2eth3.010.20.0.0/31eth2eth3.210.20.0.2/31eth1.0eth110.30.0.0/31eth2eth4.410.20.0.4/31eth2eth4.610.20.0.6/31eth1.2eth110.30.0.2/31PTP_GMPTP_GM_BACKUPC11.1.1.1OSPFarea 0.0.0.0R1_PE24.4.4.4C22.2.2.2R2_PE26.6.6.6DC1_PE17.7.7.7R2_CMTSeth3.10.1eth3.20.1ovsp6TrunkR2_CPE1R2_CPE2eth1.10ovsp4VLAN 10eth1.10ovsp5VLAN 20R1_OLTR1_CPE1R1_CPE2eth3:10.1eth3.20.1ovsp3Trunketh1.10ovsp1VLAN 10eth1.10ovsp2VLAN20VLAN 10: 172.16.30.0/24VLAN 20: 172.16.40.0/24VLAN 10: 172.16.10.0/24VLAN 20: 172.16.20.0/24R1_PE13.3.3.3RRR2_PE15.5.5.5RRLo0: 192.168.10.1/25Lo1: 192.168.10.129/25Lo0: 192.168.20.1/25Lo1: 192.168.20.129/25Lo0: 192.168.30.1/25Lo1: 192.168.30.129/25Lo0: 192.168.40.1/25Lo1: 192.168.40.129/25 \ No newline at end of file +BGPASN 65002BGPASN 65001eth1eth2.810.20.0.8/31eth2eth2.1010.20.0.10/31eth1eth5eth1eth5eth1.0eth110.10.0.0/31eth2eth3.010.20.0.0/31eth2eth3.210.20.0.2/31eth1.0eth110.30.0.0/31eth2eth4.410.20.0.4/31eth2eth4.610.20.0.6/31eth1.2eth110.30.0.2/31PTP_GMPTP_GM_BACKUPC11.1.1.1OSPFarea 0.0.0.0R1_PE24.4.4.4C22.2.2.2R2_PE26.6.6.6DC1_PE17.7.7.7R2_CMTSeth3.10.1eth3.20.1eth1TrunkR2_CPE1R2_CPE2eth1.10eth2VLAN 10eth1.10eth3VLAN 20R1_OLTR1_CPE1R1_CPE2eth3:10.1eth3.20.1eth1Trunketh1.10eth1VLAN 10eth1.10eth2VLAN20VLAN 10: 172.16.30.0/24VLAN 20: 172.16.40.0/24VLAN 10: 172.16.10.0/24VLAN 20: 172.16.20.0/24R1_PE13.3.3.3RRR2_PE15.5.5.5RRLo0: 192.168.10.1/25Lo1: 192.168.10.129/25Lo0: 192.168.20.1/25Lo1: 192.168.20.129/25Lo0: 192.168.30.1/25Lo1: 192.168.30.129/25Lo0: 192.168.40.1/25Lo1: 192.168.40.129/25 \ No newline at end of file diff --git a/containerlab/frinx_topo_1/config_r1_olt.partial.txt b/containerlab/frinx_topo_1/config_r1_olt.partial.txt new file mode 100644 index 0000000..eba6a46 --- /dev/null +++ b/containerlab/frinx_topo_1/config_r1_olt.partial.txt @@ -0,0 +1,21 @@ +hostname R1-OLT +vlan 10 + name Customer1 + description Customer1 branch business network +vlan 20 + name Customer2 + description Customer2 branch business network +interface 1/1/1 + no shutdown + no routing + vlan trunk native 1 + vlan trunk allowed 10,20 +interface 1/1/2 + no shutdown + no routing + vlan access 10 +interface 1/1/3 + no shutdown + no routing + vlan access 20 + exit diff --git a/containerlab/frinx_topo_1/config_r2_cmts.partial.txt b/containerlab/frinx_topo_1/config_r2_cmts.partial.txt new file mode 100644 index 0000000..dcb4b39 --- /dev/null +++ b/containerlab/frinx_topo_1/config_r2_cmts.partial.txt @@ -0,0 +1,21 @@ +hostname R2-CMTS +vlan 10 + name Customer1 + description Customer1 branch business network +vlan 20 + name Customer2 + description Customer2 branch business network +interface 1/1/1 + no shutdown + no routing + vlan trunk native 1 + vlan trunk allowed 10,20 +interface 1/1/2 + no shutdown + no routing + vlan access 10 +interface 1/1/3 + no shutdown + no routing + vlan access 20 + exit diff --git a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml index 3b9e4f1..9ca0f43 100644 --- a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml +++ b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml @@ -78,15 +78,23 @@ topology: env: RAM: 4096 - # openvswitch for Region 1 + # switch for Region 1 R1_OLT: - kind: ovs-bridge + kind: aruba_aoscx + image: vrnetlab/vr-aoscx:10.12 mgmt-ipv4: 172.20.20.206 - - # openvswitch for Region 2 + startup-config: config_r1_olt.partial.txt + env: + RAM: 4096 + + # switch for Region 2 R2_CMTS: - kind: ovs-bridge + kind: aruba_aoscx + image: vrnetlab/vr-aoscx:10.12 mgmt-ipv4: 172.20.20.207 + startup-config: config_r2_cmts.partial.txt + env: + RAM: 4096 links: # Data center 1 @@ -96,20 +104,20 @@ topology: - endpoints: [R1_PE1:eth2, C1:eth3] - endpoints: [R1_PE2:eth2, C2:eth3] - endpoints: [R1_PE1:eth1, R1_PE2:eth1] - - endpoints: [R1_PE2:eth3, R1_OLT:ovsp3] + - endpoints: [R1_PE2:eth3, R1_OLT:eth1] # Region 2 - endpoints: [R2_PE1:eth2, C1:eth4] - endpoints: [R2_PE2:eth2, C2:eth4] - endpoints: [R2_PE1:eth1, R2_PE2:eth1] - - endpoints: [R2_PE1:eth3, R2_CMTS:ovsp6] + - endpoints: [R2_PE1:eth3, R2_CMTS:eth1] # core routers - endpoints: [C1:eth1, C2:eth1] # PTP grandmaster to core routers - endpoints: [PTP_GM:eth1, C1:eth5] - endpoints: [PTP_GM_BACKUP:eth1, C2:eth5] - # openvswitch to Region 1 and 2 - - endpoints: [R1_OLT:ovsp1, R1_CPE1:eth1] - - endpoints: [R1_OLT:ovsp2, R1_CPE2:eth1] - - endpoints: [R2_CMTS:ovsp4, R2_CPE1:eth1] - - endpoints: [R2_CMTS:ovsp5, R2_CPE2:eth1] + # switch to Region 1 and 2 + - endpoints: [R1_OLT:eth2, R1_CPE1:eth1] + - endpoints: [R1_OLT:eth3, R1_CPE2:eth1] + - endpoints: [R2_CMTS:eth2, R2_CPE1:eth1] + - endpoints: [R2_CMTS:eth3, R2_CPE2:eth1] diff --git a/containerlab/frinx_topo_1/openswitch1.sh b/containerlab/frinx_topo_1/openswitch1.sh deleted file mode 100755 index 01a512e..0000000 --- a/containerlab/frinx_topo_1/openswitch1.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# remove existing bridges -ovs-vsctl del-br R1_OLT -ovs-vsctl del-br R2_CMTS - -# adding two bridges -ovs-vsctl add-br R1_OLT -ovs-vsctl add-br R2_CMTS diff --git a/containerlab/frinx_topo_1/openswitch2.sh b/containerlab/frinx_topo_1/openswitch2.sh deleted file mode 100755 index 67acab9..0000000 --- a/containerlab/frinx_topo_1/openswitch2.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# enable LLDP on each port -ovs-vsctl set interface R1_OLT lldp:enable=true -# port from R1_OLT to R1_CPE1 -ovs-vsctl set interface ovsp1 lldp:enable=true -# port from R1_OLT to R1_CPE2 -ovs-vsctl set interface ovsp2 lldp:enable=true -# port from R1_OLT to R1_PE2 -ovs-vsctl set interface ovsp3 lldp:enable=true - -ovs-vsctl set interface R2_CMTS lldp:enable=true -# port from R2_CMTS to R2_CPE1 -ovs-vsctl set interface ovsp4 lldp:enable=true -# port from R2_CMTS to R2_CPE2 -ovs-vsctl set interface ovsp5 lldp:enable=true -# port from R2_CMTS to R2_PE1 -ovs-vsctl set interface ovsp6 lldp:enable=true - -# delete mappings -ovs-vsctl del-aa-mapping R1_OLT 1 1 -ovs-vsctl del-aa-mapping R2_CMTS 2 2 - -# add mapping to bridges -ovs-vsctl add-aa-mapping R1_OLT 1 1 -ovs-vsctl add-aa-mapping R2_CMTS 2 2 - -# add name visible in LLDP table -ovs-vsctl set AutoAttach R1_OLT system_name="R1_OLT" -ovs-vsctl set AutoAttach R2_CMTS system_name="R2_CMTS" - -ovs-vsctl set AutoAttach R1_OLT system_description="Region1_PE2_switch" -ovs-vsctl set AutoAttach R2_CMTS system_description="Region2_PE1_switch" - -# set VLAN access ports -ovs-vsctl clear port ovsp1 trunks -ovs-vsctl clear port ovsp2 trunks -ovs-vsctl clear port ovsp4 trunks -ovs-vsctl clear port ovsp5 trunks - -ovs-vsctl set port ovsp1 vlan_mode=access -ovs-vsctl set port ovsp2 vlan_mode=access -ovs-vsctl set port ovsp4 vlan_mode=access -ovs-vsctl set port ovsp5 vlan_mode=access - -ovs-vsctl set port ovsp1 tag=10 -ovs-vsctl set port ovsp2 tag=20 -ovs-vsctl set port ovsp4 tag=10 -ovs-vsctl set port ovsp5 tag=20 - -# set VLAN trunk ports -ovs-vsctl clear port ovsp3 trunks -ovs-vsctl clear port ovsp6 trunks - -ovs-vsctl set port ovsp3 trunks=10,20 -ovs-vsctl set port ovsp6 trunks=10,20 - -ovs-vsctl set port ovsp3 vlan_mode=trunk -ovs-vsctl set port ovsp6 vlan_mode=trunk - -# clear automatically created trunk ports -sudo ovs-vsctl clear port R2_CMTS trunks -sudo ovs-vsctl clear port R1_OLT trunks