|   | 53 | === Tutorial Setup === | 
          
          
            |   | 54 |  | 
          
          
            |   | 55 | Follow the steps below to gain access to the sandbox console and set up nodes with appropriate images. | 
          
          
            |   | 56 |  1. If you don't have one already, sign up for a [https://www.cosmos-lab.org/portal-2/ COSMOS account] | 
          
          
            |   | 57 |  1. [wiki:/GettingStarted#MakeaReservation Create a resource reservation] on COSMOS SB2 | 
          
          
            |   | 58 |  1. [Documentation/Short/Login Login] into sandbox console {{{console.sb2.cosmos-lab.org}}}) with **four** SSH sessions.  | 
          
          
            |   | 59 |  1. In **terminal 1**, make sure all the nodes and devices used in the experiment are turned off. Use the following command for SB2 | 
          
          
            |   | 60 |     {{{#!shell | 
          
          
            |   | 61 |     omf tell -a offh -t sdr1-s1-lg1,sdr1-md1,rfdev2-1,rfdev2-2,srv1-lg1 | 
          
          
            |   | 62 |     }}} | 
          
          
            |   | 63 |  1. Load {{{To_be_updated}}} on the server.   | 
          
          
            |   | 64 |     {{{#!shell | 
          
          
            |   | 65 |     omf load -i To_be_updated -t srv1-lg1 -r 0 | 
          
          
            |   | 66 |     }}} | 
          
          
            |   | 67 |  1. Turn all the required resources on and check the status of all the resources. Use the following commands for SB2. | 
          
          
            |   | 68 |     {{{#!shell | 
          
          
            |   | 69 |     omf tell -a on -t sdr1-s1-lg1,sdr1-md1,rfdev2-1,rfdev2-2,srv1-lg1 | 
          
          
            |   | 70 |     }}} | 
          
          
            |   | 71 |     {{{#!shell | 
          
          
            |   | 72 |     omf stat -t all | 
          
          
            |   | 73 |     }}} | 
          
          
            |   | 74 |  1. {{{ssh}}} to the server with option -Y for using GUI for our live demo.  | 
          
          
            |   | 75 |     {{{#!shell | 
          
          
            |   | 76 |     ssh -Y root@srv1-lg1 | 
          
          
            |   | 77 |     }}} | 
          
          
            |   | 78 |  1. In **all the ssh sessions** for {{{srv1-lg1}}}, use the following to source the correct environment.  | 
          
          
            |   | 79 |    {{{#!shell | 
          
          
            |   | 80 |    source /opt/intel/oneapi/setvars.sh --force --config="/opt/intel/oneapi/renew-config.txt" | 
          
          
            |   | 81 |    }}} | 
          
          
            |   | 82 |  | 
          
          
            |   | 83 | ==== Find and prepare USRPs  ==== | 
          
          
            |   | 84 | * Upon logging into the server, set up the 10G data interfaces DATA1, DATA2 in **terminal 1**.  | 
          
          
            |   | 85 |     {{{#!shell | 
          
          
            |   | 86 |     ifconfig DATA1 10.117.1.1 netmask 255.255.0.0 mtu 9000 up | 
          
          
            |   | 87 |     ifconfig DATA2 10.118.1.1 netmask 255.255.0.0 mtu 9000 up | 
          
          
            |   | 88 |     }}} | 
          
          
            |   | 89 |     {{{#!shell | 
          
          
            |   | 90 |     sudo sysctl -w net.core.rmem_max=536870912 | 
          
          
            |   | 91 |     sudo sysctl -w net.core.wmem_max=536870912 | 
          
          
            |   | 92 |     }}} | 
          
          
            |   | 93 |    After running the above commands, you should see that the data interfaces have the appropriate IP addresses assigned.  | 
          
          
            |   | 94 |    {{{#!shell | 
          
          
            |   | 95 | root@srv1-lg1:~# ifconfig DATA1 | 
          
          
            |   | 96 | DATA1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 | 
          
          
            |   | 97 |         inet6 fe80::1e34:daff:fe42:d4c  prefixlen 64  scopeid 0x20<link> | 
          
          
            |   | 98 |         ether 1c:34:da:42:0d:4c  txqueuelen 1000  (Ethernet) | 
          
          
            |   | 99 |         RX packets 21092  bytes 1881634 (1.8 MB) | 
          
          
            |   | 100 |         RX errors 0  dropped 19183  overruns 0  frame 0 | 
          
          
            |   | 101 |         TX packets 686  bytes 204975 (204.9 KB) | 
          
          
            |   | 102 |         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 | 
          
          
            |   | 103 | root@srv1-lg1:~# ifconfig DATA2 | 
          
          
            |   | 104 | DATA2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 | 
          
          
            |   | 105 |         inet6 fe80::1e34:daff:fe42:d4d  prefixlen 64  scopeid 0x20<link> | 
          
          
            |   | 106 |         ether 1c:34:da:42:0d:4d  txqueuelen 1000  (Ethernet) | 
          
          
            |   | 107 |         RX packets 21091  bytes 1881530 (1.8 MB) | 
          
          
            |   | 108 |         RX errors 0  dropped 19184  overruns 0  frame 0 | 
          
          
            |   | 109 |         TX packets 690  bytes 226549 (226.5 KB) | 
          
          
            |   | 110 |         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 | 
          
          
            |   | 111 |    }}} | 
          
          
            |   | 112 |  | 
          
          
            |   | 113 | * Run {{{uhd_find_devices}}} to make sure that both USRP N310s can be reached: | 
          
          
            |   | 114 |    {{{#!shell | 
          
          
            |   | 115 | [INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; UHD_4.1.0.HEAD-0-g25d617ca | 
          
          
            |   | 116 | -------------------------------------------------- | 
          
          
            |   | 117 | -- UHD Device 3 | 
          
          
            |   | 118 | -------------------------------------------------- | 
          
          
            |   | 119 | Device Address: | 
          
          
            |   | 120 |     serial: 315A35A | 
          
          
            |   | 121 |     addr: 10.117.2.1 | 
          
          
            |   | 122 |     claimed: False | 
          
          
            |   | 123 |     fpga: XG | 
          
          
            |   | 124 |     mgmt_addr: 10.116.2.1 | 
          
          
            |   | 125 |     mgmt_addr: 10.117.2.1 | 
          
          
            |   | 126 |     product: n310 | 
          
          
            |   | 127 |     type: n3xx | 
          
          
            |   | 128 |  | 
          
          
            |   | 129 |  | 
          
          
            |   | 130 | -------------------------------------------------- | 
          
          
            |   | 131 | -- UHD Device 4 | 
          
          
            |   | 132 | -------------------------------------------------- | 
          
          
            |   | 133 | Device Address: | 
          
          
            |   | 134 |     serial: 3176DF7 | 
          
          
            |   | 135 |     addr: 10.118.3.1 | 
          
          
            |   | 136 |     claimed: False | 
          
          
            |   | 137 |     fpga: XG | 
          
          
            |   | 138 |     mgmt_addr: 10.116.3.1 | 
          
          
            |   | 139 |     mgmt_addr: 10.118.3.1 | 
          
          
            |   | 140 |     product: n310 | 
          
          
            |   | 141 |     type: n3xx | 
          
          
            |   | 142 |    }}} | 
          
          
            |   | 143 |  | 
          
          
            |   | 144 |  |