A method for registering an optical network unit, ONU, to an optical line terminal, OLT, in a passive optical network, PON, wherein the OLT has a plurality of PON boards, each of the plurality of PON boards has a plurality of PON ports, each of the plurality of PON ports is configured with a service data table which comprises a plurality of data resources, characterised in that , the method comprises: acquiring (S21), by the OLT, a registration request of the ONU to be registered, and acquiring a serial number, SN, of the ONU to be registered and information about the PON port connected to the ONU to be registered and information about a slot in which the PON board having the PON port is plugged according to the registration request; and searching (S22), by the OLT, the service data table of the PON port connected to the ONU for data resources having a resource occupation identifier of a preset value, selecting one of the data resources having the resource occupation identifier of the preset value as a distributing resource and transmitting the distributing resource to the ONU to be registered, wherein the resource occupation identifier of the preset value indicates that corresponding data resources are not occupied, wherein the step of selecting one of the data resources having the resource occupation identifier of the preset value as a distributing resource and transmitting the distributing resource to the ONU to be registered comprises: selecting one of the data resources having the resource occupation identifier of the preset value; replacing the resource occupation identifier of the selected data resource with the SN of the ONU to be registered, and taking the data resource having the replaced resource occupation identifier as the distributing resource; and transmitting the distributing resource to the ONU to be registered. acquiring (S21), by the OLT, a registration request of the ONU to be registered, and acquiring a serial number, SN, of the ONU to be registered and information about the PON port connected to the ONU to be registered and information about a slot in which the PON board having the PON port is plugged according to the registration request; and searching (S22), by the OLT, the service data table of the PON port connected to the ONU for data resources having a resource occupation identifier of a preset value, selecting one of the data resources having the resource occupation identifier of the preset value as a distributing resource and transmitting the distributing resource to the ONU to be registered, wherein the resource occupation identifier of the preset value indicates that corresponding data resources are not occupied, wherein the step of selecting one of the data resources having the resource occupation identifier of the preset value as a distributing resource and transmitting the distributing resource to the ONU to be registered comprises: selecting one of the data resources having the resource occupation identifier of the preset value; replacing the resource occupation identifier of the selected data resource with the SN of the ONU to be registered, and taking the data resource having the replaced resource occupation identifier as the distributing resource; and transmitting the distributing resource to the ONU to be registered. selecting one of the data resources having the resource occupation identifier of the preset value; replacing the resource occupation identifier of the selected data resource with the SN of the ONU to be registered, and taking the data resource having the replaced resource occupation identifier as the distributing resource; and transmitting the distributing resource to the ONU to be registered. <EOS>