In a Wireless Mesh Network, the traffic is aggregated at mesh router and most of them forwarded towards the internet through GW (internet gateway). Thus easily leads to a bottleneck for network performance at GW. Aimed to this problem ,we firstly treated the GW and mesh router as the alike node equivalently. Then used the logarithm-normal distribution model of shadow affect in wireless communication to design a weighted objective function for guarantee node’s connectivity and coverage, attained the deployment location of the candidate GW; Based of the generated connectivity graph of the network and the constraints of the gateway deployment, consider a heuristic TSP (tree-set partition) algorithm based on degree/weighted to get a good choice of nodes with high throughput and better connectivity act as GW configuration. In conclusion, we validated our ideas and achieved a certain optimization effect under NS2 simulation.