VANET has attracted a good deal of attention owing to its wide range of important applications. VANET is a special kind of mobile ad hoc network, in which most of the nodes are spatio-temporally volatile fast-moving vehicles. Hence, it is extremely difficult to provide resilient end-to-end communications in VANET, although it is a cornerstone for the wider deployment of VANET applications. In VANET, the network and upper layers often fail due to frequent link disruptions caused by the highly dynamic environment. In view of this, we propose MOCA, a M echanism for cOnnectivity management in C ognitive vehiculAr networks, which make use of cognitive radio (CR) technology, to overcome frequent link disruptions and achieve greater resilience for end-to-end data delivery. MOCA benefits from the flexibility and adaptability of CR, which opportunistically accesses the best available licensed channel frequencies. The selection of the best available links is determined by values from observable parameters related to channels and nearby vehicles, such as bit error rate (BER), node speed and driving direction, as well as on the unique application requirements. As the VANET environment can be highly dynamic, MOCA carries out a periodic re-evaluation of the quality of the available channels. Our simulation results show that MOCA outperforms all the other representative alternatives in the literature in terms of throughput and jitter. To the best of our knowledge, MOCA is the first application-independent strategy to provide VANET with resilient end-to-end communications.