Abstract:
An embodiment of the present invention provides a port setting method, which includes initiating a first detection message and a second detection message at the same time through a port, where the first detection message is used for detecting a first network server, and the second detection message is used for detecting a second network server, if at least one of a first response message to the first detection message and a second response message to the second detection message is received within a predetermined time, setting the working mode of the port to a wide area network WAN mode, otherwise, setting the working mode of the port to a local area network LAN mode.