  Interaction of an intense electron beam with a finite-length, inhomogeneous
plasma is investigated numerically. The plasma density profile is maximal in
the middle and decays towards the plasma edges. Two regimes of the two-stream
instability are observed. In one regime, the frequency of the instability is
the plasma frequency at the density maximum and plasma waves are excited in the
middle of the plasma. In the other regime, the frequency of the instability
matches the local plasma frequency near the edges of the plasma and the intense
plasma oscillations occur near plasma boundaries. The latter regime appears
sporadically and only for strong electron beam currents. This instability
generates copious amount of suprathermal electrons. The energy transfer to
suprathermal electrons is the saturation mechanism of the instability.
