The central nervous system (CNS) of the vertebrate nervous system which is enclosed in meninges. It contains the majority of the nervous system, and consists of the brain (in vertebrates which have brains), and the spinal cord. Together with the peripheral nervous system, it has a fundamental role in the control of behavior. The CNS is contained within the dorsal cavity, with the brain within the cranial cavity, and the spinal cord in the spinal cavity. The brain is also protected by the skull, and the spinal cord is, in vertebrates, also protected by the vertebrae.