From f915c9b15ffa3e1c845352969d0e0dd23492c6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bogu=C5=A1=C4=8Diak?= Date: Tue, 17 Sep 2024 10:25:10 +0200 Subject: [PATCH 1/2] Add support for OSPF update messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub Boguščiak --- containerlab/frinx_topo_1/.env | 8 +- .../frinx_topo_1/config_r1_pe2.partial.txt | 44 ++ .../config_r1_pe2.template.txt | 437 ++++++++++++++++++ .../frinx_topo_1/frinx_topo_1.clab.yml | 4 +- 4 files changed, 491 insertions(+), 2 deletions(-) create mode 100644 containerlab/frinx_topo_1/device_templates/config_r1_pe2.template.txt diff --git a/containerlab/frinx_topo_1/.env b/containerlab/frinx_topo_1/.env index 77332b1..9d36aca 100644 --- a/containerlab/frinx_topo_1/.env +++ b/containerlab/frinx_topo_1/.env @@ -2,4 +2,10 @@ R1_PE1_NEIGHBOR_IP=172.18.0.1 R1_PE1_STATIC_ROUTE=172.18.0.0/24 -R1_PE1_LOCAL_AS_NUMBER=100 \ No newline at end of file +R1_PE1_LOCAL_AS_NUMBER=100 + +##### R1_PE2 TEMPLATE VARIABLES + +R1_PE2_NEIGHBOR_IP=172.18.0.1 +R1_PE2_STATIC_ROUTE=172.18.0.0/24 +R1_PE2_LOCAL_AS_NUMBER=100 \ No newline at end of file diff --git a/containerlab/frinx_topo_1/config_r1_pe2.partial.txt b/containerlab/frinx_topo_1/config_r1_pe2.partial.txt index 72e7dcb..cbe8535 100644 --- a/containerlab/frinx_topo_1/config_r1_pe2.partial.txt +++ b/containerlab/frinx_topo_1/config_r1_pe2.partial.txt @@ -179,6 +179,17 @@ configure { } } } + interface "to-host" { + admin-state enable + port 1/1/c4/1 + ipv4 { + primary { + address 172.21.0.2 + prefix-length 30 + } + } + } + ldp { admin-state enable interface-parameters { @@ -235,6 +246,11 @@ configure { sr-te application-specific-link-attributes advertise-delay true } + database-export { + bgp-ls-identifier { + value 987654321 + } + } area 0.0.0.0 { interface "system" { admin-state enable @@ -273,6 +289,20 @@ configure { bgp { admin-state enable router-id 4.4.4.4 + link-state-route-export true + link-state-route-import true + group "SDN" { + admin-state enable + type internal + peer-as 100 + local-address 172.21.0.2 + family { + bgp-ls true + } + local-as { + as-number 100 + } + } group "eBGP" { admin-state enable multihop 5 @@ -303,6 +333,20 @@ configure { group "eBGP" peer-as 65002 } + neighbor "172.18.0.1" { + admin-state enable + group "SDN" + } + } + static-routes { + route 172.18.0.0/24 route-type unicast { + interface "to-host" { + admin-state enable + } + next-hop "172.21.0.1" { + admin-state enable + } + } } } diff --git a/containerlab/frinx_topo_1/device_templates/config_r1_pe2.template.txt b/containerlab/frinx_topo_1/device_templates/config_r1_pe2.template.txt new file mode 100644 index 0000000..58bf4cb --- /dev/null +++ b/containerlab/frinx_topo_1/device_templates/config_r1_pe2.template.txt @@ -0,0 +1,437 @@ +configure { + card 1 { + mda 1 { + sync-e true + } + } + port 1/1/c1 { + admin-state enable + connector { + breakout c4-10g + } + } + + port 1/1/c2 { + admin-state enable + connector { + breakout c4-10g + } + } + + port 1/1/c3 { + admin-state enable + connector { + breakout c4-10g + } + } + + port 1/1/c4 { + admin-state enable + connector { + breakout c4-10g + } + } + + port 1/1/c5 { + admin-state enable + connector { + breakout c4-10g + } + } + + port 1/1/c1/1 { + admin-state enable + ethernet { + lldp { + dest-mac nearest-bridge { + receive true + transmit true + tx-tlvs { + port-desc true + sys-name true + sys-desc true + sys-cap true + } + } + } + } + } + + port 1/1/c2/1 { + admin-state enable + ethernet { + lldp { + dest-mac nearest-bridge { + receive true + transmit true + tx-tlvs { + port-desc true + sys-name true + sys-desc true + sys-cap true + } + } + } + } + } + + port 1/1/c3/1 { + admin-state enable + ethernet { + encap-type dot1q + lldp { + dest-mac nearest-bridge { + receive true + transmit true + tx-tlvs { + port-desc true + sys-name true + sys-desc true + sys-cap true + } + } + } + } + } + port 1/1/c4/1 { + admin-state enable + ethernet { + lldp { + dest-mac nearest-bridge { + receive true + transmit true + tx-tlvs { + port-desc true + sys-name true + sys-desc true + sys-cap true + } + } + } + } + } + + port 1/1/c5/1 { + admin-state enable + ethernet { + lldp { + dest-mac nearest-bridge { + receive true + transmit true + tx-tlvs { + port-desc true + sys-name true + sys-desc true + sys-cap true + } + } + } + } + } + + router "Base" { + autonomous-system 65001 + interface "system" { + ipv4 { + primary { + address 4.4.4.4 + prefix-length 32 + } + } + } + interface "to-c2" { + admin-state enable + port 1/1/c2/1 + ipv4 { + primary { + address 10.20.0.3 + prefix-length 31 + } + } + } + interface "to-r1-pe1" { + admin-state enable + port 1/1/c1/1 + ipv4 { + primary { + address 10.30.0.1 + prefix-length 31 + } + } + } + interface "to-r1-cpe1" { + admin-state enable + port 1/1/c3/1:10 + ipv4 { + primary { + address 172.16.10.1 + prefix-length 24 + } + } + } + interface "to-r1-cpe2" { + admin-state enable + port 1/1/c3/1:20 + ipv4 { + primary { + address 172.16.20.1 + prefix-length 24 + } + } + } + interface "to-host" { + admin-state enable + port 1/1/c4/1 + ipv4 { + primary { + address 172.21.0.2 + prefix-length 30 + } + } + } + + ldp { + admin-state enable + interface-parameters { + interface "to-c2" { + admin-state enable + ipv4 { + admin-state enable + } + } + interface "to-r1-pe1" { + admin-state enable + ipv4 { + admin-state enable + } + } + } + } + rsvp { + admin-state enable + interface "to-c2" { + admin-state enable + } + interface "to-r1-pe1" { + admin-state enable + } + } + mpls { + admin-state enable + interface "to-c2" { + admin-state enable + } + interface "to-r1-pe1" { + admin-state enable + } + path "PATH_LOOSE" { + admin-state enable + } + lsp "to-r2-pe1" { + admin-state enable + type p2p-rsvp + from 4.4.4.4 + to 5.5.5.5 + path-computation-method local-cspf + primary "PATH_LOOSE" { + admin-state enable + } + } + } + ospf 0 { + admin-state enable + router-id 4.4.4.4 + traffic-engineering true + traffic-engineering-options { + sr-te application-specific-link-attributes + advertise-delay true + } + database-export { + bgp-ls-identifier { + value 987654321 + } + } + area 0.0.0.0 { + interface "system" { + admin-state enable + } + interface "to-c2" { + admin-state enable + interface-type point-to-point + } + interface "to-r1-pe1" { + admin-state enable + interface-type point-to-point + } + + } + } + isis 0 { + admin-state enable + level-capability 1 + traffic-engineering true + area-address [49.0001] + interface "to-c2" { + level-capability 1 + interface-type point-to-point + } + interface "to-r1-pe1" { + level-capability 1 + interface-type point-to-point + } + level 1 { + wide-metrics-only true + } + level 2 { + wide-metrics-only true + } + } + bgp { + admin-state enable + router-id 4.4.4.4 + link-state-route-export true + link-state-route-import true + group "SDN" { + admin-state enable + type internal + peer-as 100 + local-address 172.21.0.2 + family { + bgp-ls true + } + local-as { + as-number $R1_PE2_LOCAL_AS_NUMBER + } + } + group "eBGP" { + admin-state enable + multihop 5 + next-hop-self true + type external + split-horizon true + family { + ipv4 true + } + } + group "iBGP" { + admin-state enable + next-hop-self true + type internal + peer-as 65001 + local-address 4.4.4.4 + split-horizon true + family { + ipv4 true + } + } + neighbor "3.3.3.3" { + admin-state enable + group "iBGP" + } + neighbor "6.6.6.6" { + admin-state enable + group "eBGP" + peer-as 65002 + } + neighbor "$R1_PE2_NEIGHBOR_IP" { + admin-state enable + group "SDN" + } + } + static-routes { + route $R1_PE2_STATIC_ROUTE route-type unicast { + interface "to-host" { + admin-state enable + } + next-hop "172.21.0.1" { + admin-state enable + } + } + } + } + + system { + location "Borinka Station" + coordinates "[17.09604, 48.25966]" + + ptp { + admin-state enable + clock-type boundary + profile ieee1588-2008 + port 1/1/c1/1 { + admin-state enable + } + port 1/1/c2/1 { + admin-state enable + } + port 1/1/c3/1 { + admin-state enable + } + port 1/1/c4/1 { + admin-state enable + } + port 1/1/c5/1 { + admin-state enable + } + } + + central-frequency-clock { + ref1 { + admin-state enable + source-port 1/1/c2/1 + } + } + + lldp { + admin-state enable + } + grpc { + admin-state enable + allow-unsecure-connection + gnmi { + admin-state enable + auto-config-save true + } + rib-api { + admin-state enable + } + } + security { + aaa { + local-profiles { + profile "grpc" { + default-action permit-all + grpc { + rpc-authorization { + gnmi-capabilities permit + gnmi-get permit + gnmi-set permit + gnmi-subscribe permit + rib-api-getversion permit + rib-api-modify permit + } + } + } + } + } + + user-params { + local-user { + user "admin" { + access { + console true + ftp true + snmp true + netconf true + grpc true + } + console { + member ["administrative" "grpc"] + } + + } + } + } + } + } +} diff --git a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml index 34035da..0c3cafb 100644 --- a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml +++ b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml @@ -3,7 +3,7 @@ name: frinx_topo_1 topology: defaults: kind: nokia_sros - image: frinx/vr-sros:22.10.R7 + image: vrnetlab/vr-sros:22.10.R7 license: ../frinx_topo_1/sros.license config: vars: @@ -14,6 +14,7 @@ topology: kind: host exec: - ip addr add local 172.19.0.1/30 dev r1_pe1_eth3 + - ip addr add local 172.21.0.1/30 dev r1_pe2_eth4 # PTP & SyncE GMs PTP_GM: mgmt-ipv4: 172.20.20.9 @@ -121,3 +122,4 @@ topology: # Create connection between Host and device in containerlab - endpoints: [HOST:r1_pe1_eth3, R1_PE1:eth3] + - endpoints: [HOST:r1_pe2_eth4, R1_PE2:eth4] From aab716871f5eafcf688bcb40420f9b793b88c2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bogu=C5=A1=C4=8Diak?= Date: Tue, 17 Sep 2024 10:26:11 +0200 Subject: [PATCH 2/2] Revert image name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub Boguščiak --- containerlab/frinx_topo_1/frinx_topo_1.clab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml index 0c3cafb..862680f 100644 --- a/containerlab/frinx_topo_1/frinx_topo_1.clab.yml +++ b/containerlab/frinx_topo_1/frinx_topo_1.clab.yml @@ -3,7 +3,7 @@ name: frinx_topo_1 topology: defaults: kind: nokia_sros - image: vrnetlab/vr-sros:22.10.R7 + image: frinx/vr-sros:22.10.R7 license: ../frinx_topo_1/sros.license config: vars: