Matteo Scandolo | f380a97 | 2020-09-11 12:09:40 -0700 | [diff] [blame] | 1 | BBSim Configuration |
| 2 | =================== |
| 3 | |
| 4 | BBSim startup options |
| 5 | --------------------- |
| 6 | |
| 7 | ``BBSim`` supports a series of options that can be set at startup, you can see |
| 8 | the list via ``./bbsim --help`` |
| 9 | |
| 10 | .. code:: bash |
| 11 | |
| 12 | $ ./bbsim --help |
Matteo Scandolo | 53b1a37 | 2022-01-11 15:20:06 -0800 | [diff] [blame] | 13 | Usage of ./bbsim: |
| 14 | -api_address string |
| 15 | IP address:port (default ":50070") |
| 16 | -authRetry |
| 17 | Set this flag if BBSim should retry EAPOL (Authentication) upon failure until success |
| 18 | -bp_format string |
| 19 | Bandwidth profile format, 'mef' or 'ietf' (default "mef") |
| 20 | -ca string |
| 21 | Set the mode for controlled activation of PON ports and ONUs (default "default") |
| 22 | -config string |
| 23 | Configuration file path (default "configs/bbsim.yaml") |
| 24 | -cpuprofile string |
| 25 | write cpu profile to file |
| 26 | -delay int |
| 27 | The delay between ONU DISCOVERY batches in milliseconds (1 ONU per each PON PORT at a time (default 200) |
| 28 | -dhcpRetry |
| 29 | Set this flag if BBSim should retry DHCP upon failure until success |
| 30 | -dmi_server_address string |
| 31 | IP address:port (default ":50075") |
| 32 | -enableEvents |
| 33 | Enable sending BBSim events on configured kafka server |
| 34 | -enableperf |
| 35 | Setting this flag will cause BBSim to not store data like traffic schedulers, flows of ONUs etc.. |
| 36 | -kafkaAddress string |
| 37 | IP:Port for kafka (default ":9092") |
| 38 | -kafkaEventTopic string |
| 39 | Ability to configure the topic on which BBSim publishes events on Kafka |
| 40 | -logCaller |
| 41 | Whether to print the caller filename or not |
| 42 | -logLevel string |
| 43 | Set the log level (trace, debug, info, warn, error) (default "debug") |
| 44 | -nni int |
| 45 | Number of NNI ports per OLT device to be emulated (default 1) |
Elia Battiston | 420c909 | 2022-02-02 12:17:54 +0100 | [diff] [blame^] | 46 | -nni_speed uint |
| 47 | Reported speed of the NNI ports in Mbps (default 1000) |
Matteo Scandolo | 53b1a37 | 2022-01-11 15:20:06 -0800 | [diff] [blame] | 48 | -oltRebootDelay int |
| 49 | Time that BBSim should before restarting after a reboot (default 60) |
| 50 | -olt_id int |
| 51 | OLT device ID |
| 52 | -omci_response_rate int |
| 53 | Amount of OMCI messages to respond to (default 10) |
| 54 | -onu int |
| 55 | Number of ONU devices per PON port to be emulated (default 1) |
| 56 | -openolt_address string |
| 57 | IP address:port (default ":50060") |
| 58 | -pon int |
| 59 | Number of PON ports per OLT device to be emulated (default 1) |
Elia Battiston | ac63b11 | 2022-01-12 18:40:49 +0100 | [diff] [blame] | 60 | -pots int |
| 61 | Number of POTS UNI Ports per ONU device to be emulated (default 0) |
Matteo Scandolo | 53b1a37 | 2022-01-11 15:20:06 -0800 | [diff] [blame] | 62 | -rest_api_address string |
| 63 | IP address:port (default ":50071") |
| 64 | -services string |
| 65 | Service Configuration file path (default "configs/att-services.yaml") |
| 66 | -uni int |
| 67 | Number of UNI Ports per ONU device to be emulated (default 4) |
| 68 | |
Matteo Scandolo | 9356670 | 2020-09-30 15:19:27 -0700 | [diff] [blame] | 69 | |
Matteo Scandolo | f380a97 | 2020-09-11 12:09:40 -0700 | [diff] [blame] | 70 | |
| 71 | |
| 72 | ``BBSim`` also looks for a configuration file in ``configs/bbsim.yaml`` from |
| 73 | which it reads a number of default settings. The command line options listed |
| 74 | above override the corresponding configuration file settings. A sample |
| 75 | configuration file is given below: |
| 76 | |
| 77 | .. literalinclude:: ../../configs/bbsim.yaml |
| 78 | |
| 79 | .. _ConfiguringServices: |
| 80 | |
| 81 | Configuring RG Services |
| 82 | ----------------------- |
| 83 | |
| 84 | BBSim supports different services in the RG. |
| 85 | Those services are described through a configuration file that is specified via the ``-services`` flag. |
| 86 | |
| 87 | Below are examples of the tree commonly used configurations: |
| 88 | |
| 89 | .. literalinclude:: ../../configs/att-services.yaml |
| 90 | |
| 91 | .. literalinclude:: ../../configs/dt-services.yaml |
| 92 | |
| 93 | .. literalinclude:: ../../configs/tt-services.yaml |
| 94 | |
| 95 | Controlled PON and ONU activation |
| 96 | --------------------------------- |
| 97 | |
| 98 | BBSim provides support for controlled PON and ONU activation. This gives you the ability |
| 99 | to manually enable PON Ports and ONUs as needed. |
| 100 | |
| 101 | By default both PON ports and ONUs are automatically activated when OLT is enabled. This can |
| 102 | be controlled using ``-ca`` option. |
| 103 | |
| 104 | ``-ca`` can be set to one of below four modes: |
| 105 | |
| 106 | - default: PON ports and ONUs are automatic activated (default behavior). |
| 107 | |
| 108 | - only-onu: PON ports automatically enabled and ONUs activated on demand |
| 109 | On Enable OLT, IntfIndications for all PON ports are sent but ONU discovery indications are not sent. |
| 110 | When PoweronONU request is received at BBSim API server then ONU discovery indication is sent for that ONU. |
| 111 | |
| 112 | - only-pon: PON ports enabled on demand and ONUs automatically activated |
| 113 | On Enable OLT, neither IntfIndications for PON ports nor ONU discovery indications are sent. |
| 114 | When EnablePonIf request is received at OpenOLT server, then that PON port is enabled and |
| 115 | IntfIndication is sent for that PON and all ONUs under that ports are discovered automatically. |
| 116 | |
| 117 | - both: Both PON ports and ONUs are activated on demand |
| 118 | On Enable OLT, neither IntfIndication for PON ports nor ONU discovery indications are sent. |
| 119 | When EnablePonIf request is received on OpenOLT server then |
| 120 | IntfIndication is sent for that PON but no ONU discovery indication |
| 121 | will be sent. |
| 122 | When PoweronONU request is received at BBSim API server then ONU discovery indication is sent for that ONU. |
| 123 | |
| 124 | Pon Port and ONU on demand activation is managed via ``BBSimCtl``. |
| 125 | You can find more information in the :ref:`Operations` page. |
| 126 | |
| 127 | Publishing BBSim Events on kafka |
| 128 | -------------------------------- |
| 129 | |
| 130 | BBSim provides option for publishing events on kafka. To publish events on |
| 131 | kafka, set BBSimEvents flag and configure kafkaAddress. |
| 132 | |
| 133 | Once BBSim is started, it will publish events (as and when they happen) on |
| 134 | topic ``BBSim-OLT-<id>-Events``. |
| 135 | |
| 136 | Types of Events: |
| 137 | - OLT-enable-received |
| 138 | - OLT-disable-received |
| 139 | - OLT-reboot-received |
| 140 | - OLT-reenable-received |
| 141 | - ONU-discovery-indication-sent |
| 142 | - ONU-activate-indication-received |
| 143 | - MIB-upload-received |
| 144 | - MIB-upload-done |
| 145 | - Flow-add-received |
| 146 | - Flow-remove-received |
| 147 | - ONU-authentication-done |
| 148 | - ONU-DHCP-ACK-received |
| 149 | |
| 150 | Sample output of kafkacat consumer for BBSim with OLT-ID 4: |
| 151 | |
| 152 | .. code:: bash |
| 153 | |
| 154 | $ kafkacat -b localhost:9092 -t BBSim-OLT-4-Events -C |
| 155 | {"EventType":"OLT-enable-received","OnuSerial":"","OltID":4,"IntfID":-1,"OnuID":-1,"EpochTime":1583152243144,"Timestamp":"2020-03-02 12:30:43.144449453"} |
| 156 | {"EventType":"ONU-discovery-indication-sent","OnuSerial":"BBSM00040001","OltID":4,"IntfID":0,"OnuID":0,"EpochTime":1583152243227,"Timestamp":"2020-03-02 12:30:43.227183506"} |
| 157 | {"EventType":"ONU-activate-indication-received","OnuSerial":"BBSM00040001","OltID":4,"IntfID":0,"OnuID":1,"EpochTime":1583152243248,"Timestamp":"2020-03-02 12:30:43.248225467"} |
Matteo Scandolo | 0e9fabf | 2020-09-30 17:19:27 -0700 | [diff] [blame] | 158 | {"EventType":"MIB-upload-received","OnuSerial":"BBSM00040001","OltID":4,"IntfID":0,"OnuID":1,"EpochTime":1583152243299,"Timestamp":"2020-03-02 12:30:43.299480183"} |