title: Error: route table and network gateway belong to different networks
body: <p>I'm trying to connect a route table and an internet gateway in the AWS VPC dashboard. </p>
  
  <p>It's serving me this error:</p>
  
  <blockquote>
    <p>route table and network gateway
    belong to different networks</p>
  </blockquote>
  
  <p>Specifically, I'm trying to associate the internet gateway to the route table with destination <code>0.0.0.0/0</code> and target as the internet gateway <code>id</code>.</p>
  
  <p>To speak more broadly about the setup I'm trying to achieve, I'd like to have a VPC with two subnets, one for <code>us-east-2a</code> and the other for <code>us-east-2b</code>. I'd like to connect those subnets to a route table that is connected to an internet gateway and then put the VPC in a security group.</p>
  
  <p>I'd like my AWS EC2 instance to be available to only a specific list of IP addresses. </p>