Configurations with Routes to an Entire CIDR Block

Sharing is caring!

<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">This section demonstrates the configuration for VPC peering connections in which you configure your route tables to access to the entire CIDR block of the peer VPC&period; For more information about scenarios in which you might need a specific VPC peering connection configuration&comma; <&sol;p>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<h2 style&equals;"clear&colon; both&semi;">Two VPCs Peered Together<&sol;h2>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<p>You have a VPC peering connection &lpar;<code>pcx-11112222<&sol;code>&rpar; between VPC A and VPC B&comma; which are in the same AWS account&comma; and do not have overlapping CIDR blocks&period;<&sol;p>&NewLine;<div>&NewLine;<div><&sol;div>&NewLine;<&sol;div>&NewLine;<p>You may want to use this kind of configuration when you have a two VPCs that require access to each others&&num;8217&semi; resources&period; For example&comma; you set up VPC A for your accounting records&comma; and VPC B for your financial records&comma; and now you want each VPC to be able to access each others&&num;8217&semi; resources without restriction&period;<br &sol;>The route tables for each VPC point to the relevant VPC peering connection to access the entire CIDR block of the peer VPC&period;<&sol;p>&NewLine;<div>&NewLine;<div>&NewLine;<table border&equals;"0" cellspacing&equals;"0">&NewLine;<colgroup>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<&sol;colgroup>&NewLine;<thead>&NewLine;<tr>&NewLine;<th>Route Table<&sol;th>&NewLine;<th>Destination<&sol;th>&NewLine;<th>Target<&sol;th>&NewLine;<&sol;tr>&NewLine;<&sol;thead>&NewLine;<tbody>&NewLine;<tr>&NewLine;<td rowspan&equals;"2">VPC A<&sol;td>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-11112222<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td rowspan&equals;"2">VPC B<&sol;td>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-11112222<&sol;td>&NewLine;<&sol;tr>&NewLine;<&sol;tbody>&NewLine;<&sol;table>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<h2 style&equals;"clear&colon; both&semi;">One VPC Peered with Two VPCs<&sol;h2>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<p>You have a central VPC &lpar;VPC A&rpar;&comma; and you have a VPC peering connection between VPC A and VPC B &lpar;<code>pcx-12121212<&sol;code>&rpar;&comma; and between VPC A and VPC C &lpar;<code>pcx-23232323<&sol;code>&rpar;&period; The VPCs are in the same AWS account&comma; and do not have overlapping CIDR blocks&period; <&sol;p>&NewLine;<div>&NewLine;<div><&sol;div>&NewLine;<div><&sol;div>&NewLine;<&sol;div>&NewLine;<p>You may want to use this &&num;8216&semi;flying V&&num;8217&semi; configuration when you have resources on a central VPC&comma; such as a repository of services&comma; that other VPCs need to access&period; The other VPCs do not need access to each others&&num;8217&semi; resources&semi; they only need access to resources on the central VPC&period;<&sol;p>&NewLine;<div>&NewLine;<div>Note<&sol;div>&NewLine;<p>VPC B and VPC C cannot send traffic directly to each other through VPC A&period; VPC peering does not support transitive peering relationships&comma; nor edge to edge routing&period; You must create a VPC peering connection between VPC B and VPC C in order to route traffic directly between them&period; For more information&comma;<&sol;p><&sol;div>&NewLine;<p>The route tables for each VPC point to the relevant VPC peering connection to access the entire CIDR block of the peer VPC&period; <&sol;p>&NewLine;<div>&NewLine;<div>&NewLine;<table border&equals;"0" cellspacing&equals;"0">&NewLine;<colgroup>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<&sol;colgroup>&NewLine;<thead>&NewLine;<tr>&NewLine;<th>Route Table<&sol;th>&NewLine;<th>Destination<&sol;th>&NewLine;<th>Target<&sol;th>&NewLine;<&sol;tr>&NewLine;<&sol;thead>&NewLine;<tbody>&NewLine;<tr>&NewLine;<td rowspan&equals;"3">VPC A<&sol;td>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-12121212<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>192&period;168&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-23232323<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td rowspan&equals;"2">VPC B<&sol;td>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-12121212<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td rowspan&equals;"2">VPC C<&sol;td>&NewLine;<td>192&period;168&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-23232323<&sol;td>&NewLine;<&sol;tr>&NewLine;<&sol;tbody>&NewLine;<&sol;table>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<h2 style&equals;"clear&colon; both&semi;">Three VPCs Peered Together<&sol;h2>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<p>You have peered three VPCs together in a full mesh configuration&period; The VPCs are in the same AWS account and do not have overlapping CIDR blocks&colon;<&sol;p>&NewLine;<div>&NewLine;<ul type&equals;"disc">&NewLine;<li>VPC A is peered to VPC B through VPC peering connection <code>pcx-aaaabbbb<&sol;code><&sol;li>&NewLine;<li>VPC A is peered to VPC C through VPC peering connection <code>pcx-aaaacccc<&sol;code><&sol;li>&NewLine;<li>VPC B is peered to VPC C through VPC peering connection <code>pcx-bbbbcccc<&sol;code><&sol;li>&NewLine;<&sol;ul>&NewLine;<&sol;div>&NewLine;<div>&NewLine;<div><&sol;div>&NewLine;<div><&sol;div>&NewLine;<&sol;div>&NewLine;<p>You may want to use this full mesh configuration when you have separate VPCs that need to share resources with each other without restriction&semi; for example&comma; as a file sharing system&period;<br &sol;>The route tables for each VPC point to the relevant VPC peering connection to access the entire CIDR block of the peer VPCs&period; <&sol;p>&NewLine;<div>&NewLine;<div>&NewLine;<table border&equals;"0" cellspacing&equals;"0">&NewLine;<colgroup>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<col><&sol;col>&NewLine;<&sol;colgroup>&NewLine;<thead>&NewLine;<tr>&NewLine;<th>Route Tables<&sol;th>&NewLine;<th>Destination<&sol;th>&NewLine;<th>Target<&sol;th>&NewLine;<&sol;tr>&NewLine;<&sol;thead>&NewLine;<tbody>&NewLine;<tr>&NewLine;<td rowspan&equals;"3">VPC A<&sol;td>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-aaaabbbb<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>192&period;168&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-aaaacccc<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td rowspan&equals;"3">VPC B<&sol;td>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-aaaabbbb<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>192&period;168&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-bbbbcccc<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td rowspan&equals;"3">VPC C<&sol;td>&NewLine;<td>192&period;168&period;0&period;0&sol;16<&sol;td>&NewLine;<td>Local<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>172&period;16&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-aaaacccc<&sol;td>&NewLine;<&sol;tr>&NewLine;<tr>&NewLine;<td>10&period;0&period;0&period;0&sol;16<&sol;td>&NewLine;<td>pcx-bbbbcccc<&sol;td>&NewLine;<&sol;tr>&NewLine;<&sol;tbody>&NewLine;<&sol;table>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<div>&NewLine;<div>&NewLine;<div>&NewLine;<h2 style&equals;"clear&colon; both&semi;">One VPC Peered with Multiple VPCs<&sol;h2>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<&sol;div>&NewLine;<p>You have a central VPC &lpar;VPC A&rpar; that&&num;8217&semi;s peered to the following VPCs&colon;<&sol;p>&NewLine;<div>&NewLine;<ul type&equals;"disc">&NewLine;<li>VPC B through <code>pcx-aaaabbbb<&sol;code><&sol;li>&NewLine;<li>VPC C through <code>pcx-aaaacccc<&sol;code><&sol;li>&NewLine;<li>VPC D through <code>pcx-aaaadddd<&sol;code><&sol;li>&NewLine;<li>VPC E through <code>pcx-aaaaeeee<&sol;code><&sol;li>&NewLine;<li>VPC F through <code>pcx-aaaaffff<&sol;code><&sol;li>&NewLine;<li>VPC G through <code>pcx-aaaagggg<&sol;code><&sol;li>&NewLine;<&sol;ul>&NewLine;<&sol;div>&NewLine;<p>VPC A is peered with all other VPCs&comma; but the other VPCs are not peered to each other&period; The VPCs are in the same AWS account and do not have overlapping CIDR blocks&period; <&sol;p>&NewLine;<div>Note<&sol;div>&NewLine;<p>None of the other VPCs can send traffic directly to each other through VPC A&period; VPC peering does not support transitive peering relationships&comma; nor edge to edge routing&period; You must create a VPC peering connection between the other VPCs in order to route traffic between them&period; <&sol;p><&sol;div>&NewLine;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.