Fiber lasers have been extensively studied thanks to their high output power, excellent characteristics of output beam, relative simplicity, reliability and other promising features. In the paper we present a numerical model of all-fiber passively Q-switched laser and experimental observations of Q-switched pulsed regime in all-fiber laser. Numerical model is based on finite difference method and enables to investigate various spatial and material configurations of both active and passive fibers used in the laser cavity. Different laser regimes (pulsed and continuous-wave) can be achieved by selection of proper input parameters. Numerical model enables us to evaluate optical power and population level distributions in spatial and time domain. Experimental realization of passively Q-switched fiber laser was verified using the laser setup consisting of Er-Yb co-doped active fiber and Tm-doped fiber as saturable absorber. Q-switched regime was observed out in linear (Fabry-Perot) configuration with 3 nm wide tunable bandpass filter (TBPF) for adjustment of spectral position of the Q-switched laser output wavelength.