Design and simulation of IMS based on NS2