摘要 |
Disclosed are a method and apparatus for accessing a network, which relate to the technical field of communications. The method comprises: acquiring access information that indicates to a second terminal to access a network, wherein the access information comprises: a service set identifier (SSID) and an access password; selecting a plurality of destination addresses that contain the access information in a designated multicast address field; and according to the plurality of destination addresses, multicasting a plurality of user datagram protocols (UDP) multicast messages to the second terminal. In the present disclosure, the access information indicating to the second terminal to access the network is stored in a plurality of multicast addresses containing the access information via a first terminal, and is sent to the second terminal by means of multicast transmission. The second terminal conveniently accessing the network is realized, a defect of low human-machine interaction caused by complicated operations is avoided, and the efficiency of accessing the network is improved. |