amazon elb - Do we need explicitly setup routing table for the subnet where a public ELB is running within? -
(i trying understand how elb networking works within vpc, , post question)
when add 2 subnets public elb, aws elb create-load-balancer --load-balancer-name my-load-balancer --listeners "protocol=http,loadbalancerport=80,instanceprotocol=http,instanceport=80" --subnets subnet-15aaab61 subnet-198aab81
, assume need setup these 2 subnets public subnets before running step -- understanding correct? also, assume above public subnets must configured automatically assign public ips each of instances (otherwise, dns resolution of elb destination won't public addressable ip) -- understanding correct?
next, have instances running in 2 private subnets , register them elb created above. guess need make sure 2 public subnets , 2 private subnets connected -- do need work make happen? (i.e., default 10.0.0.0/16 -> local rule sufficient? thought so, [1] seems otherwise because added nat rule in context of elb setup procedure)
thanks helping me understand elb related networking.
i assume need setup these 2 subnets public subnets before running step -- understanding correct?
not technically. need set way before elb usable.
also, assume above public subnets must configured automatically assign public ips each of instances (otherwise, dns resolution of elb destination won't public addressable ip) -- understanding correct?
incorrect. elbs public ip addresses independently of whether subnet configured automatic assignment of public ip addresses. setting applies ec2 instances create on subnet. not elbs.
next, have instances running in 2 private subnets , register them elb created above. guess need make sure 2 public subnets , 2 private subnets connected -- need work make happen? (i.e., default 10.0.0.0/16 -> local rule sufficient?
yes. vpc subnets can route other subnets in vpc because of local rule. can't mess 1 up, if try.
i thought so, [1] seems otherwise because added nat rule in context of elb setup procedure)
the nat instance (or nat gateway) referenced default route allow instances on private subnet initiate outbound internet requests. doesn't relate traffic sent instances elbs, or responses same traffic, follows "local" route -- traffic sent instances balancer has internal source ip address of balancer, not address of browser accessing elb.