An electronic device comprising: a first wireless communication circuit configured to perform wireless communication with at least one external electronic device by using a first frequency band; a second wireless communication circuit configured to perform wireless communication with the at least one external electronic device by using a second frequency band; and a processor functionally connected with the first wireless communication circuit and the second wireless communication circuit, the processor configured to: discover the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; configure a Neighbor Awareness Networking, NAN, cluster by establishing a wireless connection with the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; determine whether the at least one external electronic device within the NAN cluster is discovered through the second frequency band; when the at least one external electronic device within the NAN cluster is not discovered through the second frequency band, perform data communication with the at least one external electronic device based on the first frequency band; and when the at least one external electronic device within the NAN cluster is discovered the second frequency band, perform data communication with the at least one external electronic device based on the second frequency band. a first wireless communication circuit configured to perform wireless communication with at least one external electronic device by using a first frequency band; a second wireless communication circuit configured to perform wireless communication with the at least one external electronic device by using a second frequency band; and a processor functionally connected with the first wireless communication circuit and the second wireless communication circuit, the processor configured to: discover the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; configure a Neighbor Awareness Networking, NAN, cluster by establishing a wireless connection with the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; determine whether the at least one external electronic device within the NAN cluster is discovered through the second frequency band; when the at least one external electronic device within the NAN cluster is not discovered through the second frequency band, perform data communication with the at least one external electronic device based on the first frequency band; and when the at least one external electronic device within the NAN cluster is discovered the second frequency band, perform data communication with the at least one external electronic device based on the second frequency band. discover the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; configure a Neighbor Awareness Networking, NAN, cluster by establishing a wireless connection with the at least one external electronic device based on the first frequency band by using the first wireless communication circuit; determine whether the at least one external electronic device within the NAN cluster is discovered through the second frequency band; when the at least one external electronic device within the NAN cluster is not discovered through the second frequency band, perform data communication with the at least one external electronic device based on the first frequency band; and when the at least one external electronic device within the NAN cluster is discovered the second frequency band, perform data communication with the at least one external electronic device based on the second frequency band.