In a method for producing drip irrigation tubes, a body is extruded, from which the tube is formed and in which metering elements (10) are attached, which are connected to the body by means of ultrasonic welding. For such drip irrigation tubes, the water enters the metering elements (10) from the inside of the drip irrigation tubes through inlet openings, flows through the metering elements, and exits the drip irrigation tubes through outlet openings in a metered manner. The body is formed into a tube body, which is flattened, and the metering elements (10) come to be situated in a central region inside this flattened tube body. The flat tube body is fed between a sonotrode (6) and an anvil (7) of an ultrasonic welding device (3), and the metering elements (10) are welded to the walling of the tube body. The invention further relates to a device for carrying out the method.