With the expansion of the microgrid systems (MGs) exploitation, the development of multi-microgrid systems (MMGs) is rising. Along with the benefits offered by a microgrid, the combination of several microgrids and their synergies in energy supply augments system stability and reliability and reduces energy costs and losses in transmission lines. With the connection of all microgrids together in an interconnected multi-microgrid (IMMG) and the provision of interoperability and energy sharing in these grids, the perfect platform is created for optimal distribution of energy sharing by the appropriate strategies of an effective energy management system (EMS). The present paper proposes a Software-Defined Networking (SDN) based cooperative model for sharing energy among microgrids via a transactive energy framework (TE) in interconnected multi-microgrids. The proposed model utilizes incentive mechanisms to encourage microgrid collaboration to reduce the final energy supply cost of an IMMG. The current work introduces the energy sharing factor (ESF) that provides an energy exchange mechanism for the IMMG manager. The effectiveness of the proposed model is investigated by a cost reduction analysis that employs the microgrids dataset.