Commit 444bd85d authored by 吴洲洋's avatar 吴洲洋

update gtpu export ip and gtpu entry ip

parent f89a03ef
set interface state GigabitEthernet2/2/0 up
set interface ip address GigabitEthernet2/2/0 192.168.10.10/24
set interface state GigabitEthernet2/4/0 up
set interface ip address GigabitEthernet2/4/0 192.168.30.10/24
set interface state GigabitEthernet2/3/0 up
set interface ip address GigabitEthernet2/3/0 192.168.30.10/24
ip route add 0.0.0.0/0 via GigabitEthernet2/3/0
set interface state GigabitEthernet2/5/0 up
set interface ip address GigabitEthernet2/5/0 192.168.50.10/24
ip route add 0.0.0.0/0 via GigabitEthernet2/5/0
......
gnb: 192.168.10.10
smf : 192.168.2.58
upf : 192.168.2.209
upf : 192.168.2.123
logSize : 100
......@@ -31,7 +31,7 @@ cpu {
## Set logical CPU core where main thread runs, if main core is not set
## VPP will use core 1 if available
main-core 3
main-core 14
## Set logical CPU core(s) where worker threads are running
#corelist-workers 2-3
......@@ -97,8 +97,8 @@ dpdk {
#82576 1G
dev 0000:02:02.0
dev 0000:02:03.0
dev 0000:02:04.0
dev 0000:02:05.0
## Whitelist specific interface by specifying PCI address and in
## addition specify custom parameters for this interface
......
gnb:
username: root
password: 123456
remoteHost: 192.168.2.128
inter: eno1
smf:
username: root
password: 123456
remoteHost: 192.168.2.63
inter: ens33
udm:
username: root
password: 123456
remoteHost: 192.168.2.63
amf:
username: root
password: 123456
remoteHost: 192.168.2.63
inter: ens33
upf:
username: root
password:
remoteHost: 192.168.2.133
vppinter: enp5s0
n4inter: enp14s0
vppEntry: TenGigabitEthernet2/0/0
vppExport: TenGigabitEthernet2/0/1
gateway: ens4f1
vppWatch: /opt/5gc/support-system/watch/upf_watch
tcpdump: true
reboot: true
runScript: /opt/5gc/support-system/test_start_5g.sh
set interface state @gtpu_entry@ up
set interface ip address @gtpu_entry@ 192.168.10.10/24
set interface ip address @gtpu_entry@ @gtpu_entry_ip@/24
set interface state @gtpu_export@ up
set interface ip address @gtpu_export@ 192.168.30.10/24
set interface ip address @gtpu_export@ @gtpu_export_ip@/24
ip route add 0.0.0.0/0 via @gtpu_export@
......
vpp:
system:
gtpu_entry: GigabitEthernet2/2/0
gtpu_export: GigabitEthernet2/3/0
gtpu_entry: GigabitEthernet2/4/0
gtpu_export: GigabitEthernet2/5/0
gtpu_entry_ip: 192.168.30.10
gtpu_export_ip: 192.168.50.10
ip_link:
ueip: 192.169.0.0
ueIPPrefix: 24
snatInter: ens33
snatIP: 192.168.2.209
vppHost: ens36
vppHostIP: 192.168.30.10
gtpu_entry: ens34
gtpu_export: ens35
snatInter: ens32
snatIP: 192.168.2.123
vppHost: ens38
gtpu_entry: ens36
gtpu_export: ens37
startup:
pci_addr_id_entry: 02:02.0
pci_addr_id_export: 02:03.0
pci_addr_id_entry: 02:04.0
pci_addr_id_export: 02:05.0
vpp_plugins_path: /usr/lib/x86_64-linux-gnu/vpp_plugins
drive: e1000
n4:
......
No preview for this file type
This diff is collapsed.
......@@ -32,6 +32,9 @@ DPDK_ENTRY=""
TUNNELPATH="/opt/5gc/upf/n4-beta"
DPDK_ENTRY_PCI=""
DPDK_EXPORT_PCI=""
DRIVE=""
function init_configure(){
yaml="$1"
# vpp
......@@ -46,7 +49,7 @@ function init_configure(){
UEIP=$($current/yq r $yaml vpp.ip_link.ueip)
PREFIX=$($current/yq r $yaml vpp.ip_link.ueIPPrefix)
INTER=$($current/yq r $yaml vpp.ip_link.vppHost)
VPPEXPORT=$($current/yq r $yaml vpp.ip_link.vppHostIP)
VPPEXPORT=$($current/yq r $yaml vpp.system.gtpu_export_ip)
MAC=$(ifconfig $INTER|grep ether|awk '{print $2}')
# nat
UE_IP=$($current/yq r $yaml vpp.ip_link.ueip)
......@@ -56,7 +59,10 @@ function init_configure(){
VPPHOST=$($current/yq r $yaml vpp.ip_link.vppHost)
DPDK_EXPORT=$($current/yq r $yaml vpp.ip_link.gtpu_export)
DPDK_ENTRY=$($current/yq r $yaml vpp.ip_link.gtpu_entry)
DPDK_ENTRY_PCI=$($current/yq r $yaml vpp.startup.pci_addr_id_entry)
DPDK_EXPORT_PCI=$($current/yq r $yaml vpp.startup.pci_addr_id_export)
DRIVE=$($current/yq r $yaml vpp.startup.drive)
}
function start_vpp() {
......@@ -199,6 +205,23 @@ function install_depence(){
cp $base/plugin/replace/replace $current > /dev/null 2>&1
}
function unbind(){
python3 $current/dpdk-devbind.py -u 0000:$DPDK_EXPORT_PCI ;
python3 $current/dpdk-devbind.py -u 0000:$DPDK_EXPORT_PCI;
python3 $current/dpdk-devbind.py -b $DRIVE $DPDK_EXPORT_PCI
sleep 1
python3 $current/dpdk-devbind.py -b $DRIVE $DPDK_EXPORT_PCI
sleep 1
ifconfig $DPDK_EXPORT down;
sleep 1
ifconfig $DPDK_ENTRY down;
sleep 1
}
function main() {
install_depence
......@@ -221,6 +244,7 @@ function main() {
close_vpp
close_n4
close_arp
# unbind
shift
;;
esac
......
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