In this paper, we present a stable method for simulating passive distributed networks connected to linear and nonlinear devices using the time marching (TM) method. The method is based on the use of the Z-transform for analyzing and obtaining the TM equations, and the application of cepstrum for preventing the apparition of unstable poles in the Z-domain counterparts of the TM equations. The efficiency of the proposed method is demonstrated by comparing its results with simulations obtained using the following: 1) a full-wave FDTD approach, and 2) CST Cable Studio.