Skip to content

Commit b58af4b

Browse files
committed
clean up subnets
Signed-off-by: Larry Peterson <[email protected]>
1 parent b1400ee commit b58af4b

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

roles/core/templates/radio-5g-values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ omec-user-plane:
218218
ipam: static
219219
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
220220
iface: {{ core.data_iface }}
221-
gateway: 192.168.252.1
222-
ip: {{ core.upf.default_upf.ip.access }}
221+
gateway: {{ core.upf.access_subnet[:-3] }}
222+
ip: {{ core.upf.access_subnet }}
223223
core:
224224
ipam: static
225225
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
226226
iface: {{ core.data_iface }}
227-
gateway: 192.168.250.1
228-
ip: {{ core.upf.default_upf.ip.core }}
227+
gateway: {{ core.upf.core_subnet[:-3] }}
228+
ip: {{ core.upf.core_subnet }}
229229
cfgFiles:
230230
upf.jsonc:
231231
mode: af_packet # This mode implies no DPDK

roles/core/templates/sdcore-5g-sriov-values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ omec-user-plane:
325325
cniPlugin: vfioveth # Can be any other plugin. Dictates how IP address are assigned
326326
iface: {{ core.data_iface }}
327327
resourceName: "intel.com/intel_sriov_vfio_access"
328-
gateway: 192.168.252.1
329-
ip: {{ core.upf.default_upf.ip.access }}
328+
gateway: {{ core.upf.access_subnet[:-3] }}
329+
ip: {{ core.upf.access_subnet }}
330330
core:
331331
ipam: static
332332
cniPlugin: vfioveth # Can be any other plugin. Dictates how IP address are assigned
333333
iface: {{ core.data_iface }}
334334
resourceName: "intel.com/intel_sriov_vfio_core"
335-
gateway: 192.168.250.1
336-
ip: {{ core.upf.default_upf.ip.core }}
335+
gateway: {{ core.upf.core_subnet[:-3] }}
336+
ip: {{ core.upf.core_subnet }}
337337
cfgFiles:
338338
upf.jsonc:
339339
mode: dpdk

roles/core/templates/sdcore-5g-values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,14 @@ omec-user-plane:
323323
ipam: static
324324
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
325325
iface: {{ core.data_iface }}
326-
gateway: 192.168.252.1
327-
ip: {{ core.upf.default_upf.ip.access }}
326+
gateway: {{ core.upf.access_subnet[:-3] }}
327+
ip: {{ core.upf.access_subnet }}
328328
core:
329329
ipam: static
330330
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
331331
iface: {{ core.data_iface }}
332-
gateway: 192.168.250.1
333-
ip: {{ core.upf.default_upf.ip.core }}
332+
gateway: {{ core.upf.core_subnet[:-3] }}
333+
ip: {{ core.upf.core_subnet }}
334334
cfgFiles:
335335
upf.jsonc:
336336
mode: af_packet # This mode implies no DPDK

roles/router/tasks/uninstall.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
shell: |
111111
ip link del access || true
112112
ip link del core || true
113-
iptables -t nat -D POSTROUTING -s 172.250.0.0/16 -o {{ core.data_iface }} -j MASQUERADE || true
113+
iptables -t nat -D POSTROUTING -s {{ core.upf.default_upf.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || true
114114
when: inventory_hostname in groups['master_nodes']
115115
become: true
116116
ignore_errors: yes

roles/router/templates/systemd/20-aether-access.network

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Name=access
66

77
[Network]
88
IPForward=yes
9-
Address=192.168.252.1/24
9+
Address={{ core.upf.access_subnet }}

roles/router/templates/systemd/20-aether-core.network

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Name=core
66

77
[Network]
88
IPForward=yes
9-
Address=192.168.250.1/24
9+
Address={{ core.upf.core_subnet }}
1010

1111
[Route]
12-
Gateway=192.168.250.3
13-
Destination=172.250.0.0/16
12+
Gateway={{ core.upf.default_upf.ip.core }}
13+
Destination={{ core.upf.default_upf.ue_ip_pool }}

roles/router/templates/systemd/aether-ue-nat.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[Service]
55
Type=oneshot
6-
ExecStart=/bin/bash -c "sudo iptables -t nat -C POSTROUTING -s 172.250.0.0/16 -o {{ core.data_iface }} -j MASQUERADE || sudo iptables -t nat -A POSTROUTING -s 172.250.0.0/16 -o {{ core.data_iface }} -j MASQUERADE"
6+
ExecStart=/bin/bash -c "sudo iptables -t nat -C POSTROUTING -s {{ core.upf.default_upf.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || sudo iptables -t nat -A POSTROUTING -s {{ core.upf.default_upf.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE"
77

88
[Install]
99
WantedBy=sys-subsystem-net-devices-core.device

roles/upf/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
- name: configure route for upf traffic on gnbsim node
5454
shell: |
55-
ip route add {{ item.value.ue_ip_pool }} via {{ item.value.ip.core[:-3] }}
55+
ip route add {{ item.value.ue_ip_pool }} via {{ item.value.ip.core }}
5656
when: inventory_hostname in groups['master_nodes']
5757
with_dict: "{{ core.upf.additional_upfs}}"
5858
become: true

roles/upf/tasks/uninstall.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- name: delete route for upf to UE
44
shell: |
5-
ip route del {{ item.value.ue_ip_pool }} via {{ item.value.ip.core[:-3] }}
5+
ip route del {{ item.value.ue_ip_pool }} via {{ item.value.ip.core }}
66
when: inventory_hostname in groups['master_nodes']
77
with_dict: "{{ core.upf.additional_upfs}}"
88
become: true

roles/upf/templates/upf-5g-values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ config:
3131
ipam: static
3232
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
3333
iface: {{ core.data_iface }}
34-
gateway: 192.168.252.1
34+
gateway: {{ core.upf.access_subnet[:-3] }}
3535
ip: {{ upf_access_ip }}
3636
core:
3737
ipam: static
3838
cniPlugin: macvlan # Can be any other plugin. Dictates how IP address are assigned
3939
iface: {{ core.data_iface }}
40-
gateway: 192.168.250.1
40+
gateway: {{ core.upf.core_subnet[:-3] }}
4141
ip: {{ upf_core_ip }}
4242
cfgFiles:
4343
upf.jsonc:

0 commit comments

Comments
 (0)