<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="network_nat">
  <title>Network Address Translation (NAT)</title>
  <body>
    <p>Network Address Translation (NAT) is the simplest way of accessing an external network from a virtual machine. Usually, it does not require any configuration on the host network and guest system. For this reason, it is the default networking mode in <ph conkeyref="vbox-conkeyref-phrases/product-name"/>.</p>
    <p>A virtual machine with NAT enabled acts much like a real computer that connects to the Internet through a router. The router, in this case, is the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> networking engine, which maps traffic from and to the virtual machine transparently. In <ph conkeyref="vbox-conkeyref-phrases/product-name"/> this router is placed between each virtual machine and the host. This separation maximizes security since by default virtual machines cannot talk to each other. </p>
    <p>The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet. You cannot run a server this way unless you set up port forwarding. See <xref href="natforward.dita#natforward"/>.</p>
    <p>The network frames sent out by the guest operating system are received by <ph conkeyref="vbox-conkeyref-phrases/product-name"/>'s NAT engine, which extracts the TCP/IP data and resends it using the host operating system. To an application on the host, or to another computer on the same network as the host, it looks like the data was sent by the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> application on the host, using an IP address belonging to the host. <ph conkeyref="vbox-conkeyref-phrases/product-name"/> listens for replies to the packages sent, and repacks and resends them to the guest machine on its private network.</p>
    <p>The virtual machine receives its network address and configuration on the private network from a DHCP server integrated into <ph conkeyref="vbox-conkeyref-phrases/product-name"/>. The IP address thus assigned to the virtual machine is usually on a completely different network than the host. As more than one card of a virtual machine can be set up to use NAT, the first card is connected to the private network 10.0.2.0, the second card to the network 10.0.3.0 and so on. If you need to change the guest-assigned IP range, see <xref href="changenat.dita">Fine Tuning the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> NAT Engine</xref>.</p>
  </body>
</topic>
