A method for mapping a packet service onto an optical transport network, OTN, wherein the method is performed by an optical transport network OTN device, wherein the OTN device comprises a plurality of tributary boards (501, 502, 601, 602), a cross-connect board (503, 603), and a first line board (504, 604), wherein when a packet service is from the tributary board to the line board during uplink packet service processing, an ingress is located on a tributary board, and an egress is located on a line board; when a packet service is from the line board to the tributary board during downlink packet service processing, an ingress is located on the line board, and an egress is located on the tributary board; wherein a board number of the egress and a port number of the egress are used to indicate the line board or the tributary board to which the packet service is transferred; the method comprises: receiving, by one of the plurality of tributary boards, a first packet service message from an access side, obtaining, by the tributary board, message information including a first board number of a first egress, and a first port number of the first egress by means of table lookup, wherein the table lookup is performed according to a port number of an ingress and/or a VLAN ID, or according to a DA and an IP address; sending, by the cross-connect board, the first packet service message to the first line board corresponding to the first board number; and encapsulating, by the first line board, the first packet service message that is sent to the first line board, mapping an encapsulated packet service message onto a first optical channel data unit, ODU, corresponding to the first port number, of a plurality of ODUs, and sending the first ODU by using the first egress; wherein the first ODU comprises at least one first sub-port number of the first egress; wherein the OTN device further comprises a second line board; wherein the method further comprises: receiving, by the first line board, a second packet service message from a network side, demapping the second packet service message from the first ODU, decapsulating the second packet service message, and obtaining a third board number of the second line board in which a third egress is located and a third port number of the third egress according to the at least one first sub-port number that is of the first egress and that is comprised in the first ODU; sending, by the cross-connect board, the second packet service message to the second line board corresponding to the third board number; and encapsulating, by the second line board, the second packet service message that is sent to the second line board. mapping an encapsulated packet service message onto a second ODU corresponding to the third port number, and sending the second ODU by using the third egress. receiving, by one of the plurality of tributary boards, a first packet service message from an access side, obtaining, by the tributary board, message information including a first board number of a first egress, and a first port number of the first egress by means of table lookup, wherein the table lookup is performed according to a port number of an ingress and/or a VLAN ID, or according to a DA and an IP address; sending, by the cross-connect board, the first packet service message to the first line board corresponding to the first board number; and encapsulating, by the first line board, the first packet service message that is sent to the first line board, mapping an encapsulated packet service message onto a first optical channel data unit, ODU, corresponding to the first port number, of a plurality of ODUs, and sending the first ODU by using the first egress; wherein the first ODU comprises at least one first sub-port number of the first egress; wherein the OTN device further comprises a second line board; wherein the method further comprises: receiving, by the first line board, a second packet service message from a network side, demapping the second packet service message from the first ODU, decapsulating the second packet service message, and obtaining a third board number of the second line board in which a third egress is located and a third port number of the third egress according to the at least one first sub-port number that is of the first egress and that is comprised in the first ODU; sending, by the cross-connect board, the second packet service message to the second line board corresponding to the third board number; and encapsulating, by the second line board, the second packet service message that is sent to the second line board. mapping an encapsulated packet service message onto a second ODU corresponding to the third port number, and sending the second ODU by using the third egress. receiving, by the first line board, a second packet service message from a network side, demapping the second packet service message from the first ODU, decapsulating the second packet service message, and obtaining a third board number of the second line board in which a third egress is located and a third port number of the third egress according to the at least one first sub-port number that is of the first egress and that is comprised in the first ODU; sending, by the cross-connect board, the second packet service message to the second line board corresponding to the third board number; and encapsulating, by the second line board, the second packet service message that is sent to the second line board. mapping an encapsulated packet service message onto a second ODU corresponding to the third port number, and sending the second ODU by using the third egress.