ngapIpList:# the IP list of N2 interfaces on this AMF -10.25.18.205 ... servedGuamiList:# Guami (Globally Unique AMF ID) list supported by this AMF # <GUAMI> = <MCC><MNC><AMF ID> -plmnId:# Public Land Mobile Network ID, <PLMN ID> = <MCC><MNC> mcc:466# Mobile Country Code (3 digits string, digit: 0~9) mnc:92# Mobile Network Code (2 or 3 digits string, digit: 0~9) amfId:cafe00# AMF identifier (3 bytes hex string, range: 000000~FFFFFF) supportTaiList:# the TAI (Tracking Area Identifier) list supported by this AMF -plmnId:# Public Land Mobile Network ID, <PLMN ID> = <MCC><MNC> mcc:466# Mobile Country Code (3 digits string, digit: 0~9) mnc:92# Mobile Network Code (2 or 3 digits string, digit: 0~9) tac:1# Tracking Area Code (uinteger, range: 0~16777215) plmnSupportList:# the PLMNs (Public land mobile network) list supported by this AMF -plmnId:# Public Land Mobile Network ID, <PLMN ID> = <MCC><MNC> mcc:466# Mobile Country Code (3 digits string, digit: 0~9) mnc:92# Mobile Network Code (2 or 3 digits string, digit: 0~9) snssaiList:# the S-NSSAI (Single Network Slice Selection Assistance Information) list supported by this AMF -sst:1# Slice/Service Type (uinteger, range: 0~255) sd:010203# Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) -sst:1# Slice/Service Type (uinteger, range: 0~255) sd:112233# Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
smfcfg.yaml
修改N3接口的IP地址:
1 2 3 4
interfaces:# Interface list for this UPF -interfaceType:N3# the type of the interface (N3 or N9) endpoints:# the IP address of this N3/N9 interface on this UPF -10.25.18.205
upfcfg.yaml
修改gtpude的N3接口的IP地址:
1 2 3 4 5 6 7 8 9
gtpu: forwarder:gtp5g # The IP list of the N3/N9 interfaces on this UPF # If there are multiple connection, set addr to 0.0.0.0 or list all the addresses ifList: -addr:10.25.18.205 type:N3 # name: upf.5gc.nctu.me # ifname: gtpif
OAI基站与射频仿真的安装与使用
下载编译源码
1 2 3 4 5 6
cd ~ git clone http://git.icfn.top/icfn-ai/oxg-ran.git cd oxg-ran cd cmake_targets ./build_oai -I --gNB --nrUE -w SIMU --ninja
创建Nets名称空间命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14
sudo ip netns delete ueNameSpace2 sudo ip link delete v-eth2 sudo ip netns add ueNameSpace2 sudo ip link add v-eth2 type veth peer name v-ue2 sudo ip linkset v-ue2 netns ueNameSpace2 sudo ip addr add 10.201.1.1/24 dev v-eth2 sudo ip linkset v-eth2 up sudo iptables -t nat -A POSTROUTING -s 10.201.1.0/255.255.255.0 -o {你上网的网卡名称} -j MASQUERADE sudo iptables -A FORWARD -i {你上网的网卡名称} -o v-eth2 -j ACCEPT sudo iptables -A FORWARD -o {你上网的网卡名称} -i v-eth2 -j ACCEPT sudo ip netns exec ueNameSpace2 ip linkset dev lo up sudo ip netns exec ueNameSpace2 ip addr add 10.201.1.2/24 dev v-ue2 sudo ip netns exec ueNameSpace2 ip linkset v-ue2 up