jmsperu commented on issue #4542:
URL: https://github.com/apache/cloudstack/issues/4542#issuecomment-7112281967

   Not solved in 4.22.1.1: port forwarding, static NAT and load balancer rules 
all still need a CloudStack instance as target. Two things already help:
   
   1. Reserve part of the network: `updateNetwork guestvmcidr=<smaller range>` 
on an isolated network makes CloudStack hand out addresses only from that 
range; the rest is free for outside machines.
   2. Rules to an outside address: pick an address inside the CloudStack range 
for the outside machine and add it as a secondary IP on the NIC of any instance 
in that network (addIpToNic), then create the rule with vmguestip set to that 
address. The address counts as used, so it is never given to another instance, 
and the router simply forwards to it. This is lighter than the stopped dummy 
instance workaround.
   
   Checked in a lab on 4.22.1.1 (KVM, isolated network 10.45.42.0/24, then 
updateNetwork guestvmcidr=10.45.42.0/26):
   
   | Check | Result |
   |---|---|
   | Network after the update | cidr 10.45.42.0/26, networkcidr 10.45.42.0/24, 
reservediprange 10.45.42.63-10.45.42.254 |
   | Three new instances | all got addresses inside the /26 |
   | Deploy asking for .200 (in the reserved part) | refused: "Unable to 
acquire Guest IP address for network" |
   | addIpToNic with .200 (in the reserved part) | refused: "Failed to assign 
secondary IP to NIC" |
   | addIpToNic with .50 (inside the /26) | accepted |
   | Port forwarding rule and static NAT with vmguestip=.50 | both Active, DNAT 
rules to .50 present on the router |
   | Another instance asking for .50 | refused: "Unable to acquire Guest IP 
address for network" |
   | Instance that carries the secondary IP stopped | the rules stay on the 
router |
   
   One limit to be aware of: the two do not combine. An address in the reserved 
part cannot be added as a secondary IP, so an outside machine that needs port 
forwarding or static NAT must use an address inside the CloudStack range (held 
by the secondary IP), while the reserved part suits outside machines that need 
no rules.
   
   A real feature needs the maintainers to agree the data model first: Daan 
suggested a network detail, Wei a new table and APIs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to