The reliable and controlled allocation of network elements particularly medical sensors (2) to a network (4) without prior configuration of the wireless sensors or of the network administration system can be carried out using an allocation unit (1) for allocating network elements (2) to a wireless network (4), which allocation unit (1) comprises a transmitter which transmits, in a user-controlled manner, a code to a first network element (2), which code causes the first network element (2) to transmit its ID together with the code (encoded ID) so that the latter can be received by a second network element (3) which allocates the first network element (2) to its network (4).