Network Connectivity Center and appliances for PCNE: ILB next hop, site-to-site, PSC
Your security team has just bought a cluster of third-party next generation firewalls (NGFW) and set one rule: every connection between production-vpc and development-vpc must pass through it, and anything malicious must be blocked on the spot. You turn on Packet Mirroring with full logging, yet a test attack still reaches the target VM. The same week, office users report they cannot reach Cloud SQL through Private Service Connect, even though the Interconnect looks "green". Both incidents sit in sections 1, 2 and 4 of the Professional Cloud Network Engineer exam (about 21%, 20% and 16%): third-party appliances, an ILB as next hop, Network Connectivity Center (NCC) and hybrid spokes. This post walks through how each piece works, gcloud commands, the limits that break designs, a decision table and example questions taken from the three newest questions in the free preview. For exam format and scope, see the PCNE study guide.
Key takeaways
- Block traffic in real time: inline appliances behind an internal passthrough Network Load Balancer used as next hop; Packet Mirroring only copies.
- Multi-NIC appliances need
--can-ip-forward; one load balancer and one static route per VPC, each pointing at the matching NIC. - Connect two data centers over Google's network: an NCC hub, VLAN attachments as hybrid spokes, site-to-site data transfer turned on.
- On-premises access to a PSC endpoint in another spoke:
--export-pscon the hub, the routing VPC must also be a VPC spoke, and global access if the region differs.
Block it or just watch it: inline versus Packet Mirroring
The first thing I always ask: does the inspection device sit in the path of the packet, or does it only see a copy? The PCNE exam uses this difference to rule out answers.
Out-of-band: Packet Mirroring
Packet Mirroring copies the traffic of selected VMs (by subnet, network tag or instance name) and sends the copy to a group of collectors behind an internal passthrough Network Load Balancer. The copy includes headers and payload, which suits IDS tools or performance troubleshooting. The mirroring happens on the VM itself, not on the network, so the source VMs spend extra bandwidth.
The core problem: the original packet still goes straight to its destination. By the time a collector spots an attack, the packet has already arrived. A script that calls an API to add a blocking rule afterwards is still a late reaction. Also, Cloud Armor is attached to external load balancers and some other load balancers; it does not sit between two internal VPCs, so "detect, then call Cloud Armor" does nothing for traffic between production-vpc and development-vpc.
Inline: the appliance sits in the path
Inline means a packet must pass through the appliance before it can reach its destination. The appliance decides whether to forward or drop it. This is the only way an IPS (intrusion prevention system) can truly "prevent". On Google Cloud, two inline options come up on the exam:
- Multi-NIC appliances plus static routes pointing at an internal passthrough Network Load Balancer. The classic pattern and the one the exam asks about most; covered in depth below.
- Cloud NGFW Enterprise. A Google-managed IPS: you create zonal firewall endpoints and a
threat-preventionsecurity profile, then firewall policy rules use theapply_security_profile_groupaction. No VMs to run yourself.
When a question says "prevent", "block in real time" or "before it reaches its destination", answers built on copies of traffic are almost always out.
A copy is for looking; to block, the appliance must be in the path.
An internal passthrough Network Load Balancer as next hop for appliances
Why a load balancer instead of pointing the route at one VM
You can create a static route whose next hop is a single VM. But one VM is a single point of failure: if it dies, all traffic between the two VPCs dies with it. Put several appliances behind an internal passthrough Network Load Balancer (formerly the internal TCP/UDP load balancer) and point the static route at its forwarding rule, and you remove the single point of failure (health checks send new connections to healthy appliances), you can scale (a managed instance group can autoscale), and latency stays low because a passthrough load balancer does not proxy or rewrite source and destination addresses.
Clients need no configuration: they send packets as usual, and VPC routing pushes them to the load balancer, "bump-in-the-wire" style. As a next hop, the load balancer forwards all traffic on all ports to the backends, ICMP included, no matter which protocol and ports the forwarding rule declares.
Two VPCs, one appliance cluster
Each appliance is a VM with two NICs: nic0 in production-vpc and nic1 in development-vpc. You create two load balancers, one per VPC, sharing the same VMs. The prod load balancer sends packets to nic0, the dev load balancer to nic1. Each VPC gets one static route: "to reach the other VPC's range, go through my load balancer". That is the answer to practice question #306.
What about return traffic? Google Cloud uses symmetric hashing: for the same flow, swapping source and destination gives the same hash, so request and reply packets land on the same appliance without SNAT. The condition: both load balancers must pick backends the same way (same session affinity, not CLIENT_IP_NO_DESTINATION, same connection tracking and failover settings).
Sample commands
# Appliances must be allowed to forward packets
# fwp, fwd: appliance subnets in prod and dev
gcloud compute instance-templates create ngfw-tpl \
--machine-type=n2-standard-8 \
--can-ip-forward \
--network-interface=network=prod-vpc,subnet=fwp,no-address \
--network-interface=network=dev-vpc,subnet=fwd,no-address
# Prod frontend; backend service be-ngfw-prod
# uses network=prod-vpc (repeat for dev-vpc)
gcloud compute forwarding-rules create fr-ngfw-prod \
--load-balancing-scheme=INTERNAL \
--region=us-central1 \
--network=prod-vpc --subnet=fwp \
--ip-protocol=TCP --ports=ALL \
--backend-service=be-ngfw-prod
# Route: traffic to the dev range goes via appliances
gcloud compute routes create prod-to-dev \
--network=prod-vpc \
--destination-range=10.20.0.0/16 \
--next-hop-ilb=fr-ngfw-prod \
--next-hop-ilb-region=us-central1
Don't forget a firewall rule that allows Google's health check ranges (35.191.0.0/16 and 130.211.0.0/22) to reach the appliances, or every backend will show as unhealthy.
Limits that break designs
- You can't override subnet routes. A static route can't match or be more specific than a local subnet route or a peering subnet route. So if the two VPCs are already peered, traffic follows the peering route and skips the appliances, and you can't even create a route on top of it. To force traffic through appliances, the two VPCs must not be connected directly.
- No routing through appliances between two subnets of the same VPC, for the same reason.
- Routes are regional in effect. The load balancer and the route must be in the same VPC. Without global access, packets from another region that hit the route are dropped.
- No ECMP across load balancers. If two routes differ only in their next-hop load balancer, Google picks one and does not split traffic.
- When every backend is unhealthy, the route stays in effect and packets are still sent to a backend. A health check is not a switch to another path.
Multiple NICs, IP forwarding, one ILB and one route per VPC: know these four and most appliance questions are easy.
Network Connectivity Center: hubs, spokes and topologies
The problem NCC solves
VPC Network Peering is not transitive: if A peers with B and B peers with C, A still can't reach C. With dozens of VPCs plus on-premises sites, a full mesh of peerings becomes a burden. NCC switches to hub-and-spoke: each attached network is a spoke and the hub holds a shared route table.
Spoke types
- VPC spoke: a VPC attached to the hub. You can filter which subnet ranges are exported to the hub with
--include-export-rangesand--exclude-export-ranges. - Hybrid spoke: Cloud Interconnect VLAN attachments, HA VPN tunnels, or a router appliance (a third-party VM that exchanges BGP routes with Cloud Router). The VPC that holds these hybrid resources is called the routing VPC.
Topologies: mesh and star
When you create a hub you pick a preset topology, and it can't be changed later. The default is mesh.
- Mesh: all spokes are in one group and can talk to each other.
- Star: two groups, center and edge. Center talks to everyone; edge only talks to center, and edge spokes can't see each other. Useful when each team's VPC may only reach a shared services VPC. Hybrid spokes with site-to-site data transfer must be in the center group.
gcloud network-connectivity hubs create corp-hub \
--preset-topology=mesh --export-psc
gcloud network-connectivity spokes linked-vpc-network \
create prod-spoke --hub=corp-hub --global \
--vpc-network=projects/PROJECT_ID/global/networks/prod
Note: if traffic between prod and dev must go through appliances, don't attach both as VPC spokes to the same mesh hub.
Peering connects pairs; NCC is a central exchange, and you choose its topology once.
Site-to-site data transfer: linking two data centers over Google's network
The idea
A company has datacenter-east and datacenter-west, both already connected to Google Cloud. Instead of leasing a private line between them, you send their traffic across Google's backbone: each hybrid connection becomes a spoke, and the hub links the spokes in a full mesh. NCC calls this site-to-site data transfer.
For a "secure and high bandwidth" requirement, the answer is an NCC hub with hub-vpc as a VPC spoke and the two Dedicated Interconnects (VLAN attachments) as hybrid spokes with site-to-site data transfer turned on. That is question #309. Using HA VPN tunnels as hybrid spokes also works technically, but VPN runs over the internet with far less bandwidth than Interconnect, so it loses on "high bandwidth".
gcloud network-connectivity spokes \
linked-interconnect-attachments create east-spoke \
--hub=corp-hub --region=us-east4 \
--interconnect-attachments=east-a,east-b \
--site-to-site-data-transfer
Without the --site-to-site-data-transfer flag, the spoke is site-to-cloud only: on-premises can reach the VPC, but the two sites can't reach each other through Google.
Conditions and limits from the docs
- Only available in supported locations; check the list before you design.
- Traffic between sites is best-effort, with no bandwidth or latency guarantees.
- When it is enabled for one or more spokes, all connectivity resources of those spokes must be in a single VPC.
- To exchange routes between spokes in several regions, that VPC must use the
globaldynamic routing mode. - Spoke resources must be configured for high availability (for example, a redundant pair of VLAN attachments), follow the ASN requirements, and the on-premises router must advertise identical routes to each spoke's Cloud Router.
Why the other options are wrong
A proxy VM between two Interconnects is a single point of failure and a bottleneck you have to run. Using Cloud Storage as a relay is file transfer, not network connectivity. Interconnects without NCC only let each site see the VPC, with no transit path between the sites.
Site-to-site is a flag on the hybrid spoke; forget it and the two sites see the cloud but not each other.
PSC connection propagation: sharing endpoints with other spokes and on-premises
The scenario
A common landing zone design: landing-zone-vpc holds the Interconnect VLAN attachments (hybrid spokes) and is both the routing VPC and a VPC spoke. prod-vpc is another VPC spoke and hosts Cloud SQL in us-central1, exposed through a Private Service Connect (PSC) endpoint. On-premises users arrive through the Interconnect in us-west1 and can't connect.
Two causes stack on top of each other:
- PSC endpoints are not transitive between spokes. By default, an endpoint in
prod-vpcis usable only from that VPC. PSC connection propagation creates "propagated connections" in the other VPC spokes. - Different regions. By default, a propagated connection is reachable only from workloads in the same region. For traffic from a VLAN attachment in
us-west1to reach an endpoint inus-central1, the endpoint needs global access.
So the answer is to turn on PSC connection propagation on the hub and update the endpoints to enable global access, as in question #313.
# Turn on propagation on an existing hub
gcloud network-connectivity hubs update corp-hub \
--export-psc
# Turn on global access for the Cloud SQL endpoint
gcloud compute forwarding-rules update sql-psc-ep \
--region=us-central1 --allow-psc-global-access
Conditions for on-premises to use propagated connections
- The hub must have exactly one routing VPC holding all hybrid spokes, and that routing VPC must also be a VPC spoke. A hub with two or more routing VPCs can't offer propagated connections to on-premises networks.
- Propagation works only with VPC spokes; it is not created for hybrid spokes or producer VPC spokes, and IPv6 endpoints are not supported.
- The endpoint must be in the
Acceptedstate. Subnets excluded from export with--exclude-export-rangesare not propagated. - Propagation is asynchronous; the docs say it can take up to 24 hours.
Why not just add endpoints in the landing zone
Creating extra PSC endpoints in landing-zone-vpc with the service attachment from gcloud sql instances describe can work, but every database and every VPC adds endpoints, IPs and DNS records to manage. When the question says "Google-recommended best practices", pick the hub's built-in feature. And the option "specify landing-zone-vpc as the target VPC" for propagation has no such parameter: propagation applies to all VPC spokes on the hub.
A PSC endpoint doesn't travel on its own: propagation takes it to other spokes, global access takes it to other regions.
Decision table: how to connect and how to inspect
| Requirement in the question | Choose | Why |
|---|---|---|
| Block malicious traffic between two VPCs in real time with third-party appliances | Multi-NIC appliances behind an internal passthrough NLB, a static route in each VPC pointing at the NLB | Inline, health-checked and autoscaled, passthrough so latency stays low |
| Detect, analyze and keep evidence, no blocking needed | Packet Mirroring (or Network Security Integration out-of-band) | Full payload copies, original packets unaffected |
| Google-managed IPS without running VMs | Cloud NGFW Enterprise (firewall endpoint + security profile) | Inline through firewall policy, no routes needed |
| Many VPCs must connect without a full mesh of peerings | NCC hub, VPC spokes, mesh topology | One shared route table with export filters |
| Team VPCs may reach a shared VPC but not each other | NCC star topology (center and edge) | Edge sees only center |
| Two data centers talk over Google's network with high bandwidth | Dedicated Interconnect as hybrid spokes with site-to-site data transfer | Transit over Google's backbone; Interconnect beats VPN on bandwidth |
| On-premises or another spoke needs a PSC endpoint in a different spoke | --export-psc on the hub (+ global access if the region differs) | Create the endpoint once, the hub propagates it |
Turn each requirement into a verb: block, watch, connect, share. Each verb maps to a group of tools.
Common traps
- Scenario: attacks must be stopped before they reach the destination. Trap: Packet Mirroring, then the Cloud Armor API to block the source. Mirroring is a copy, and Cloud Armor doesn't sit between internal VPCs. Correct: inline appliances behind an ILB next hop (question #306).
- Scenario: the route exists but packets don't go through the appliances. Check
--can-ip-forward, firewall rules for the health check ranges, global access across regions, and whether the two VPCs are peered. - Scenario: two data centers must connect over Google with high bandwidth. Trap: HA VPN as hybrid spokes (works, but lower bandwidth) or a proxy VM. Correct: Interconnect as hybrid spokes with site-to-site data transfer (question #309).
- Scenario: on-premises can't reach a PSC endpoint in a spoke in another region. Trap: turning on propagation but forgetting global access, or adding endpoints by hand in the landing zone. Correct: propagation + global access (question #313).
- Scenario: you want to switch a hub from mesh to star. Trap: assuming you can edit it. The topology is fixed at hub creation; you need a new hub.
Traps here are usually an answer that "works" but misses one word in the question: block, high bandwidth or best practice.
Reading the questions
- prevent / block in real time / before it reaches: must be inline. Drop every answer built on Packet Mirroring or reacting to logs.
- without single point of failure / without significant latency: several appliances behind an internal passthrough NLB, not one VM and not an L7 proxy.
- between on-premises sites using Google's network: NCC hybrid spokes + site-to-site data transfer; add high bandwidth and pick Interconnect.
- PSC endpoint + another VPC spoke / on-premises: PSC connection propagation; if two different regions appear, look for global access too.
Underline the verbs and region names first, then read the options.
Start practicing
Try 60 free Professional Cloud Network Engineer questions, then take a timed exam (Pro). See the six exam sections in the PCNE study guide, and choosing Interconnect, HA VPN and Cloud Router in the hybrid connectivity and load balancer post.