This paper gives a detailed derivation of the classical electromagnetic modes of a layered circularly symmetrical dielectric waveguide. The corresponding Hamilton function is derived by using suitable canonical observables and the standard analogy to the classical harmonic oscillator. The derivation is generic in the sense that it can be used as an "algorithm" to compute the electromagnetic field of the waveguide. The associated Hamilton operator can then be obtained by using the standard quantization procedure where the canonical observables are replaced by the corresponding operators i.e., the creation and the annihilation operators of the photon (or equivalently, the position and the momentum operators of the harmonic oscillator) and by taking the appropriate commutation relations into account.