In this paper, the problem of bounded consensus tracking for second-order multi-agent systems is addressed with fixed and randomly switching directed topologies, wherein the leader is stimulated by an unknown time-varying but bounded external input. A novel distributed rectangular impulsive control strategy is developed, which only utilizes casual sampled position data of the neighboring agents. The proposed protocol is beneficial to the limited bandwidth and energy source. By virtue of graph and matrix theories, necessary and sufficient conditions are established, which guarantee the bounded consensus tracking under fixed topology and the mean-square bounded consensus under randomly switching topologies. The proposed algorithms incorporate the performance of the Dirac impulsive control and the sampled-data control. Finally, numerical examples are delivered to validate the effectiveness of the theoretical results.