File tree Expand file tree Collapse file tree 4 files changed +12
-23
lines changed Expand file tree Collapse file tree 4 files changed +12
-23
lines changed Original file line number Diff line number Diff line change 68
68
when : inventory_hostname in groups['master_nodes']
69
69
become : true
70
70
71
+ - name : Disable GRO flag on the {{ core.data_iface }} interface
72
+ shell : ethtool -K {{ core.data_iface }} gro off
73
+ when : inventory_hostname in groups['master_nodes']
74
+ become : true
75
+
71
76
- name : find {{ core.data_iface }}'s netplan network directory
72
77
shell : basename $(find /*/systemd/network -maxdepth 1 -not -type d -name '*{{ core.data_iface }}.network' -print)
73
78
register : result
Original file line number Diff line number Diff line change @@ -8,16 +8,6 @@ Name=core
8
8
IPForward=yes
9
9
Address={{ core.upf.core_subnet }}
10
10
11
- # Default UPF Route
12
11
[Route]
13
12
Gateway={{ core.upf.default_upf.ip.core }}
14
- Destination={{ core.upf.default_upf.ue_ip_pool }}
15
-
16
- # Additional UPFs - Dynamically Generated Routes
17
- {% if core.upf.additional_upfs is defined and core.upf.additional_upfs %}
18
- {% for upf in core.upf.additional_upfs.values() %}
19
- [Route]
20
- Gateway={{ upf.ip.core }}
21
- Destination={{ upf.ue_ip_pool }}
22
- {% endfor %}
23
- {% endif %}
13
+ Destination={{ core.upf.default_upf.ue_ip_pool }}
Original file line number Diff line number Diff line change @@ -10,15 +10,11 @@ Type=oneshot
10
10
ExecStart=/bin/bash -c "\
11
11
sudo iptables -t nat -C POSTROUTING -s {{ core.upf.default_upf.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \
12
12
sudo iptables -t nat -A POSTROUTING -s {{ core.upf.default_upf.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \
13
- {% if '1' in core .upf .additional_upfs %} \
14
- sudo iptables -t nat -C POSTROUTING -s {{ core.upf.additional_upfs['1'] .ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \
15
- sudo iptables -t nat -A POSTROUTING -s {{ core.upf.additional_upfs['1'] .ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \
16
- {% endif %} \
17
- {% if '2' in core .upf .additional_upfs %} \
18
- sudo iptables -t nat -C POSTROUTING -s {{ core.upf.additional_upfs['2'] .ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \
19
- sudo iptables -t nat -A POSTROUTING -s {{ core.upf.additional_upfs['2'] .ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \
20
- {% endif %} \
13
+ {% for upf_key , upf_data in core .upf .additional_upfs .items () %} \
14
+ sudo iptables -t nat -C POSTROUTING -s {{ upf_data.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \
15
+ sudo iptables -t nat -A POSTROUTING -s {{ upf_data.ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \
16
+ {% endfor %} \
21
17
"
22
18
23
19
[Install]
24
- WantedBy=multi-user.target
20
+ WantedBy=sys-subsystem-net-devices-core.device
Original file line number Diff line number Diff line change 58
58
ip route add {{ item.value.ue_ip_pool }} via {{ item.value.ip.core }}
59
59
when : inventory_hostname in groups['master_nodes']
60
60
with_dict : " {{ core.upf.additional_upfs}}"
61
- become : true
62
-
63
- # ignore_errors: yes
61
+ become : true
You can’t perform that action at this time.
0 commit comments