Abstract-We propose a framework to optimize the communication performance and mobility management in vehicular networks. By having a single unified decision algorithm taking into account both stack-related and external contextual information such as GPS localization or signaling from other nodes, advice can be provided to every layer in the network stack to allow for globally optimized, faster and more accurate adaptation to the current conditions. We present how key example scenarios would benefit from such a system. We describe an instance of this framework using a constraint satisfaction problem (CSP) approach. We also describe our prototype implementation of the network data collection system and give some timing evaluation for a given constraint solver.Index Terms-IPv6, mobility, multihoming, contextaware, performance optimization, constraint satisfaction I. Introduction Vehicular networks present a heterogeneous environment based on a large variety of technologies. Several networking solutions can be used to establish communication channels with other vehicles (V2V), the infrastructure (V2I) or the internet. It is thus not uncommon to see vehicular communication solutions built on top of various physical technologies such as GPRS, UMTS, various flavors of the 802.11 standard or the more recent WiMAX.However both IP-and non IP-based network protocols have been proposed, current standardization works advocate the use of IPv6 at the network layer [1]. Vehicles can then benefit from direct connectivity to the internet as well as native support for host and network mobility to maintain application-level communication. Having more than one network interface is additionally becoming common. Vehicles can then take part in several networks at once e.g., a Vehicular Ad-hoc NETwork (VANET) for local communication and a WWAN for longer distance communication. Such multihoming, with peers potentially reachable via several disjoint networks, prompts the need for routes and interface selection support in order to achieve good performance e.g., not using the WWAN when a direct VANET route exists [2].Most currently available network stacks are designed following the layered design of the OSI model. As upper