Meta tags:
description= Set up an internal passthrough Network Load Balancer with VM instance group backends;
Headings (most frequently used words):
gcloud, console, api, configuration, load, configure, create, the, balancer, and, test, backend, your, vms, vm, instance, on, groups, client, with, backends, set, up, network, subnet, rules, use, traffic, ports, connection, start, basic, subnets, ipv6, region, firewall, components, ip, from, forwarding, frontend, review, an, internal, only, bash, script, using, global, access, address, accept, all, multiple, affinity, rule, to, setup, passthrough, group, stay, organized, collections, save, categorize, content, based, preferences, permissions, ipv4, dual, stack, additional, options, what, next, appendix, primer, install, tcp, server, startup, enable, managed, remove, external, addresses, reserved, two, session, tracking, policy, zonal, in, another, subsetting, for, packet, mirroring, products, pricing, support, resources, engage, ping, send, requests, balanced, connect, connectivity, new,
Text of the page (most frequently used words):
the (1147), network (351), and (339), load (290), for (283), compute (271), create (258), west1 (258), #backend (240), internal (228), ipv6 (221), instance (219), subnet (206), balancer (200), click (197), name (189), allow (186), region (152), rule (144), address (143), you (143), https (140), gcloud (136), this (133), following (131), zone (128), projects (123), project_id (123), health (114), googleapis (113), com (113), vms (112), forwarding (110), cloud (104), group (101), instances (100), ilb (100), that (99), check (98), google (97), from (97), http (96), with (92), select (90), traffic (85), example (84), ports (83), stack (79), passthrough (78), rules (77), www (77), service (76), set (76), ssh (75), client (75), post (74), tcp (72), global (71), add (70), all (67), configure (66), groups (66), enter (65), configuration (64), firewall (64), ranges (64), server (62), use (62), only (61), console (61), range (58), ipv4 (57), networks (56), echo (56), two (55), information (54), type (53), access (53), request (52), page (50), default (50), section (50), balancing (49), regions (48), backends (48), source (46), can (46), test (46), 443 (46), vpc (45), port (45), tags (44), ingress (44), zones (43), dual (43), using (42), script (42), 8008 (40), apache2 (40), are (39), your (39), method (39), curl (39), 8080 (39), 8088 (39), overview (38), frontend (38), connections (38), then (37), see (36), command (36), ssl (36), false (36), external (36), etc (36), table (35), custom (35), connection (35), four (35), unmanaged (35), uses (34), subnetwork (34), debian (34), listen (34), socket (34), target (34), new (33), regional (33), nlisten (32), sed (32), these (31), insert (31), each (31), run (30), zonal (30), mode (30), managed (30), metadata (30), tee (30), direction (30), route (29), incoming (29), europe (29), more (28), local (28), how (28), checks (28), making (28), 8443 (28), prt_conf (28), ens4 (27), balancers (27), update (27), replace (26), ipprotocol (26), subnets (26), image (26), cat (26), services (25), connectivity (25), subnetworks (25), step (24), steps (24), next (24), protocol (24), any (24), conf (24), response (24), action (23), same (23), affinity (23), when (23), get (23), list (22), specified (22), startup (22), udp (22), api (22), file_ports (22), file_http_site (22), file_https_site (22), packets (21), interface (21), enable (21), choose (21), which (21), neg (21), fd20 (20), done (20), routing (19), dev (19), bash (19), options (19), note (19), addresses (19), html (19), 1000 (19), priority (19), available (18), forwardingrules (18), delete (18), vm_hostname (18), need (17), used (17), make (17), multiple (17), true (17), about (16), metric (16), pref (16), medium (16), connect (16), ephemeral (16), sites (16), indicated (16), protocols (16), instancegroups (16), firewalls (16), proto (15), created (15), networking (15), proxy (15), single (15), requests (15), because (15), beta (15), project (15), management (15), targets (15), policy (14), fe80 (14), creates (14), review (14), components (14), filter (14), assigned (14), http_listen_prts (14), http_vh_prts (14), https_listen_prts (14), https_vh_prts (14), prt_conf_2 (14), http_site_conf (14), http_site_conf_2 (14), https_site_conf (14), https_site_conf_2 (14), other (13), apache (13), bind (13), install (13), scheme (13), option (13), template (13), boot (13), specify (13), balanced (13), probe (13), allows (13), hybrid (13), vip (12), based (12), not (12), networktier (12), premium (12), second (12), edit (12), match (12), change (12), static (12), configured (12), repeat (12), startup_script_completed (12), apt (12), server_socket (12), policies (11), sudo (11), kernel (11), show (11), setup (11), application (11), backendservices (11), shows (11), settings (11), one (11), session (11), served (11), index (11), describe (11), url (11), applicable (11), within (11), architecture (10), support (10), its (10), 307 (10), 120c (10), 2000 (10), again (10), packet (10), want (10), advanced (10), required (10), demonstrate (10), spillover (10), tracking (10), behavior (10), values (10), purpose (10), accept (10), internet (10), family (10), bin (10), flavor (10), computemetadata (10), standard (10), ipv6_address (10), expected (10), listens (10), tag (10), system (9), send (9), 2ff (9), fe36 (9), ffbe (9), gateway (9), sends (9), named (9), identify (9), they (9), field (9), patch (9), subsetting (9), number (9), insecure (9), loadbalancingscheme (9), primary (9), verify (9), fields (9), must (9), disabled (9), flag (9), interfaces (9), var (9), ensure (9), like (9), combinations (9), ula (9), ipv4_ipv6 (9), buckets (9), code (8), content (8), via (8), should (8), parameters (8), blue (8), mark (8), before (8), have (8), distributed (8), shared (8), nat (8), 000 (8), _default_ (8), restart (8), disk (8), binds (8), listening (8), interface_name (8), body (8), close (8), necho (8), sourceranges (8), allowed (8), icmp (8), logconfig (8), thumb (7), mtu (7), after (7), different (7), troubleshoot (7), concepts (7), mirroring (7), start (7), specific (7), procedure (7), backendservice (7), version (7), either (7), ratio (7), also (7), automatically (7), remove (7), linux (7), items (7), images (7), located (7), separate (7), testing (7), python (7), virtual (7), contains (7), being (7), apply (7), web (7), guide (7), storage (7), negs (7), mtls (7), capabilities (7), resources (6), output (6), view (6), 100 (6), through (6), failover (6), collector_backend_service (6), where (6), mirror (6), basic (6), public (6), data (6), monitor (6), existing (6), ipaddress (6), finalize (6), there (6), continuing (6), zonal_affinity_spill_cross_zone (6), among (6), reserve (6), accepts (6), exit (6), a2ensite (6), a2enmod (6), systemctl (6), touch (6), gnu (6), demonstrates (6), actual (6), af_inet6 (6), forwarding_rule_vip (6), import (6), urllib (6), headers (6), specifies (6), server_address (6), print (6), client_socket (6), running (6), later (6), distribution (6), addinstances (6), health_check_ranges (6), serverless (6), premises (6), cross (6), terms (5), originating (5), subnet_range (5), matches (5), gateway_address (5), don (5), provide (5), connected (5), cannot (5), regionbackendservices (5), without (5), certificates (5), ipcidrrange (5), clients (5), work (5), instead (5), none (5), look (5), useful (5), maximum (5), necessary (5), connecting (5), client2 (5), machinetype (5), machinetypes (5), canipforward (5), networkinterfaces (5), accessconfigs (5), one_to_one_nat (5), disks (5), persistent (5), read_write (5), autodelete (5), devicename (5), initializeparams (5), sourceimage (5), disktype (5), disktypes (5), disksizegb (5), scheduling (5), preemptible (5), deletionprotection (5), described (5), file (5), always (5), contents (5), destination (5), targettags (5), prefix (5), ping (5), roles (5), troubleshooting (5), metrics (5), redirect (5), português (4), español (4), manage (4), contact (4), down (4), details (4), non (4), lookup (4), outgoing (4), defined (4), forward (4), expires (4), 256 (4), starting (4), logging (4), monitoring (4), dns (4), names (4), important (4), health_check_name (4), checkbox (4), facing (4), follow (4), security (4), might (4), self (4), works (4), persistence (4), unhealthy (4), supported (4), placeholders (4), both (4), shared_loadbalancer_vip (4), numbers (4), save (4), already (4), size (4), templates (4), optional (4), location (4), selected (4), bookworm (4), additional (4), them (4), ipv6_only (4), validate (4), correct (4), simple (4), library (4), thank (4), closes (4), key (4), so_bindtodevice (4), programming (4), get_vm_hostname (4), req (4), sock_stream (4), so_reuseaddr (4), setsockopt (4), sol_socket (4), encode (4), client_address (4), 200 (4), handle (4), times (4), automatic (4), 2600 (4), 2d00 (4), b029 (4), sources (4), manually (4), stacktype (4), balancingmode (4), healthchecks (4), regionhealthchecks (4), napt (4), nprt_conf (4), identical (4), simplicity (4), software (4), 130 (4), 211 (4), 191 (4), ula_ipv6_range (4), guides (4), tools (4), maps (4), logs (4), terraform (4), examples (4), third (3), samples (3), status (3), products (3), last (3), under (3), sysctl (3), net (3), ip_nonlocal_bind (3), follows (3), adds (3), 1460 (3), referenced (3), link (3), provides (3), description (3), commands (3), configuring (3), requires (3), case (3), feature (3), observe (3), signed (3), privateipgoogleaccess (3), another (3), zonal_affinity_stay_within_zone (3), product (3), features (3), timeout (3), rest (3), reference (3), reserved (3), let (3), column (3), common (3), over (3), error (3), current (3), permit (3), allocated (3), download (3), such (3), machine (3), autohealing (3), usage (3), autoscaling (3), production (3), appears (3), enlarge (3), contacts (3), serve (3), text (3), learn (3), appropriate (3), having (3), nature (3), placed (3), omit (3), interprets (3), mean (3), systems (3), blocks (3), deny (3), restrictive (3), just (3), sessions (3), creation (3), private (3), document (3), pass (3), value (3), deliver (3), however (3), comma (3), separated (3), formatted (3), quoted (3), strings (3), communication (3), internalipv6range (3), consider (3), documentation (3), back (3), implemented (3), guest (3), itself (3), responses (3), iam (3), admin (3), engine (3), tls (3), explore (3), tutorials (3), directory (3), registration (3), migrate (3), classic (3), 한국어 (2), 日本語 (2), עברית (2), brasil (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), sign (2), site (2), youtube (2), started (2), pricing (2), understand (2), updated (2), 2026 (2), utc (2), licensed (2), license (2), feedback (2), added (2), main (2), 1024 (2), 89sec (2), 24ff (2), feb1 (2), 59b3 (2), multicast (2), ff00 (2), previous (2), 62sec (2), outlined (2), appendix (2), clean (2), accessing (2), fundamentals (2), forwarding_rule_name (2), collector (2), instance_group (2), order (2), lets (2), performance (2), consistent_hash_subsetting (2), specifying (2), scale (2), handled (2), regardless (2), including (2), subject (2), sections (2), pre (2), seconds (2), entry (2), idle_timeout_value (2), connection_persistence_behavior (2), tracking_mode (2), updating (2), backend_service (2), valid (2), idle (2), cli (2), client_ip (2), setting (2), certificate (2), replacement (2), handling (2), alternative (2), strategy (2), installs (2), configures (2), remain (2), adding (2), assign (2), reservation (2), promote (2), deleteaccessconfig (2), replacing (2), config (2), determine (2), removing (2), directly (2), multi (2), modify (2), allowglobalaccess (2), enabled (2), has (2), reboot (2), find (2), sets (2), handles (2), loop (2), binding (2), accepting (2), sending (2), write (2), locally (2), fetch (2), hostname (2), def (2), urlopen (2), return (2), read (2), decode (2), object (2), reusing (2), avoid (2), errors (2), restarting (2), interface_index (2), if_nametoindex (2), argument (2), queued (2), message (2), indicating (2), ready (2), bound (2), while (2), accepted (2), generate (2), construct (2), proper (2), length (2), len (2), plain (2), sendall (2), eof (2), executable (2), chmod (2), python3 (2), stored (2), root (2), folder (2), earlier (2), going (2), takes (2), few (2), minutes (2), scope (2), needs (2), initiate (2), bgp (2), prompted (2), allocate (2), complete (2), fixed (2), cidr (2), block (2), supports (2), 1db0 (2), b882 (2), 802 (2), connectiondraining (2), drainingtimeoutsec (2), httphealthcheck (2), although (2), na2ensite (2), na2enmod (2), nfile_ports (2), nfile_http_site (2), nfile_https_site (2), nhttp_listen_prts (2), nhttp_vh_prts (2), nhttps_listen_prts (2), nhttps_vh_prts (2), nvm_hostname (2), nhttp (2), 169 (2), 254 (2), ntee (2), nprt_conf_2 (2), nhttp_site_conf (2), nhttp_site_conf_2 (2), nhttps_site_conf (2), nhttps_site_conf_2 (2), nsystemctl (2), debian_image_name (2), instructional (2), associated (2), delivered (2), preserving (2), runs (2), 192 (2), 198 (2), ipv6accesstype (2), refer (2), control (2), dynamic_routing_mode (2), selects (2), transmission (2), unit (2), 1500 (2), autocreatesubnetworks (2), enableulainternalipv6 (2), routingconfig (2), routingmode (2), assigns (2), illustrated (2), parameter (2), hops (2), routed (2), makes (2), way (2), sent (2), operating (2), those (2), will (2), conditions (2), task (2), permissions (2), sdk (2), languages (2), frameworks (2), infrastructure (2), costs (2), observability (2), migration (2), industry (2), solutions (2), multicloud (2), databases (2), analytics (2), pipelines (2), hosting (2), development (2), pools (2), optimizations (2), authorization (2), workload (2), identity (2), pool (2), convert (2), capacity (2), app (2), functions (2), constraints (2), technology (2), areas (2), subscribe, newsletter, our, decade, climate, join, cookies, privacy, tech, twitter, events, blog, engage, training, certification, center, getting, github, release, notes, community, forums, sales, marketplace, easy, easytounderstand, solved, problem, solvedmyproblem, otherup, hard, hardtounderstand, incorrect, sample, incorrectinformationorsamplecode, missing, missingtheinformationsamplesineed, otherdown, tell, except, otherwise, noted, java, registered, trademark, oracle, affiliates, developers, creative, commons, attribution, line, telling, 32765, 32766, were, pointing, routes, brief, related, here, context, aid, understanding, primer, issues, peer, what, l3_default, configurations, balance, destinations, copy, collect, collected, help, detect, threats, does, than, 250, enabling, temporarily, disruptive, break, caution, deployment, larger, nonzero, zero, offerings, general, limited, launch, stage, descriptions, preview, maintained, processes, matched, sec, docs, includes, sessionaffinity, types, hash, prefixlength, addresstype, supporting, five, fewer, allports, whose, keyword, hold, pointer, try, encounter, conflicting, resource_type, forwarding_rule, resource_name, existing_forwarding_rule_name, six, certain, determines, component, unlike, doesn, reserving, alternatively, accessconfig, networkinterface, limits, leave, was, could, their, prevents, disconnect, optionally, minimum, autoscale, require, simpler, distribute, did, word, format, whether, include, says, changes, accessible, still, expands, tasks, perform, nano, indicates, serves, called, ipversion, 2001, db8, advertisement, routers, dynamic, bc7, 9a1c, add_box, diagram, means, instructions, creating, originated, grep, inspect, looking, part, but, why, behind, responded, comes, repeated, answered, won, able, removed, processed, environment, state, attempt, notice, out, devices, il4, label, append, colon, come, generating, displayed, virtue, been, tests, equivalent, time, initiating, allowing, looks, subsequent, instanceadmin, securityadmin, networkadmin, role, owner, editor, guidance, teach, familiarize, yourself, categorize, preferences, stay, organized, collections, home, audit, operate, maintain, map, quota, units, proxies, endpoint, draining, customize, quantum, authenticated, user, provided, mutual, encryption, secure, switch, between, deploy, hub, spoke, hop, party, appliances, weighted, optimize, latency, published, domain, faster, improved, protection, best, practices, fail, high, availability, rewrite, header, query, roll, bucket, organization, comparison, resource, model, discover, free, skip,
Text of the page (random words):
h as fd20 bc7 9a1c 48 within the network network create a subnet for backends in the us west1 region and another subnet for testing global access in the europe west1 region to create the subnets run the gcloud compute networks subnets create command gcloud compute networks subnets create lb subnet network lb network dual stack range 10 1 2 0 24 region us west1 stack type ipv4_ipv6 ipv6 access type internal gcloud compute networks subnets create europe subnet network lb network dual stack range 10 3 4 0 24 region europe west1 stack type ipv4_ipv6 ipv6 access type internal api create a new custom mode vpc network to configure internal ipv6 ranges on any subnets in this network set enableulainternalipv6 to true this option assigns a 48 range from within the fd20 20 range used by google for internal ipv6 subnet ranges if you want to select which 48 ipv6 range that is assigned also use the internalipv6range field to specify a range post https compute googleapis com compute v1 projects project_id global networks autocreatesubnetworks false name lb network dual stack mtu mtu enableulainternalipv6 true internalipv6range ula_ipv6_range routingconfig routingmode dynamic_routing_mode replace the following project_id the id of the project where the vpc network is created mtu the maximum transmission unit of the network mtu can either be 1460 default or 1500 review the maximum transmission unit overview before setting the mtu to 1500 ula_ipv6_range a 48 prefix from within the fd20 20 range used by google for internal ipv6 subnet ranges if you don t provide a value for internalipv6range google selects a 48 prefix for the network dynamic_routing_mode either global or regional to control the route advertisement behavior of cloud routers in the network for more information refer to dynamic routing mode for more information refer to the networks insert method make two post requests to the subnetworks insert method post https compute googleapis com compute v1 projects project_id regions region subnetworks ipcidrrange 10 1 2 0 24 network lb network dual stack name lb subnet stacktype ipv4_ipv6 ipv6accesstype internal post https compute googleapis com compute v1 projects project_id regions region subnetworks ipcidrrange 10 3 4 0 24 network lb network dual stack name europe subnet stacktype ipv4_ipv6 ipv6accesstype internal configure firewall rules this example uses the following firewall rules fw allow lb access an ingress rule applicable to all targets in the vpc network that allows traffic from sources in the 10 1 2 0 24 and 10 3 4 0 24 ranges this rule allows incoming traffic from any client located in either of the two subnets later you can configure and test global access fw allow lb access ipv6 an ingress rule applicable to all targets in the vpc network that allows traffic from sources in the ipv6 range configured in the subnet this rule allows incoming ipv6 traffic from any client located in either of the two subnets later you can configure and test global access fw allow ssh an ingress rule applicable to the instances being load balanced that allows incoming ssh connectivity on tcp port 22 from any address you can choose a more restrictive source ip range for this rule for example you can specify just the ip ranges of the system from which you initiate ssh sessions this example uses the target tag allow ssh to identify the vms to which it should apply fw allow health check an ingress rule applicable to the instances being load balanced that allows traffic from the google cloud health check probe ranges this example uses the target tag allow health check to identify the instances to which it should apply fw allow health check ipv6 an ingress rule applicable to the instances being load balanced that allows traffic from the google cloud health check probe ranges this example uses the target tag allow health check ipv6 to identify the instances to which it should apply without these firewall rules the default deny ingress rule blocks incoming traffic to the backend instances note you must create a firewall rule to allow health checks from the ip ranges of google cloud probe systems see probe ip ranges for more information console in the google cloud console go to the firewall policies page go to firewall policies to create the rule to allow subnet traffic click create firewall rule and enter the following information name fw allow lb access network lb network dual stack priority 1000 direction of traffic ingress action on match allow targets all instances in the network source filter ipv4 ranges source ipv4 ranges 10 1 2 0 24 and 10 3 4 0 24 protocols and ports allow all click create to allow ipv6 subnet traffic click create firewall rule again and enter the following information name fw allow lb access ipv6 network lb network dual stack priority 1000 direction of traffic ingress action on match allow targets all instances in the network source filter ipv6 ranges source ipv6 ranges ipv6_address assigned in the lb subnet protocols and ports allow all click create to allow incoming ssh connections click create firewall rule again and enter the following information name fw allow ssh network lb network dual stack priority 1000 direction of traffic ingress action on match allow targets specified target tags target tags allow ssh source filter ipv4 ranges source ipv4 ranges 0 0 0 0 0 protocols and ports select specified protocols and ports select the tcp checkbox and then enter 22 in ports click create to allow google cloud ipv6 health checks click create firewall rule again and enter the following information name fw allow health check ipv6 network lb network dual stack priority 1000 direction of traffic ingress action on match allow targets specified target tags target tags allow health check ipv6 source filter ipv6 ranges source ipv6 ranges 2600 2d00 1 b029 64 protocols and ports allow all click create to allow google cloud health checks click create firewall rule again and enter the following information name fw allow health check network lb network dual stack priority 1000 direction of traffic ingress action on match allow targets specified target tags target tags allow health check source filter ipv4 ranges source ipv4 ranges 35 191 0 0 16 130 211 0 0 22 protocols and ports allow all click create gcloud create the fw allow lb access firewall rule to allow communication with the subnet gcloud compute firewall rules create fw allow lb access network lb network dual stack action allow direction ingress source ranges 10 1 2 0 24 10 3 4 0 24 rules all create the fw allow lb access ipv6 firewall rule to allow communication with the subnet gcloud compute firewall rules create fw allow lb access ipv6 network lb network dual stack action allow direction ingress source ranges ipv6_address rules all replace ipv6_address with the ipv6 address assigned in the lb subnet create the fw allow ssh firewall rule to allow ssh connectivity to vms with the network tag allow ssh when you omit source ranges google cloud interprets the rule to mean any source gcloud compute firewall rules create fw allow ssh network lb network dual stack action allow direction ingress target tags allow ssh rules tcp 22 create the fw allow health check ipv6 rule to allow google cloud ipv6 health checks gcloud compute firewall rules create fw allow health check ipv6 network lb network dual stack action allow direction ingress target tags allow health check ipv6 source ranges 2600 2d00 1 b029 64 rules tcp udp create the fw allow health check rule to allow google cloud ipv4 health checks gcloud compute firewall rules create fw allow health check network lb network dual stack action allow direction ingress target tags allow health check source ranges 35 191 0 0 16 130 211 0 0 22 rules tcp udp icmp api create the fw allow lb access firewall rule by making a post request to the firewalls insert method post https compute googleapis com compute v1 projects project_id global firewalls name fw allow lb access network https www googleapis com compute v1 projects project_id global networks lb network dual stack priority 1000 sourceranges 10 1 2 0 24 10 3 4 0 24 allowed ipprotocol tcp ipprotocol udp ipprotocol icmp direction ingress logconfig enable false disabled false create the fw allow lb access ipv6 firewall rule by making a post request to the firewalls insert method post https compute googleapis com compute v1 projects project_id global firewalls name fw allow lb access ipv6 network https www googleapis com compute v1 projects project_id global networks lb network dual stack priority 1000 sourceranges ipv6_address allowed ipprotocol tcp ipprotocol udp ipprotocol icmp direction ingress logconfig enable false disabled false replace ipv6_address with the ipv6 address assigned in the lb subnet create the fw allow ssh firewall rule by making a post request to the firewalls insert method post https compute googleapis com compute v1 projects project_id global firewalls name fw allow ssh network https www googleapis com compute v1 projects project_id global networks lb network dual stack priority 1000 sourceranges 0 0 0 0 0 targettags allow ssh allowed ipprotocol tcp ports 22 direction ingress logconfig enable false disabled false create the fw allow health check ipv6 firewall rule by making a post request to the firewalls insert method post https compute googleapis com compute v1 projects project_id global firewalls name fw allow health check ipv6 network https www googleapis com compute v1 projects project_id global networks lb network dual stack priority 1000 sourceranges health_check_ranges targettags allow health check ipv6 allowed ipprotocol tcp ipprotocol udp direction ingress logconfig enable false disabled false replace the following project_id the project id health_check_ranges the comma separated list of google cloud health check probe ranges formatted as quoted strings for example 2001 db8 32 create the fw allow health check firewall rule by making a post request to the firewalls insert method post https compute googleapis com compute v1 projects project_id global firewalls name fw allow health check network https www googleapis com compute v1 projects project_id global networks lb network dual stack priority 1000 sourceranges health_check_ranges targettags allow health check allowed ipprotocol tcp ipprotocol udp ipprotocol icmp direction ingress logconfig enable false disabled false replace the following project_id the project id health_check_ranges the comma separated list of google cloud health check probe ranges formatted as quoted strings for example 192 0 2 0 24 198 51 100 0 24 create backend vms and instance groups this example uses two unmanaged instance groups each having two backend server vms to demonstrate the regional nature of internal passthrough network load balancers the two instance groups are placed in separate zones us west1 a and us west1 c instance group ig a contains these two vms vm a1 vm a2 instance group ig c contains these two vms vm c1 vm c2 traffic to all four of the backend vms is load balanced to support this example and the additional configuration options each of the four vms runs an apache web server that listens on the following tcp ports 80 8008 8080 8088 443 and 8443 each vm is assigned an internal ip address in the lb subnet and an ephemeral external public ip address you can remove the external ip addresses later external ip address for the backend vms are not required however they are useful for this example because they permit the backend vms to download apache from the internet and they can connect using ssh by default apache is configured to bind to any ip address internal passthrough network load balancers deliver packets by preserving the destination ip ensure that server software running on your backend vms is listening on the ip address of the load balancer s internal forwarding rule if you configure multiple internal forwarding rules ensure that your software listens to the internal ip address associated with each one the destination ip address of a packet delivered to a backend vm by an internal passthrough network load balancer is the internal ip address of the forwarding rule if you re using managed instance groups ensure that the subnetwork stack type matches the stack type of instance templates used by the managed instance groups the subnetwork must be dual stack if the managed instance group is using a dual stack instance template for instructional simplicity these backend vms run debian gnu linux 12 console create backend vms in the google cloud console go to the vm instances page go to vm instances repeat steps 3 to 8 for each vm using the following name and zone combinations name vm a1 zone us west1 a name vm a2 zone us west1 a name vm c1 zone us west1 c name vm c2 zone us west1 c click create instance set the name as indicated in step 2 for region select us west1 and choose a zone as indicated in step 2 in the boot disk section ensure that debian gnu linux 12 bookworm is selected for the boot disk options if necessary click change to change the image click advanced options click networking and configure the following fields for network tags enter allow ssh and allow health check ipv6 for network interfaces select the following network lb network dual stack subnet lb subnet ip stack type ipv4 and ipv6 dual stack primary internal ipv4 address ephemeral automatic external ipv4 address ephemeral click management and then in the startup script field enter the following script the script contents are identical for all four vms bin bash if f etc startup_script_completed then exit 0 fi apt get update apt get install apache2 y a2ensite default ssl a2enmod ssl file_ports etc apache2 ports conf file_http_site etc apache2 sites available 000 default conf file_https_site etc apache2 sites available default ssl conf http_listen_prts listen 80 nlisten 8008 nlisten 8080 nlisten 8088 http_vh_prts 80 8008 8080 8088 https_listen_prts listen 443 nlisten 8443 https_vh_prts 443 8443 vm_hostname curl h metadata flavor google http metadata google internal computemetadata v1 instance name echo page served from vm_hostname tee var www html index html prt_conf cat file_ports prt_conf_2 echo prt_conf sed s listen 80 http_listen_prts prt_conf echo prt_conf_2 sed s listen 443 https_listen_prts echo prt_conf tee file_ports http_site_conf cat file_http_site http_site_conf_2 echo http_site_conf sed s 80 http_vh_prts echo http_site_conf_2 tee file_http_site https_site_conf cat file_https_site https_site_conf_2 echo https_site_conf sed s _default_ 443 https_vh_prts echo https_site_conf_2 tee file_https_site systemctl restart apache2 touch etc startup_script_completed click create create instance groups in the google cloud console go to the instance groups page go to instance groups repeat the following steps to create two unmanaged instance groups each with two vms in them using these combinations instance group name ig a zone us west1 a vms vm a1...
|