Skip to content

Commit

Permalink
Adjusted openvswitch config
Browse files Browse the repository at this point in the history
- renamed R1_CMTS to R2_CMTS
  • Loading branch information
jaro0149 committed Apr 19, 2024
1 parent aea8024 commit 6be311b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 46 deletions.
10 changes: 0 additions & 10 deletions containerlab/frinx_topo_1/config_r1_pe1.partial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,6 @@ configure {
}
}
}
interface "to-bts" {
admin-state enable
port 1/1/c3/1
ipv4 {
primary {
address 120.0.0.1
prefix-length 16
}
}
}
ldp {
admin-state enable
interface-parameters {
Expand Down
27 changes: 7 additions & 20 deletions containerlab/frinx_topo_1/frinx_topo_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ topology:
mgmt-ipv4: 172.20.20.122
startup-config: config_r2_pe2.partial.txt

# Region 3
R1_CPE1:
image: vrnetlab/vr-xrv9k:5.3.4
kind: cisco_xrv9k
Expand All @@ -64,7 +63,6 @@ topology:
env:
RAM: 4096

# Region 4
R2_CPE1:
image: vrnetlab/vr-xrv9k:5.3.4
kind: cisco_xrv9k
Expand All @@ -81,22 +79,15 @@ topology:
env:
RAM: 4096

# openvswitch for Region 3
# openvswitch for Region 1
R1_OLT:
kind: ovs-bridge
mgmt-ipv4: 172.20.20.206

# openvswitch for Region 4
R1_CMTS:
# openvswitch for Region 2
R2_CMTS:
kind: ovs-bridge
mgmt-ipv4: 172.20.20.207

# # BTS
# BTS:
# image: bts
# kind: linux
# mgmt-ipv4: 172.20.20.201


links:
# Data center 1
Expand All @@ -111,19 +102,15 @@ topology:
- endpoints: [R2_PE1:eth2, C1:eth4]
- endpoints: [R2_PE2:eth2, C2:eth4]
- endpoints: [R2_PE1:eth1, R2_PE2:eth1]
- endpoints: [R2_PE1:eth3, R1_CMTS:ovsp6]
- endpoints: [R2_PE1:eth3, R2_CMTS:ovsp6]
# 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]

# openswitch to Region 3 and 4
# openswitch to Region 1 and 2
- endpoints: [R1_OLT:ovsp1, R1_CPE1:eth1]
- endpoints: [R1_OLT:ovsp2, R1_CPE2:eth1]
- endpoints: [R1_CMTS:ovsp4, R2_CPE1:eth1]
- endpoints: [R1_CMTS:ovsp5, R2_CPE2:eth1]


# # BTS
# - endpoints: ["BTS:eth1", "R1_PE1:eth3"]
- endpoints: [R2_CMTS:ovsp4, R2_CPE1:eth1]
- endpoints: [R2_CMTS:ovsp5, R2_CPE2:eth1]
2 changes: 1 addition & 1 deletion containerlab/openswitch1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# adding two bridges
ovs-vsctl add-br R1_OLT
ovs-vsctl add-br R1_CMTS
ovs-vsctl add-br R2_CMTS
18 changes: 5 additions & 13 deletions containerlab/openswitch2.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/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
Expand All @@ -11,20 +9,14 @@ 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 R1_CMTS lldp:enable=true
# port from R1_CMTS to R2_CPE1
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 R1_CMTS to R2_CPE2
# port from R2_CMTS to R2_CPE2
ovs-vsctl set interface ovsp5 lldp:enable=true
# port from R1_CMTS to R2_PE1
# port from R2_CMTS to R2_PE1
ovs-vsctl set interface ovsp6 lldp:enable=true


# add mapping to bridges
ovs-vsctl add-aa-mapping R1_OLT 0 0
ovs-vsctl add-aa-mapping R1_CMTS 0 0


# add name visible in LLDP table
ovs-vsctl set AutoAttach R1_OLT system_name="R1_OLT"
ovs-vsctl set AutoAttach R1_CMTS system_name="R1_CMTS"
ovs-vsctl set AutoAttach R2_CMTS system_name="R2_CMTS"
4 changes: 2 additions & 2 deletions containerlab/xr5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ replace by adjusted file attached in this folder



1. first add R1_OLT and R1_CMTS before deploying topology
1. first add R1_OLT and R2_CMTS before deploying topology
`sudo ./openswitch1.sh`

2. deploy topology by:
Expand Down Expand Up @@ -47,7 +47,7 @@ for deleting openvswitch port use:
`sudo ovs-vsctl del-port ovsp1`

for deleting openvswitch bridge use:
`sudo ovs-vsctl del-br R1_CMTS`
`sudo ovs-vsctl del-br R2_CMTS`

for manual adding port(this will be done by deploying topology):
`ovs-vsctl add-port R1_OLT ovsp1`
Expand Down

0 comments on commit 6be311b

Please sign in to comment.