The piN interaction is studied within a meson-exchange model and in a coupled-channels approach which includes the channels piN, etaN, as well as three effective pipiN channels, namely, rhoN, piDelta, and sigmaN. Starting out from an earlier model of the Julich group systematic improvements in the dynamics and in some technical aspects are introduced. With the new model an excellent quantitative reproduction of the piN phase shifts and inelasticity parameters in the energy region up to 1.9 GeV and for total angular momenta Jless than or equal to3/2 is achieved. Simultaneously, good agreement with data for the total and differential piN-->etaN transition cross sections is obtained. The connection of the piN dynamics in the S-11 partial wave with the reaction piN-->etaN is discussed