Skip to content

Commit

Permalink
Add Nextmn-Lite
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Dec 4, 2024
1 parent b5f3bc6 commit 3a632f4
Show file tree
Hide file tree
Showing 7 changed files with 395 additions and 223 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ set/dataplane/%: $(BCONFIG)
@echo Set dataplane to $(@F)
@./scripts/config_edit.py $(BCONFIG) --dataplane=$(@F)

.PHONY: set/controlplane
set/controlplane/%: $(BCONFIG)
@echo Set controlplane to $(@F)
@./scripts/config_edit.py $(BCONFIG) --controlplane=$(@F)
@# not yet implemented for free5gc/nextmn-upf => we set dataplane to nextmn-srv6
@$(MAKE) set/dataplane/nextmn-srv6

.PHONY: set/nb-edges
set/nb-edges/%: $(BCONFIG)
@echo Set number of edges to $(@F)
Expand Down
26 changes: 26 additions & 0 deletions default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config:
handover: false
dataplane: # ( nextmn-srv6 | free5gc | nextmn-upf)
- "nextmn-srv6"
controlplane: "free5gc" # ( free5gc | nextmn-lite )
log_level: "info"
full_debug: false

Expand All @@ -24,6 +25,15 @@ subnets:
gnb2:
ipv4_address: 10.1.0.130
ipv6_address: fd00:0:0:0:1:8000:0:3
uel1:
ipv4_address: 10.1.0.131
ipv6_address: fd00:0:0:0:1:8000:0:4
gnbl1:
ipv4_address: 10.1.0.132
ipv6_address: fd00:0:0:0:1:8000:0:5
gnbl2:
ipv4_address: 10.1.0.133
ipv6_address: fd00:0:0:0:1:8000:0:6
sbi:
amf:
ipv4_address: 10.1.1.129
Expand Down Expand Up @@ -76,6 +86,18 @@ subnets:
ipv4_address: 10.1.3.139
upfa2-nmn:
ipv4_address: 10.1.3.140
gnbl1:
ipv4_address: 10.1.3.141
ipv6_address: fd00:0:0:0:2:8000:0:7
gnbl2:
ipv4_address: 10.1.3.142
ipv6_address: fd00:0:0:0:2:8000:0:8
uel1:
ipv4_address: 10.1.3.143
ipv6_address: fd00:0:0:0:2:8000:0:9
cp-lite:
ipv4_address: 10.1.3.144
ipv6_address: fd00:0:0:0:2:8000:0:10
dataplane:
gnb1:
ipv4_address: 10.1.4.129
Expand All @@ -100,6 +122,10 @@ subnets:
ipv4_address: 10.1.4.136
upfa2-nmn:
ipv4_address: 10.1.4.137
gnbl1:
ipv4_address: 10.1.4.138
gnbl2:
ipv4_address: 10.1.4.139
edge:
r0:
ipv4_address: 10.1.5.129
Expand Down
162 changes: 86 additions & 76 deletions doc/addressing.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions scripts/config_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def increase_indent(self, flow=False, indentless=False):
)
parser.add_argument('buildconfig')
parser.add_argument('--dataplane')
parser.add_argument('--controlplane')
parser.add_argument('--nb-ue')
parser.add_argument('--nb-edges')
parser.add_argument('--log-level')
Expand All @@ -31,6 +32,7 @@ def increase_indent(self, flow=False, indentless=False):
parser.add_argument('--handover')
args = parser.parse_args()
ran = ('stable', 'dev')
controlplane = ('free5gc', 'nextmn-lite')
dataplane = ('free5gc', 'nextmn-upf', 'nextmn-srv6')
log_levels = ('trace', 'debug', 'info', 'warning', 'error', 'fatal', 'panic')
try:
Expand All @@ -52,6 +54,8 @@ def increase_indent(self, flow=False, indentless=False):
raise ConfigException('Invalid value for handover: must be a boolean')
if args.ran and (args.ran not in ran):
raise ConfigException(f'Invalid ran config: use one from {ran}')
if args.controlplane and (args.controlplane not in controlplane):
raise ConfigException(f'Invalid controlplane config: use one from {controlplane}')
except ConfigException as e:
print(f'Error: {e}', file=sys.stderr)
sys.exit(1)
Expand All @@ -61,6 +65,8 @@ def increase_indent(self, flow=False, indentless=False):
if args.dataplane:
dp = args.dataplane.split('+')
c['config']['topology']['dataplane'] = dp
if args.controlplane:
c['config']['topology']['controlplane'] = args.controlplane
if args.nb_ue:
c['config']['topology']['nb_ue'] = int(args.nb_ue)
if args.nb_edges:
Expand Down
2 changes: 0 additions & 2 deletions scripts/show_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
with open(args.config, 'r', encoding='utf-8') as f:
c = yaml.safe_load(f)
controller = f'http://[{c["subnets"]["control"]["srv6-ctrl"]["ipv6_address"]}]:8080'
rr = f'http://[{c["subnets"]["control"]["rr"]["ipv6_address"]}]:8080'
r0 = f'http://[{c["subnets"]["control"]["r0"]["ipv6_address"]}]:8080'
r1 = f'http://[{c["subnets"]["control"]["r1"]["ipv6_address"]}]:8080'
srgw = f'http://[{c["subnets"]["control"]["srgw0"]["ipv6_address"]}]:8080'
webbrowser.get('firefox').open_new_tab(f'{controller}/routers#controller')
webbrowser.get('firefox').open_new_tab(f'{rr}/rules#rr')
webbrowser.get('firefox').open_new_tab(f'{r0}/rules#r0')
webbrowser.get('firefox').open_new_tab(f'{r1}/rules#r1')
webbrowser.get('firefox').open_new_tab(f'{srgw}/rules#srgw')
Loading

0 comments on commit 3a632f4

Please sign in to comment.