Change IPv6 subnet

This commit is contained in:
herlesupreeth
2021-05-06 17:15:27 +02:00
parent 8cd9871539
commit c2665ed3d0
4 changed files with 8 additions and 8 deletions

View File

@@ -18,13 +18,13 @@ smf:
- addr: 192.168.100.1/24
dnn: internet
dev: ogstun
- addr: fd84:6aea:c36e:2b69::1/48
- addr: 2001:230:cafe::1/48
dev: ogstun
dnn: internet
- addr: 192.168.101.1/24
dnn: ims
dev: ogstun2
- addr: fd1f:76f3:da9b:0101::1/48
- addr: 2001:230:babe::1/48
dnn: ims
dev: ogstun2
dns:

View File

@@ -31,7 +31,7 @@ import ipaddress
"""
Usage in command line:
e.g:
$ python3 tun_if.py --tun_ifname ogstun --ipv4_range 192.168.100.0/24 --ipv6_range fd84:6aea:c36e:2b69::/48
$ python3 tun_if.py --tun_ifname ogstun --ipv4_range 192.168.100.0/24 --ipv6_range 2001:230:cafe::/48
"""
def validate_ip_net(ctx, param, value):
@@ -52,7 +52,7 @@ def validate_ip_net(ctx, param, value):
@click.option('--ipv6_range',
required=True,
callback=validate_ip_net,
help='UE IPv6 Address range in CIDR format e.g. fd84:6aea:c36e:2b69::/48')
help='UE IPv6 Address range in CIDR format e.g. 2001:230:cafe::/48')
@click.option('--nat_rule',
default='yes',
help='Option specifying whether to add NATing iptables rule or not')

View File

@@ -13,13 +13,13 @@ upf:
- addr: 192.168.100.1/24
dev: ogstun
dnn: internet
- addr: fd84:6aea:c36e:2b69::1/48
- addr: 2001:230:cafe::1/48
dev: ogstun
dnn: internet
- addr: 192.168.101.1/24
dnn: ims
dev: ogstun2
- addr: fd1f:76f3:da9b:0101::1/48
- addr: 2001:230:babe::1/48
dnn: ims
dev: ogstun2

View File

@@ -31,8 +31,8 @@ export LANG=C.UTF-8
export IP_ADDR=$(awk 'END{print $1}' /etc/hosts)
export IF_NAME=$(ip r | awk '/default/ { print $5 }')
python3 /mnt/upf/tun_if.py --tun_ifname ogstun --ipv4_range 192.168.100.0/24 --ipv6_range fd84:6aea:c36e:2b69::/48
python3 /mnt/upf/tun_if.py --tun_ifname ogstun2 --ipv4_range 192.168.101.0/24 --ipv6_range fd1f:76f3:da9b:0101::/48 --nat_rule 'no'
python3 /mnt/upf/tun_if.py --tun_ifname ogstun --ipv4_range 192.168.100.0/24 --ipv6_range 2001:230:cafe::/48
python3 /mnt/upf/tun_if.py --tun_ifname ogstun2 --ipv4_range 192.168.101.0/24 --ipv6_range 2001:230:babe::/48 --nat_rule 'no'
cp /mnt/upf/upf.yaml install/etc/open5gs
sed -i 's|UPF_IP|'$UPF_IP'|g' install/etc/open5gs/upf.yaml