Better start with Virtual Machines on the same subnet

%3CLINGO-SUB%20id%3D%22lingo-sub-715184%22%20slang%3D%22en-US%22%3EBetter%20start%20with%20Virtual%20Machines%20on%20the%20same%20subnet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715184%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20day%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20I'm%20new%20to%20Azure%2C%20but%20not%20to%20the%20public%20cloud%2C%20so%20i%20suppose%20having%20some%20insights%20and%20tips%20would%20let%20me%20being%20productive%20quickly%2C%20i%20hope.%3C%2FP%3E%3CP%3EI'm%20starting%20to%20evaluate%20Azure%20in%20general%2C%20and%20some%20cloud-native%20applications%20in%20particular%2C%20trying%20to%20leverage%20docker%2C%20kubernetes%20and%20the%20entire%20ecosystem%20over%20there.%3C%2FP%3E%3CP%3ESaid%20so%2C%20the%20first%20step%20i%20want%20to%20achieve%20is%20the%20so%20called%20%22kubernetes%20the%20hard%20way%22%20or%20similar%20%2C%20to%20have%20a%20basic%20infrastructure%20made%20up%20of%203%20virtual%20machines%2C%20and%20the%20build%20on%20top%20the%20services%20and%20what%20needed.%3C%2FP%3E%3CP%3EOf%20course%20i%20will%20use%20centos%2C%20and%20the%20first%20thin%20i%20need%20to%20understand%20is%20the%20network.%3C%2FP%3E%3CP%3EI've%20tried%20to%20build%20the%20first%20two%20vm%20but%20they%20end%20up%20on%20different%20subnets%2C%20which%20is%20something%20i%20want%20to%20avoid.%20I%20need%20to%20use%20VM1%20on%2010.0.1.0%2F24%20and%20the%20same%20subnet%2C%20or%20other%2C%20for%20the%20second%20and%20the%20third.%3C%2FP%3E%3CP%3ECan%20i%20do%20that%3F%3C%2FP%3E%3CP%3ESecondarily%20will%20come%20the%20connection%2C%20even%20if%20i%20don't%20need%20all%20the%20VMs%20widely%20accessible%2C%20as%20I%20have%20a%20jumphost%20(the%20first%20one%20VM%20would%20be%20enough).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%2C%20links%20and%20documentation%2C%20would%20be%20very%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMichele%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-715184%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENetworking%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-715792%22%20slang%3D%22en-US%22%3ERe%3A%20Better%20start%20with%20Virtual%20Machines%20on%20the%20same%20subnet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715792%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364901%22%20target%3D%22_blank%22%3E%40Michele_Nicosia%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20you%20can%20assign%20them%20to%20the%20same%20subnet%20but%20not%20for%20all%20services.%26nbsp%3B%3CSPAN%3EVMs%20can%20be%20created%20in%20the%20same%20VNet%20and%20they%20can%20connect%20to%20each%20other%20using%20private%20IP%20addresses.%20They%20can%20connect%20even%20if%20they%20are%20in%20different%20subnets%20without%20the%20need%20to%20configure%20a%20gateway%20or%20use%20public%20IP%20addresses.%20If%20you%20deploy%20multiple%20VMs%20into%20a%20VNet%20or%20subnet%2C%20they%20are%20assigned%20IP%20addresses%20as%20they%20boot%20up.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20you%20plan%20to%20deploy%20some%20Azure%20service%20resources%20into%20a%20virtual%20network%2C%20they%20may%20require%2C%20or%20create%2C%20their%20own%20subnet%2C%20so%20there%20must%20be%20enough%20unallocated%20space%20for%20them%20to%20do%20so.%20To%20determine%20whether%20an%20Azure%20service%20creates%20its%20own%20subnet%2C%20see%20information%20for%20each%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-network%2Fvirtual-network-for-azure-services%23services-that-can-be-deployed-into-a-virtual-network%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20service%20that%20can%20be%20deployed%20into%20a%20virtual%20network%3C%2FA%3E.%20For%20example%2C%20if%20you%20connect%20a%20virtual%20network%20to%20an%20on-premises%20network%20using%20an%20Azure%20VPN%20Gateway%2C%20the%20virtual%20network%20must%20have%20a%20dedicated%20subnet%20for%20the%20gateway%20but%20that%20is%20not%20the%20case%20for%20VM's%20%3A)%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20702px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F120389i94F454F6AE1E7EF5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22service.JPG%22%20title%3D%22service.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDav%2C%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-725440%22%20slang%3D%22en-US%22%3ERe%3A%20Better%20start%20with%20Virtual%20Machines%20on%20the%20same%20subnet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725440%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364901%22%20target%3D%22_blank%22%3E%40Michele_Nicosia%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMake%20sure%20you%20allocate%20enough%20addresses%20for%20VM%20resources.%20Azure%20allocates%205%20host%20addresses%20for%20itself%20for%20each%20subnet%2C%20for%20example%2010.0.1.0%2F29%20will%20provide%208%20host%20addresses%3A%3C%2FP%3E%3CP%3E5%20-%20automatically%20allocated%20by%20azure%3C%2FP%3E%3CP%3E3%20-%20available%20for%20your%20VMs%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVMs%20in%20the%20same%20VNET%20will%20be%20assigned%20an%20available%20IP%20address%20automatically.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Good day all,

  I'm new to Azure, but not to the public cloud, so i suppose having some insights and tips would let me being productive quickly, i hope.

I'm starting to evaluate Azure in general, and some cloud-native applications in particular, trying to leverage docker, kubernetes and the entire ecosystem over there.

Said so, the first step i want to achieve is the so called "kubernetes the hard way" or similar , to have a basic infrastructure made up of 3 virtual machines, and the build on top the services and what needed.

Of course i will use centos, and the first thin i need to understand is the network.

I've tried to build the first two vm but they end up on different subnets, which is something i want to avoid. I need to use VM1 on 10.0.1.0/24 and the same subnet, or other, for the second and the third.

Can i do that?

Secondarily will come the connection, even if i don't need all the VMs widely accessible, as I have a jumphost (the first one VM would be enough).

 

Any suggestions, links and documentation, would be very appreciated.

 

Thank you

 

Michele

2 Replies
Highlighted

Hi@Michele_Nicosia 

 

Yes you can assign them to the same subnet but not for all services. VMs can be created in the same VNet and they can connect to each other using private IP addresses. They can connect even if they are in different subnets without the need to configure a gateway or use public IP addresses. If you deploy multiple VMs into a VNet or subnet, they are assigned IP addresses as they boot up.

 

If you plan to deploy some Azure service resources into a virtual network, they may require, or create, their own subnet, so there must be enough unallocated space for them to do so. To determine whether an Azure service creates its own subnet, see information for each Azure service that can be deployed into a virtual network. For example, if you connect a virtual network to an on-premises network using an Azure VPN Gateway, the virtual network must have a dedicated subnet for the gateway but that is not the case for VM's :)

service.JPG

 

Thank you

Dav,

Highlighted

@Michele_Nicosia 

 

Make sure you allocate enough addresses for VM resources. Azure allocates 5 host addresses for itself for each subnet, for example 10.0.1.0/29 will provide 8 host addresses:

5 - automatically allocated by azure

3 - available for your VMs

 

VMs in the same VNET will be assigned an available IP address automatically.