In IP version 6, Mobile IPv6 (MIPv6) is used to support mobility in IPv6 networks. Hierarchical MIPv6 (HMIPv6) is used in hierarchized network and it always cannot be better than MIPv6. These, two protocols have different application scopes. In this paper, a model is proposed to analyze the application scopes of MIPv6 and HMIPv6, through which an Optimal Choice of Mobility Management (OCMM) algorithm is designed. OCMM chooses the better mobility management scheme between MIPv6 and HMIPv6 according to user's priority and requirements, deciding whether to hierarchize the network.