How do I make multiple instances all in a single subnet using the Instance Template?

272 views
Skip to first unread message

Simon Darren Cheng

unread,
Apr 19, 2021, 11:10:56 AM4/19/21
to gce-discussion

I plan to make proxies using the Google Cloud Platform, and I follow the guide here:

https://www.youtube.com/watch?v=0MZY649MiQM&t

I am able to generate 8 instances through the guide, but they seem to have random IP addresses?

Is it possible to create instances all under the same exact subnet? Something like:

192.18.192.XXX
192.18.192.XXX
192.18.192.XXX
192.18.192.XXX

For my project, I need it to be all under 1 subnet.

Tariq (Google Cloud Support)

unread,
Apr 20, 2021, 3:07:08 PM4/20/21
to gce-discussion
In a test project, with an instance template, I was able to create 2 VM instances with consecutive internal IP addresses (under the same subnet).

I followed these steps:
1) On Cloud Console, went to “Instance templates” page
2) Selected an existing template (a new one can be created too)
3) Clicked on “Create VM”
4) Expanded the ‘Management, Security, Disks, Networking, Sole tenancy’ section and selected “Networking”
5) Edited the ‘Network interface’ section with the following:
- Under ‘Primary internal IP’, chose ‘Reserve a static internal IP address’ and then put a custom IP address (e.g. 10.128.0.2)
(For External IPs, there is no option to customize the reservation)

It is worth mentioning that Google Groups is a place for non-technical how-to questions (where you're likely to find information like service status updates and release notes, and ranging from book recommendations to creative shortcuts) [1].

If you need any help with this particular configuration with proxies, I would recommend you to consider reaching out to Stack Exchange sites [2] (e.g. Server Fault [3] or Stack Overflow [4]) where Google also participates that can help you find answers and troubleshoot problems.

(Please share the step by step instructions on what you have done so far omitting PII/sensitive information and more details about your end goal, so that the community can try to address your query accordingly)

[2] Ask Technical Questions on Stack Exchange Sites: https://cloud.google.com/support/docs/stackexchange
[3] Server Fault (A question and answer site for deploying and managing IT platforms): https://serverfault.com/questions/tagged/google-cloud-platform
[4] Stack Overflow (a question and answer site for programmers): https://stackoverflow.com/questions/tagged/google-cloud-platform
Reply all
Reply to author
Forward
0 new messages