1. 实验环境:
Celluar SDR:srsLTE
SDR 平台:USRP B210
PC 机操作系统:Ubuntu 14.04
2. 实验步骤
注意:以下操作步骤建立在srsLTE成功搭建的基础之上
Step 1:
Make sure that you’ve masqueraded the outgoing interface at the EPC. There is a convenience script for this at “srsLTE/srsepc/srsepc_if_mask.sh”.
如果你的 EPC 端物理网卡名称是“eth0”,在 EPC 端执行:
1 | sudo srsLTE/srsepc/srsepc_if_mask.sh eth0 |
Step 2:
Make sure you’ve set your default gateway at the UE. You can check your default gateway by doing “route -n” and you can add a gw by doing “route add default gw {SGI-IP-ADDRESS} {TUN-SRSUE-INTERFACE}”.
将 UE 端的默认网关设置为 EPC 端的 IP 地址。如果你的 EPC 端 IP 地址为 172.16.0.1,UE 端的虚拟网卡名称为 tun_srsue,在 UE 端执行:
1 | sudo route add default gw 172.16.0.1 tun_srsue |
Step 3:
If you are having DNS issues, make sure your DNS server is set up correctly. There is a discussion on how to do this for ubuntu here: https://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf
On ubuntu 16.04, what worked for me was to disable the network manager, update “/etc/resolvconf/resolv.conf.d/head” and run “sudo resolvconf -u”; but there are a few different ways to do this.
参考资料: