(This paper describes the design and implementation of a portable Mobile IPv6 protocol stack on multiple operating system platforms. The detailed implementation process is given, and a simplified migration method is proposed based on the strategy of module differentiation. The common code and non common code are modularized separately, and the migration process is simplified as the replacement of non common modules)