Commit 79d351fb authored by Robert Schmidt's avatar Robert Schmidt

Upgrade IP addresses and routes for new faraday cage deployment

parent bf03abae
......@@ -1490,11 +1490,6 @@ class Containerize():
result = re.search('172.21.16.128', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev eno1', '\$', 10)
# Check if route to nepes gnb exists
mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10)
result = re.search('172.21.16.137', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.137 dev eno1', '\$', 10)
# Check if forwarding is enabled
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
......@@ -1564,16 +1559,39 @@ class Containerize():
mySSH.close()
if svrName == 'nepes':
mySSH.open(ipAddr, userName, password)
# Check if route to porcepix epc exists
mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10)
result = re.search('172.21.16.136', mySSH.getBefore())
# Check if route to porcepix epc exists: not necessary, is on same host
#mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10)
#result = re.search('172.21.16.136', mySSH.getBefore())
#if result is None:
# mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev enp0s31f6', '\$', 10)
# Check if X2 route to obelix enb exists: not necessary, gnb is on ofqot
#mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10)
#result = re.search('172.21.16.128', mySSH.getBefore())
#if result is None:
# mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev enp0s31f6', '\$', 10)
# Check if forwarding is enabled
# Check if route to ofqot gnb exists
mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10)
result = re.search('172.21.16.109', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev enp0s31f6', '\$', 10)
# Check if X2 route to obelix enb exists
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.109 dev enp0s31f6', '\$', 10)
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10)
# Check if iptables forwarding is accepted
mySSH.command('echo ' + password + ' | sudo -S iptables -L FORWARD', '\$', 10)
result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10)
mySSH.close()
if svrName == 'ofqot':
mySSH.open(ipAddr, userName, password)
# Check if X2 route to nepes enb/epc exists
mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10)
result = re.search('172.21.16.128', mySSH.getBefore())
result = re.search('172.21.16.137', mySSH.getBefore())
if result is None:
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev enp0s31f6', '\$', 10)
mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.137 dev enp2s0', '\$', 10)
# Check if forwarding is enabled
mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10)
result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore())
......
......@@ -20,7 +20,7 @@ services:
NB_PRB: 25
ENABLE_MEASUREMENT_REPORTS: 'yes'
ENABLE_X2: 'yes'
MME_S1C_IP_ADDRESS: 172.21.16.136
MME_S1C_IP_ADDRESS: 172.21.16.137
ENB_S1C_IF_NAME: eth0
ENB_S1C_IP_ADDRESS: 192.168.68.130
ENB_S1U_IF_NAME: eth0
......
......@@ -15,7 +15,7 @@ services:
TAC: 1
ENABLE_X2: 'yes'
ENB_X2_IP_ADDRESS: 192.168.68.130
MME_S1C_IP_ADDRESS: 172.21.16.136
MME_S1C_IP_ADDRESS: 172.21.16.137
GNB_S1C_IF_NAME: eth0
GNB_S1C_IP_ADDRESS: 192.168.68.194
GNB_S1U_IF_NAME: eth0
......
......@@ -15,7 +15,7 @@ services:
TAC: 1
NSSAI_SST: 1
NSSAI_SD0: 1
AMF_IP_ADDRESS: 172.21.16.136
AMF_IP_ADDRESS: 172.21.16.137
GNB_NGA_IF_NAME: eth0
GNB_NGA_IP_ADDRESS: 192.168.68.194
GNB_NGU_IF_NAME: eth0
......
......@@ -16,7 +16,7 @@ services:
NSSAI_SST: 1
NSSAI_SD0: 1
NSSAI_SD1: 2
AMF_IP_ADDRESS: 172.21.16.136
AMF_IP_ADDRESS: 172.21.16.137
GNB_NGA_IF_NAME: eth0
GNB_NGA_IP_ADDRESS: 192.168.68.194
GNB_NGU_IF_NAME: eth0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment