Development in short-range wireless LAN (WLAN) and long-range wireless WAN (WWAN) technologies have motivated recent efforts to integrate the two. This creates new application scenarios that were not possible before. Vehicles with only WLAN radios can use other vehicles that have both WLAN and WWAN radios as mobile gateways and connect to the Internet while on the road. The most difficult challenge in the scenario is to deal with frequent route breakages due to dynamic mobility of vehicles on the road. Existing routing protocols that are widely used for mobile ad hoc networks are reactive in nature and wait until existing routes break before constructing new routes. The frequent route failures result in a significant amount of time needed for repairing existing routes or reconstructing new routes. In spite of the dynamic mobility, the motion of vehicles on highways is quite predictable compared to other mobility patterns for wireless ad hoc networks, with location and velocity information readily available. This can be exploited to predict how long a route will last between a vehicle requiring Internet connectivity and the gateway that provides a route to the Internet. Successful prediction of route lifetimes can significantly reduce the number of route failures. In this paper, we introduce a prediction-based routing (PBR) protocol that is specifically tailored to the mobile gateway scenario and takes advantage of the predictable mobility pattern of vehicles on highways. The protocol uses predicted route lifetimes to preemptively create new routes before existing ones fail. We study the performance of this protocol through simulation and demonstrate significant reductions in route failures compared to protocols that do not use preemptive routing. Moreover, we find that the overhead of preemptive routing is kept in check due to the ability of PBR to predict route lifetimes.