Port mappings are also called port forwarding, virtual servers, and different broadband routers are named differently. A computer in the intranet needs port mapping to be on the Internet to open up services or receive data.
Port mappings are divided into dynamic and static. Dynamic port mapping: A computer in the intranet to access the Web site, will send a packet to the Nat gateway, including the other site IP, port and local IP, port, NAT gateway will native IP, port to replace their own public network IP, an unused port, and will write down this mapping relationship, Used for forwarding packets later. Then the data to the site, the site received data to respond, send data to the NAT gateway of the unused port, and then NAT gateway to the network data forwarded to the computer, Realize the communication between intranet and public network. When a connection is closed, the NAT gateway frees the ports assigned to the connection so that subsequent connections can continue to be used. Dynamic port mapping is actually the way Nat Gateway works.
Static port mapping: It is in the NAT network to open a fixed port, and then set the port received data to be transferred to the intranet which IP and port, regardless of whether there is no connection, this mapping relationship will always exist. Can let the public network to actively visit the intranet of a computer.
Analogy: The port mapping process is like: your home in a Community B building room 2410, your friends to find you, find the community doorway, do not know which floor you live? Asked the gatekeeper security, the security guard very politely told him your family number, so your friend very easy to find your home. This process is the external network access through the port map image metaphor.