-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Improved UPF routing and NAT handling #38
base: master
Are you sure you want to change the base?
Enhancement: Improved UPF routing and NAT handling #38
Conversation
- Replaced static aether-ue-nat.service with dynamic aether-ue-nat.service.j2 - Updated install.yaml to use Jinja2 templating for NAT service - Improved 20-aether-core.network to dynamically add routes for additional UPFs - Modified add UPF module to check for existing routes before adding - Ensured consistent route management between core network and UPF installation Signed-off-by: hxngillani <h.shabir@studenti.unipi.it>
081a98a
to
fd8760a
Compare
Hi @hxngillani, thanks for your contribution Hi @llpeterson, @mbilal92, can you please review this PR? Thanks! |
{% if '1' in core.upf.additional_upfs %} \ | ||
sudo iptables -t nat -C POSTROUTING -s {{ core.upf.additional_upfs['1'].ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \ | ||
sudo iptables -t nat -A POSTROUTING -s {{ core.upf.additional_upfs['1'].ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \ | ||
{% endif %} \ | ||
{% if '2' in core.upf.additional_upfs %} \ | ||
sudo iptables -t nat -C POSTROUTING -s {{ core.upf.additional_upfs['2'].ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE || \ | ||
sudo iptables -t nat -A POSTROUTING -s {{ core.upf.additional_upfs['2'].ue_ip_pool }} -o {{ core.data_iface }} -j MASQUERADE; \ | ||
{% endif %} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if someone wants to deploy more than 2 additional UPFs? Would it be better to replace these if
statements by a for
loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for review great idea let me do that and test if it works will then amend in PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: hxngillani <h.shabir@studenti.unipi.it>
fd8760a
to
cea71ab
Compare
|
||
# ignore_errors: yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ignore_errors
is not used, I think it is better to just remove it
# ignore_errors: yes |
Enhancement: Dynamic UPF Routing and NAT Handling
Changes Made:
aether-ue-nat.service
withaether-ue-nat.service.j2
for dynamic NAT configuration..install.yaml
to generate the NAT service dynamically based on UPF configuration.20-aether-core.network
to dynamically add routes for additional UPFs.Why This Change?
aether-ue-nat.service
was static, meaning new UPFs required manual modifications.RTNETLINK answers: File exists
when adding new UPFs.Testing & Validation:
Notes for Reviewers: