A method for setting network parameter of a first gateway device wherein the first gateway device is able to operate in a bridging mode, in which IP packets are transparently transmitted to a second gateway device, the method comprising: after the first gateway device is connected to the second gateway device, sending , by the first gateway device, a search packet to the second gateway device, wherein a search target in the search packet is an agreed fixed value; receiving , by the first gateway device, positive response information of the second gateway device, wherein the positive response information is generated based on the agreed fixed value by the second gateway device; and determining , by the first gateway device according to the positive response information, that the second gateway device and the first gateway device are in the same home network; upon determining that the first gateway device and the second gateway device are in the same home network, adjusting , by the first gateway device, the operation mode to the bridging mode; receiving , by the first gateway device, a network parameter from the second gateway device, wherein the network parameter comprises a service set identifier SSID of the second gateway device and an Internet Protocol IP address, and the Internet Protocol IP address is assigned by the second gateway device to the first gateway device, and the IP address assigned to the first gateway device and an IP address of the second gateway device are in a same network segment; and, setting , by the first gateway device, an SSID of the first gateway device the same as the SSID of the second gateway and an IP address of the first gateway device the same as the assigned IP address. after the first gateway device is connected to the second gateway device, sending , by the first gateway device, a search packet to the second gateway device, wherein a search target in the search packet is an agreed fixed value; receiving , by the first gateway device, positive response information of the second gateway device, wherein the positive response information is generated based on the agreed fixed value by the second gateway device; and determining , by the first gateway device according to the positive response information, that the second gateway device and the first gateway device are in the same home network; upon determining that the first gateway device and the second gateway device are in the same home network, adjusting , by the first gateway device, the operation mode to the bridging mode; receiving , by the first gateway device, a network parameter from the second gateway device, wherein the network parameter comprises a service set identifier SSID of the second gateway device and an Internet Protocol IP address, and the Internet Protocol IP address is assigned by the second gateway device to the first gateway device, and the IP address assigned to the first gateway device and an IP address of the second gateway device are in a same network segment; and, setting , by the first gateway device, an SSID of the first gateway device the same as the SSID of the second gateway and an IP address of the first gateway device the same as the assigned IP address. <EOS>