The central nervous system consists of the brain and the spinal cord. The peripheral nervous system (PNS) is the system involved in connecting the CNS to the rest of the body. The PNS does so via cranial nerves and ganglions present outside the CNS. All the cranial nerves except the optic nerve are part of the PNS. The second cranial nerve is also not a part of the PNS as it originates from the diencephalon. The rest of the cranial nerves are part of the PNS. Also, the nerve ganglia originating from the CNS.