Commit 4ab49901 authored by 吴洲洋's avatar 吴洲洋

delete script_bak

parent 082d98e1
#!/bin/bash
base=$(cd $(dirname $0); pwd)
UEIP=192.169.0.0
PREFIX=24
INTER=enp5s0f1
MAC=
VPPEXPORT=192.168.30.10
echo "$base"
echo "$UEIP"
echo "$PREFIX"
echo "$INTER"
echo "$MAC"
#./setuniarp vppout de:dd:91:00:f6:42 192.169.0.0/24
echo "$base"/setuniarp $INTER $MAC "$UEIP/$PREFIX"
"$base"/setuniarp $INTER $MAC "$UEIP/$PREFIX" $VPPEXPORT
#!/bin/bash
UE_IP=192.169.0.0
UE_IP_PREFIX=24
SNAT_INTER=enp67s0f0
SNAT_IP=192.168.2.129
VPPHOST=enp5s0f1
DPDK_EXPORT=enp3s0f0
DPDK_ENTRY=enp3s0f1
echo "$UE_IP"
echo "$UE_IP_PREFIX"
echo "$SNAT_INTER"
echo "$SNAT_IP"
echo "$VPPHOST"
echo "$DPDK_EXPORT"
echo "$DPDK_ENTRY"
echo start_ip_link `date` >> /opt/5gc/upf/ip_link.log
sudo ifconfig $DPDK_EXPORT down
sudo ifconfig $DPDK_ENTRY down
#vpphost
#sudo ifconfig $VPPHOST 192.168.30.11 up;
#sudo ifconfig $VPPHOST mtu 1400 up;
#sudo route add -net "$UE_IP/$UE_IP_PREFIX" dev $VPPHOST
#sudo route add -net "$UE_IP/$UE_IP_PREFIX" gateway 192.168.30.10
#nat interface
#sudo ifconfig "$SNAT_INTER" mtu 1400 up;
sudo ethtool -K "$SNAT_INTER" gro off;
sudo ethtool -K "$SNAT_INTER" tso off;
sudo ethtool -K "$SNAT_INTER" sg off;
#del
sudo iptables -t nat -D POSTROUTING -s "$UE_IP/$UE_IP_PREFIX" -j SNAT --to-source "$SNAT_IP"
iptables -t mangle -D POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o "$SNAT_INTER" -j TCPMSS --set-mss 1300
#add
sudo iptables -t nat -A POSTROUTING -s "$UE_IP/$UE_IP_PREFIX" -j SNAT --to-source "$SNAT_IP"
iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o "$SNAT_INTER" -j TCPMSS --set-mss 1300
#system
echo "1" > /proc/sys/net/ipv4/ip_forward
echo end_ip_link `date` >> /opt/5gc/upf/ip_link.log
This diff is collapsed.
这个文件调用 arp_config、nat_config等脚本,实现统一的upf配置。
\ No newline at end of file
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