The function of HCN2 (hyperpolarization activated cyclic nucleotide gated potassium and sodium channel 2, ENSG00000099822) is as follows. Hyperpolarization-activated ion channel that is permeable to sodium and potassium ions. Displays lower selectivity for K(+) over Na(+) ions (PubMed:10228147, PubMed:22006928). Contributes to the native pacemaker currents in heart (If) and in neurons (Ih) (PubMed:10228147, PubMed:10524219). Can also transport ammonium in the distal nephron (By similarity). Involved in the initiation of neuropathic pain in sensory neurons (By similarity). {ECO:0000250|UniProtKB:Q9JKA9, ECO:0000269|PubMed:10228147, ECO:0000269|PubMed:10524219, ECO:0000269|PubMed:22006928}.