45 | | The NR Platform will automatically “connect” a link between the gNB and UR. This can be verified via the NR GUI |
| 49 | The two scripts will start the appropriate firmware on both NR Platform devices and setup routing to push the test traffic from the server that is attached to UE through the 5G-NR link. The NR Platform will automatically “connect” a link between the gNB and UR. This can be verified via the NR GUI |
| 50 | |
| 51 | The two scripts are shown in the table below: |
| 52 | |
| 53 | {{{#!td align=center |
| 54 | setup_gNodeB.sh |
| 55 | }}} |
| 56 | |--------------- |
| 57 | {{{#!td |
| 58 | {{{ |
| 59 | #!/bin/bash |
| 60 | # Start the gNodeB on the MPU |
| 61 | sshpass -p "root" ssh -o StrictHostKeyChecking=no root@192.168.1.2 "sh /home/root/start_all.sh &" |
| 62 | # Turn on routing |
| 63 | echo 1 > /proc/sys/net/ipv4/ip_forward |
| 64 | sysctl -w net.ipv4.ip_no_pmtu_disc=1 |
| 65 | # Add rotuing for the two subnets "behind" the gNodeB |
| 66 | ip route add 192.168.2.0/24 via 192.168.1.2 |
| 67 | ip route add 192.168.3.0/24 via 192.168.1.2 |
| 68 | # and configure NAT for them |
| 69 | iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE |
| 70 | iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT |
| 71 | iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT |
| 72 | }}} |
| 73 | }}} |
| 74 | |--------------- |
| 75 | {{{#!td align=center |
| 76 | setup_UE.sh |
| 77 | }}} |
| 78 | |--------------- |
| 79 | {{{#!td |
| 80 | {{{ |
| 81 | #!/bin/bash |
| 82 | # Start the UE on the MPU |
| 83 | sshpass -p "root" ssh -o StrictHostKeyChecking=no root@192.168.2.1 "sh /home/root/start_all.sh &" |
| 84 | # Turn on routing |
| 85 | echo 1 > /proc/sys/net/ipv4/ip_forward |
| 86 | sysctl -w net.ipv4.ip_no_pmtu_disc=1 |
| 87 | # Route all internal 5G traffic through MPU |
| 88 | ip route add 192.168.1.0/24 via 192.168.2.1 dev eth0 |
| 89 | # Except for the testbed bound traffic |
| 90 | ip r add 10/8 dev eth1 |
| 91 | # Everything else goes over 5G ink |
| 92 | ip r add default via 192.168.1.1 |
| 93 | }}} |
| 94 | }}} |