Avalanche transistor is a ideal device which can provide quick response and high peak power simultaneously, and this device is cheap. A pulse generator based on avalanche transistor is designed in this paper; this generator can generate transient current pulse. This generator can be easily triggered, what is more, the performance of this generator is stable and it has a well-behaved load capacity. Therefore, this generator is suitable for using as the magneto-optical switch in the all-optical communication network. Future work will focus on further shorten the duration and rising time of the pulse.