# Private & Public IP

## Private IP

A Virtual Machine is created by default with a Private IP address (also called a Fixed IP). By default, this IP is allocated using DHCP from your Virtual Network subnet range.

## Public IP

A VM can optionally be assigned a Public IP address (also called Floating IP) that can be used to access it over a public network.

Public IPs are allocated using subnets from **External Networks**. See [External Networks](https://docs.platform9.com/private-cloud-director/physical-network#external-networks) to read about how to create an external network and then a pool of public IPs using your external network.

### Assign Public IP to VM

You can assign a public IP to a VM by creating a public IP first and then assigning it to the VM.

1. Navigate to Networking -> Public IPs in the <code class="expression">space.vars.product\_name</code> UI. Select 'Create Public IP' to create a new public IP address.
2. Assign the IP address to the VM as part of public IP creation, or go to the VM grid view and then select 'Add Public IP' as the option from actions menu.
3. Choose the public IP you created in step 1. Select the VM's virtual network interface that you'd like to assign the public IP to.

Now your VM has a public IP address assigned and you can access it using the public IP address.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/virtualized-networking/public-ip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
