A repeater applicable for mesh networks, wherein a mesh network comprises a gateway device, the repeater and a user equipment, the gateway device is connected to the repeater, the repeater is connected to the user equipment, the repeater comprises a wireless transmission interface and a wired transmission interface provided with at least one wired transmission port, wherein the repeater comprises: a processing unit, coupled to the wired transmission interface and the wireless transmission interface, is configured to: temporarily block all existing uplink transmissions before sending out a dynamic host configuration protocol, DHCP, discover message; when one of the wired transmission port is linked to a network, send out said DHCP discover message via said wired transmission port; determine a packet looping exists when the processing unit receives said DHCP discover message sent from said wired transmission port; Z prohibit data transmission of said wired transmission port which sent out said DHCP discover message, after detecting said DHCP discover message is received by the processing unit; wherein when the packet looping does not exist, the processing unit is further configured to classify said wired transmission port, which sent out said DHCP discover message, as an uplink transmission port and disconnect all existing wireless uplink transmission after receiving a DHCP offer message, and to classify said wired transmission port, which sent out said DHCP discover message, as a downlink transmission port and un-block all existing uplink transmission if said DHCP offer message is not received within a specified time interval, wherein said DHCP offer message is sent by the gateway device in response to receiving said DHCP discover message, said wired transmission port is classified as the uplink transmission port if said wired transmission port of the repeater is directly or indirectly connected to the gateway device, said wired transmission port is classified as the downlink transmission port if said wired transmission port of the repeater is not directly or indirectly connected to the gateway device; and enable a downlink transmission of the wireless transmission interface after classifying said wired transmission port as the uplink transmission port. temporarily block all existing uplink transmissions before sending out a dynamic host configuration protocol, DHCP, discover message; when one of the wired transmission port is linked to a network, send out said DHCP discover message via said wired transmission port; determine a packet looping exists when the processing unit receives said DHCP discover message sent from said wired transmission port; Z prohibit data transmission of said wired transmission port which sent out said DHCP discover message, after detecting said DHCP discover message is received by the processing unit; wherein when the packet looping does not exist, the processing unit is further configured to classify said wired transmission port, which sent out said DHCP discover message, as an uplink transmission port and disconnect all existing wireless uplink transmission after receiving a DHCP offer message, and to classify said wired transmission port, which sent out said DHCP discover message, as a downlink transmission port and un-block all existing uplink transmission if said DHCP offer message is not received within a specified time interval, wherein said DHCP offer message is sent by the gateway device in response to receiving said DHCP discover message, said wired transmission port is classified as the uplink transmission port if said wired transmission port of the repeater is directly or indirectly connected to the gateway device, said wired transmission port is classified as the downlink transmission port if said wired transmission port of the repeater is not directly or indirectly connected to the gateway device; and enable a downlink transmission of the wireless transmission interface after classifying said wired transmission port as the uplink transmission port.