We investigate the dynamics of femtosecond-laser drilling of metals, both theoretically and experimentally, by taking into account waveguide-like behavior of ablated cavities. In particular, we show that cylindrical holes generated during laser ablation of metals act like hollow optical waveguides. Since the drilling is generally achieved by a large number of consecutive pulses, each pulse is first guided through the channel formed by the previous pulses, and at the end of the channel, it is absorbed by the metal, making its own contribution to ablation. The ablation stops at maximum depth when attenuation in the cavity reduces the pulse fluence to the ablation threshold. We use waveguide theory to calculate attenuation constants, and perform an iterative calculation to model pulse-by-pulse ablation. We also performed detailed experiments and compare the results with the theoretical findings. When only absorption losses are included, the waveguide model predicts significantly deeper structures. On the other hand, when we include scattering losses caused by nanostructures formed on the cavity walls, quantitative agreement with experiments is achieved. The waveguide model is particularly effective at fluences close to ablation threshold, and it can explain several behaviors such as evolution of the depth per pulse and effect of the incoming pulse energy in different focusing configurations.