In the last years, and thanks to the improvements on computing and communications technologies, wireless networks formed by vehicles (called vehicular networks) have risen as a key topic of interest. In these networks, the vehicles can exchange data with others by using short-range radio signals in order to get useful information related to traffic conditions, road safety, and others. The availability of different types of sensors can be exploited by the vehicles to measure many parameters from their surroundings. These data can then be shared with other drivers who, on the other side, could also explicitly submit queries to retrieve information available in the network. This can be a challenging task, since the data is scattered among the vehicles belonging to the network and the communication links among them have usually a short life due to their constant movement.In this paper, we use the technology of mobile software agents to help to accomplish these tasks, since they have a number of features that are very well suited for their use in mobile environments, such as their autonomy, mobility, and intelligence. Specifically, we analyze the benefits that mobile agents can bring to vehicular networks and the potential difficulties for their adoption. Moreover, we describe a query processing approach based on the use of mobile agent technology. We focus on range queries that retrieve interesting information from the vehicles located within a geographic area and present an extensive experimental evaluation that shows the feasibility and the interest of the proposal.