We present a design of an OpenFlow controller handling IP multicast and a method to switch a multicast tree to the other with little packet loss. Reducing packet loss during reconstruction of multicast tree triggered by a failure has been an important problem to make multicast communications more reliable. One approach for this problem is to use redundant trees for multicast trees, but algorithms to compute redundant trees require centralized computation therefore cannot be used in IP network. We used OpenFlow, which has features of centralized control and programmability, to realize redundant multicast trees in the network. In this paper, we present a design of an OpenFlow controller supporting IP multicast and a method to set up multiple multicast trees of one multicast group in the network for fast tree switching. To avoid delivering duplicate packets to the receivers, we assign an ID to each tree, embed it into multicast packets, and select the tree to deliver multicast packets in the sender switch by rewriting the packet header. We showed little packet loss when switching the multicast tree triggered by the failure using implementation of the OpenFlow controller by the evaluation experiment.