A networking laboratory is an essential tool for teaching communications engineering. However, the effort and costinvested in creating a networking laboratory with physical equipment are significantly high, especially if the students are towork on realistic scenarios. By substituting physical networking devices by virtualized ones, virtualization technologiesmay contribute to simplify the laboratory management tasks and allow the creation of affordable and more complexnetwork scenarios. In this way, students can work and experiment on realistic network scenarios, so that their learningexperience is greatly improved. In this paper a detailed description of a virtualization-based networking laboratory model,evolved over the last 10 years of authors’ experience in teaching computer networking, is provided. This laboratory modelis implemented using Virtual Networks over linuX (VNX), an open source tool specifically designed and developed todefine, build, deploy and manage networking scenarios taking full advantage of virtualization, and supporting hybridvirtual/physical scenarios and heterogeneous operating systems. The features of the VNX tool, illustrated with an exampleof a complex network scenario used by more than 300 students, are described. A survey-based assessment of the usageexperience of VNX is included in the paper, showing the validity and efficacy of the proposed laboratory model and of theVNX tool for teaching computer networking in laboratory assignments.