blob: 88856bd842acc00c622b756825aabb81726ea88a [file] [log] [blame]
Matteo Scandolo9f619492019-10-25 13:11:58 -07001.. _BBSim Reflector:
2
3BBSim Reflector
4===============
5
6BBR (a.k.a BBSim Reflector) is a tool designed to scale test BBSim. It
7is responsible to emulate ONOS and VOLTHA in order to quickly reply to
8any message that BBSim sends.
9
10Here is a graph of the measuraments of BBSim performance captured over
1110 runs with different PON Layout
12
13.. figure:: ./_static/bbr_runs.png
14 :alt: BBSim Performances
15
16 BBSim Performances
17
18Run BBR
19-------
20
21To run ``bbr`` you need to have a ``bbsim`` instance running.
22
23You can start ``bbsim`` locally with:
24
25.. code:: bash
26
27 $ DOCKER_RUN_ARGS="-onu 16 -pon 4" make docker-run
28
29Once ``bbsim`` is up and running youll 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 Bozakov958d81c2019-12-13 22:09:48 +010039 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 Scandolo9f619492019-10-25 13:11:58 -070041
42At this point you can start ``bbr`` (note that you need to pass the same
43number 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
50the ONUs to the ``dhcp_ack`` state. If the ``bbr`` process doesnt exit,
51it means something went wrong.
52
53Debugging and issue reporting
54-----------------------------
55
56If you are experiencing issues with ``bbr`` please capture: - ``bbr``
57logs - ``bbsim`` logs - ``bbsimctl onu list`` output
58
59You can use these commands to capture ``bbsim`` and ``bbr`` logs during
60execution:
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
70And this command to retrieve the list of onus in the system (run this
71command once ``bbr`` is hanging but before terminating ``bbsim``):
72
73.. code:: bash
74
75 docker exec bbsim bbsimctl onu list > onu.list