Matteo Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 1 | .. _BBSim Reflector: |
| 2 | |
| 3 | BBSim Reflector |
| 4 | =============== |
| 5 | |
| 6 | BBR (a.k.a BBSim Reflector) is a tool designed to scale test BBSim. It |
| 7 | is responsible to emulate ONOS and VOLTHA in order to quickly reply to |
| 8 | any message that BBSim sends. |
| 9 | |
| 10 | Here is a graph of the measuraments of BBSim performance captured over |
| 11 | 10 runs with different PON Layout |
| 12 | |
| 13 | .. figure:: ./_static/bbr_runs.png |
| 14 | :alt: BBSim Performances |
| 15 | |
| 16 | BBSim Performances |
| 17 | |
| 18 | Run BBR |
| 19 | ------- |
| 20 | |
| 21 | To run ``bbr`` you need to have a ``bbsim`` instance running. |
| 22 | |
| 23 | You can start ``bbsim`` locally with: |
| 24 | |
| 25 | .. code:: bash |
| 26 | |
| 27 | $ DOCKER_RUN_ARGS="-onu 16 -pon 4" make docker-run |
| 28 | |
| 29 | Once ``bbsim`` is up and running you’ll see this on the console: |
| 30 | |
| 31 | .. code:: bash |
| 32 | |
| 33 | docker run -p 50070:50070 -p 50060:50060 --privileged --rm --name bbsim """"bbsim:0.0.2-dev /app/bbsim -onu 16 -pon 4 |
| 34 | time="2019-10-18T00:24:46Z" level=info msg="BroadBand Simulator is on" NumNniPerOlt=1 NumOnuPerPon=16 NumPonPerOlt=4 OltID=0 |
| 35 | time="2019-10-18T00:24:46Z" level=debug msg=CreateOLT ID=0 NumNni=1 NumOnuPerPon=16 NumPon=4 module=OLT |
| 36 | time="2019-10-18T00:24:46Z" level=info msg="Successfully activated DHCP Server" module=NNI |
| 37 | time="2019-10-18T00:24:46Z" level=debug msg="Created OLT with id: 0" |
| 38 | time="2019-10-18T00:24:46Z" level=debug msg="Started APIService" |
Zdravko Bozakov | 958d81c | 2019-12-13 22:09:48 +0100 | [diff] [blame] | 39 | time="2019-10-18T00:24:46Z" level=debug msg="APIServer Listening on 0.0.0.0:50070" |
| 40 | time="2019-10-18T00:24:46Z" level=debug msg="OLT Listening on 0.0.0.0:50060" module=OLT |
Matteo Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 41 | |
| 42 | At this point you can start ``bbr`` (note that you need to pass the same |
| 43 | number of ONUs and PON Ports to the two processes): |
| 44 | |
| 45 | .. code:: bash |
| 46 | |
| 47 | $ ./bbr -onu 16 -pon 4 |
| 48 | |
| 49 | ``bbr`` will run to completion and output the time it took to bring all |
| 50 | the ONUs to the ``dhcp_ack`` state. If the ``bbr`` process doesn’t exit, |
| 51 | it means something went wrong. |
| 52 | |
| 53 | Debugging and issue reporting |
| 54 | ----------------------------- |
| 55 | |
| 56 | If you are experiencing issues with ``bbr`` please capture: - ``bbr`` |
| 57 | logs - ``bbsim`` logs - ``bbsimctl onu list`` output |
| 58 | |
| 59 | You can use these commands to capture ``bbsim`` and ``bbr`` logs during |
| 60 | execution: |
| 61 | |
| 62 | .. code:: bash |
| 63 | |
| 64 | $ DOCKER_RUN_ARGS="-onu 16 -pon 4" make docker-run 2>&1 | tee bbsim.logs |
| 65 | |
| 66 | .. code:: bash |
| 67 | |
| 68 | $ ./bbr -onu 16 -pon 4 2>&1 | tee bbr.logs |
| 69 | |
| 70 | And this command to retrieve the list of onus in the system (run this |
| 71 | command once ``bbr`` is hanging but before terminating ``bbsim``): |
| 72 | |
| 73 | .. code:: bash |
| 74 | |
| 75 | docker exec bbsim bbsimctl onu list > onu.list |