A planar force-constant model is developed for longitudinal phonons of wurtzite GaN and AlN propagating along the [0001] direction. The proposed model is then applied to the study of the phonon modes in hexagonal GaN/AlN superlattices in the longitudinal polarization. The confinement of the superlattice phonon mode is discussed.