# VPC Peering

* A VPC peering connection is a **networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses**.<br>
* Instances in either VPC can **communicate with each other as if they are within the same network**.<br>
* The **VPCs can be in different regions and different accounts**.<br>
* To send private IPv4 traffic from your instance to an instance in a peer VPC, you **must add a route to the route table that's associated with your subnet in which your instance resides**.
  * The **route points to the CIDR block of the peer VPC** in the VPC peering connection, and **specifies the VPC peering connection as the target**.

## Transitive peering

* Instead of using VPC peering, you can **use an AWS Transit Gateway that acts as a network transit hub**, to interconnect your VPCs and on-premises networks.<br>
* You have a **VPC peering connection between VPC A and VPC B, and between VPC A and VPC C**. <br>
* There is **no VPC peering connection between VPC B and VPC C**.
  * So, you **cannot route packets directly from VPC B to VPC C through VPC A**.

![](https://4079160698-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOmHH1M7R1RV5MGm4F7%2F-MPFCKk1bvmx9RhM7sJ2%2F-MPFpC4yHpunBSUaG9go%2Fimage.png?alt=media\&token=2468a8a5-e671-4d00-a198-62b890909154)


---

# 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://karansingh.gitbook.io/aws-saa-c02/virtual-private-cloud-vpc/vpc-peering.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.
