please reference the OLT product documentation configuration examples
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100144353&id=EN-US_TASK_0142091147&lang=en
Configure GPON ONT profiles.
GPON ONT profiles include the DBA profile, line profile, service profile, and alarm profile.
The default GPON alarm profile 1 is used. The alarm thresholds for the default alarm profile are 0, which indicates that no alarm is generated.
In this example, the default alarm profile is used, and therefore the configuration of the alarm profile is not required.
Run the gpon alarm-profile add command to configure a GPON alarm profile, which is used for monitoring the performance of an activated ONT line.
GEM port 11 is used to carry management services.
GEM port 12 is used to carry voice services.
GEM port 13 is used to carry video services.
GEM port 14 is used to carry Internet access services.
DBA profile: A DBA profile describes the GPON traffic parameters. A T-CONT is bound to a DBA profile for dynamic bandwidth allocation, improving upstream bandwidth utilization.
Line profile: A line profile describes the binding between the T-CONT and the DBA profile, the QoS mode of the traffic stream, and the mapping between the GEM port and the ONT-side service.
Service profile: A service profile provides the service configuration channel for the ONT that is managed by using optical network terminal management and control interface (OMCI).
Alarm profile: An alarm profile contains a series of alarm thresholds to measure and monitor the performance of activated ONT lines. When a statistical value reaches the threshold, the host is notified and an alarm is reported to the log host and the NMS.
To change the default QoS mode, run the qos-mode command to set the QoS mode to gem-car or flow-car, and run the gem add command to set the index of the traffic profile bound to the GEM port.
When the QoS mode is priority-queue (PQ), the default queue priority is 0; when the QoS mode is flow-car or gem-car, traffic profile 6 is bound to the GEM port by default (no rate limitation).
Configure a DBA profile.
Run the display dba-profile command to query the existing DBA profiles in the system. If the existing DBA profiles in the system cannot meet the requirements, run the dba-profile add command to add a DBA profile.
huawei(config)#dba-profile add profile-name ftth_dba_mngt type1 fix 1024huawei(config)#dba-profile add profile-name ftth_dba_voip type2 assure 1024huawei(config)#dba-profile add profile-name ftth_dba_iptv type2 assure 1024huawei(config)#dba-profile add profile-name ftth_dba_hsi type4 max 32768

Select a DBA profile of the proper bandwidth type and configure proper bandwidth according to the service types and total user count of the ONT. Note that the sum of the fixed bandwidth and the assured bandwidth must not be greater than the total bandwidth of the PON port.
Configure an ONT line profile.
Create a GPON ONT line profile, named ftth, and bind it to the DBA profile.
huawei(config)#ont-lineprofile gpon profile-name ftthhuawei(config-gpon-lineprofile-1)#tcont 4 dba-profile-name ftth_dba_mngthuawei(config-gpon-lineprofile-1)#tcont 5 dba-profile-name ftth_dba_voiphuawei(config-gpon-lineprofile-1)#tcont 6 dba-profile-name ftth_dba_iptvhuawei(config-gpon-lineprofile-1)#tcont 7 dba-profile-name ftth_dba_hsi
Create different GEM ports according to different service types, in which
huawei(config-gpon-lineprofile-1)#gem add 11 eth tcont 4huawei(config-gpon-lineprofile-1)#gem add 12 eth tcont 5huawei(config-gpon-lineprofile-1)#gem add 13 eth tcont 6huawei(config-gpon-lineprofile-1)#gem add 14 eth tcont 7
After the configurations are complete, run the commit command to apply the parameters settings.
huawei(config-gpon-lineprofile-1)#commithuawei(config-gpon-lineprofile-1)#quit
Configure an ONT service profile.
Create a GPON ONT service profile, named ftth. Configure the capability set of the ETH port and POTS port to adaptive. Then the system automatically adapts to the ONT according to the actual capability of the online ONT.
huawei(config)#ont-srvprofile gpon profile-name ftthhuawei(config-gpon-srvprofile-1)#ont-port eth adaptive pots adaptive
After the configurations are complete, run the commit command to apply the parameters setting.
huawei(config-gpon-srvprofile-1)#commithuawei(config-gpon-srvprofile-1)#quit
(Optional) Add an alarm profile.
Add an ONT.
The procedures for configuring GPON, XG-PON, and XGS-PON services are the same. The difference lies in this step. Here, the GPON service is used as an example. When configuring XG-PON and XGS-PON services, you need to configure the ONT network-side interface type parameter (ont-type) in the ont add and ont confirm commands. Select a value based on the actual ONT capability or service data plan, for example, 10g/2.5g.
Connect two ONTs to GPON port 0/1/0. Set the ONT IDs to 1 and 2, SNs to 3230313126595540 and 6877687714852901, passwords to 0100000001 and 0100000002, discovery mode for password authentication to once-on, and management mode to OMCI. Bind the two ONTs to ONT line profile ftth and ONT service profile ftth.
There are two methods of adding an ONT: add an ONT offline and confirm an automatically discovered ONT.
Add ONTs offline.
If the password of an ONT is known, run the ont add command to add an ONT offline.
huawei(config)#interface gpon 0/1huawei(config-if-gpon-0/1)#ont add 0 1 password-auth 0100000001 once-on no-aging omci ont-lineprofile-name
ftth ont-srvprofile-name ftthhuawei(config-if-gpon-0/1)#ont add 0 2 password-auth 0100000002 once-on no-aging omci ont-lineprofile-name
ftth ont-srvprofile-name ftth
Confirm automatically discovered ONTs.
If the password or SN of an ONT is unknown, run the port portid ont-auto-find command in GPON mode to enable the ONT auto-discovery function of the GPON port. Then, run the ont confirm command to confirm the ONT.
huawei(config)#interface gpon 0/1huawei(config-if-gpon-0/1)#port 0 ont-auto-find enablehuawei(config-if-gpon-0/1)#display ont autofind 0
//After this command is executed, the information about all automatically discovered ONTs connected to the GPON port through optical splitters is displayed.
huawei(config-if-gpon-0/1)#ont confirm 0 ontid 1 sn-auth 3230313126595540 omci ont-lineprofile-name
ftth ont-srvprofile-name ftthhuawei(config-if-gpon-0/1)#ont confirm 0 ontid 2 sn-auth 6877687714852901 omci ont-lineprofile-name
ftth ont-srvprofile-name ftth

If multiple ONTs of the same type bound to the same line profile or service profile are connected to the same port, you can bulk add ONTs by bulk confirming automatically discovered ONTs to make configuration easier and more efficient. To do so, the preceding command can be modified as follows:
huawei(config-if-gpon-0/1)#ont confirm 0 all sn-auth omci ont-lineprofile-name ftth
ont-srvprofile-name ftth
(Optional) Bind the alarm profile to the ONT.
The default profile 1 is used in this example.
huawei(config-if-gpon-0/1)#ont alarm-profile 0 1 profile-id 1huawei(config-if-gpon-0/1)#ont alarm-profile 0 2 profile-id 1
Check ONT status.
After an ONT is added, run the display ont info command to query the current status of the ONT. Ensure that Config flag of the ONT is active, Run State is online, Config state is normal, and Match state is match.
huawei(config-if-gpon-0/1)#display ont info 0 1
---------------------------------------------------------------------
F/S/P : 0/1/0
ONT-ID : 1
Control flag : active //Indicates that the ONT is activated.
Run state : online //Indicates that the ONT goes online successfully.
Config state : normal //Indicates that the configuration state of the ONT is normal.
Match state : match //Indicates that the capability profile bound to the ONT is consistent with the actual capability of the ONT.
...//The rest of the response information is omitted.
When Config state is failed, Run state is offline, or Match state is mismatch:
If Control flag is deactivated, run the ont activate command in GPON mode to activate the ONT.
If Run state is offline, a physical line may be broken or the optical module may be damaged. Check the line and the optical module.
If Config state is failed, the configured ONT capability exceeds the actual ONT capability. In this case, run the display ont failed-configuration command in the diagnose mode to check the failed configuration item and the failure cause. Then, rectify the fault accordingly.