It is important to reduce the impact of the high penetration of wind power into the electricity supply for the purposes of the security and stability of the power grid. As such, the inertia capability of wind farms has become an observation index. The existing control modes cannot guarantee the wind turbine to respond to the frequency variation of the grid, hence, it may lead to frequency instability as the penetration of wind power gets much higher. For the stability of the power grid, a simple and applicable method is to realize inertia response by controlling wind farms based on a high-speed communication network. Thus, with the consideration of the inertia released by a wind turbine at its different operating points, the inertia control mechanism of a doubly-fed wind turbine is analyzed firstly in this paper. The optimal exit point of inertia control is discussed. Then, an active power control strategy for wind farms is proposed to reserve the maximum inertia under a given power output constraint. Furthermore, turbines in a wind farm are grouped depending on their inertia capabilities, and a wind farm inertia control strategy for reasonable extraction of inertia is then presented. Finally, the effectiveness of the proposed control strategy is verified by simulation on the RT-LAB (11.3.3, OPAL-RT TECHNOLOGIES, Montreal, Quebec, Canada) platform with detailed models of the wind farm.