Why your forest trust won’t come up, and where the domain should really be attached.
You’ve built a clean hub-and-spoke landing zone on Google Cloud. A transit hub carries the Interconnect to the data center, application spokes hang off it, and everything talks to everything it should. Now the identity team asks for a Managed Service for Microsoft Active Directory domain with a forest trust to the existing on-premises AD.
You create the domain. You authorize it on the shared-services spoke, because that’s where identity lives in your design. You open the ports on the on-premises firewall, set up the conditional forwarders, and run gcloud active-directory domains trusts create.
The trust doesn’t validate. The on-premises domain controllers can’t see the Managed AD domain controllers, and the Managed AD domain controllers can’t see them either.
Nothing is misconfigured in the usual sense. The topology is the problem. This article explains why, and how to place the domain so the trust works the first time.
The part everybody forgets: Managed AD lives in a VPC you don’t own
Managed Microsoft AD domain controllers don’t run in your VPC. They run in a Google-managed VPC that is connected to each of your authorized networks by VPC Network Peering. In the documentation’s words, “authorized networks are Virtual Private Cloud (VPC) networks that are permitted to access the domain”, and “VPC peering enables this access.”
So the domain is always one peering hop away from wherever you authorize it. That’s fine for VMs in the authorized network. For anything further away, the two well-known properties of VPC peering kick in:
- Peering is not transitive. If A is peered to B and B is peered to C, A doesn’t reach C.
- Custom route exchange stops at the first hop. Routes learned over Interconnect or VPN by a Cloud Router can be exported to a direct peer, but not re-exported to the peers of that peer.
The Managed AD documentation makes the consequence explicit for hub-and-spoke designs:
“if the authorized network is a spoke or if it is peered to a network that is connected to the on-premises network, Managed Microsoft AD resources will not be able to reach on-premises resources, and vice versa.”
The reason given: “VPC peering is non-transitive and custom route exchange only supports propagating routes to an immediate peer, not to peers of peers.”
Map that onto the design above:
on-premises AD
│ Interconnect / HA VPN
┌────┴─────────────┐
│ transit hub VPC │ ← Cloud Router learns on-prem routes here
└────┬─────────────┘
│ VPC peering (hop 1)
┌────┴─────────────────────┐
│ shared-services spoke │ ← authorized network
└────┬─────────────────────┘
│ VPC peering (hop 2, managed by Google)
┌────┴─────────────────────┐
│ Managed AD VPC (Google) │ ✗ never learns the on-prem routes
└──────────────────────────┘
The on-premises prefixes reach the spoke, but they stop there. The Managed AD domain controllers have no route back to the data center.
Why a trust is the worst case
Plenty of workloads only need to reach the domain from GCP, and for them a spoke is a perfectly good authorized network. A forest trust is different, because it needs bidirectional, domain-controller-to-domain-controller traffic. The trust prerequisites list the minimal set of ports to open on the on-premises firewall, in both directions:

PortsDNSUDP/TCP 53KerberosUDP/TCP 88Kerberos password changeUDP/TCP 464RPCTCP 135, TCP 49152–65535LDAPUDP/TCP 389SMBUDP/TCP 445
On the Google Cloud side, the docs say “Managed Microsoft AD is preconfigured to permit traffic matching these characteristics”, so you don’t add firewall rules there. That’s exactly why this failure is confusing: both firewalls are right, and packets still have no path.
There’s a second trap, on the on-premises side. Even with a correct attachment point, the data center has to learn the Managed AD IP range, and Cloud Router doesn’t learn routes from peered VPC networks. The trust guide therefore asks for a custom advertised route on the Cloud Router that carries the reserved Managed AD range. If you skip it, the return traffic is lost on the way back.
Three ways out
Option A: authorize the domain on the network that carries hybrid connectivity
The simplest fix is to stop treating identity as “just another spoke” for networking purposes. Authorize the Managed AD domain directly on the transit VPC, the one where the Interconnect attachments or HA VPN tunnels and their Cloud Router live. Managed AD is then a direct peer of the network that learns the on-premises routes, so it receives them over a single hop. On the Cloud Router, add the Managed AD range as a custom advertisement.
You can keep authorizing application spokes too. They reach the domain over their own direct peering. Keep the budget in mind: Managed AD “supports adding up to 5 VPC networks to the authorized network list”. That’s another reason to anchor the domain on the transit network rather than on a growing list of spokes.
Trade-off: the identity domain is attached to your most sensitive network. Write the firewall policy of the transit VPC with that in mind.
Option B: Shared VPC
The hub-and-spoke page puts it plainly: “If possible, use a Shared VPC.” A Shared VPC “does not rely on peering, so it is not impacted by same route exchange limitations.” If the host project network also carries (or is) the hybrid attachment point, the problem disappears.
Trade-off: this is a landing zone design decision, not a fix you retrofit in an afternoon.
Option C: replace hub-to-spoke peering with VPN
The documentation also offers: “You can also use VPN between the hub and spokes instead of VPC peering to overcome the route exchange limitation.” With VPN, the hub’s routes are exported and Managed AD is considered a direct peer of the authorized network. The page recommends DNS peering between the authorized network and the hub and spokes, so that DNS requests reach the domain.
Trade-off: it’s “less ideal because it requires more network planning and incurs the extra cost of VPN tunnels.” It’s mainly useful if you have one isolated spoke that must host the domain.
What about Network Connectivity Center?
If your hub is a Network Connectivity Center hub rather than a peering mesh, you’ll be tempted to assume NCC solves this. The Managed AD hub-and-spoke page doesn’t mention NCC at all. The domain still attaches by VPC peering to one authorized network, and nothing in the docs says that routes NCC delivers to that network are re-exported over the Managed AD peering. Until you’ve tested it in a lab, treat it as unsupported and fall back to Option A.
Pre-flight checklist before trusts create
- Attachment point. Is the authorized network the one whose Cloud Router learns the on-premises routes, or a Shared VPC? If it’s a spoke behind a peered hub, stop here.
- Return route. Is the Managed AD reserved range in the Cloud Router’s custom advertisements, and do you see it in the on-premises routing table?
- Reachability test. From a VM in the authorized network, run Test-NetConnection against an on-premises DC on 88, 389 and 445. This tests the network path, not the trust.
- On-premises firewall. Are the ports in the table above open for ingress and egress, between the on-premises DCs and the Managed AD range?
- DNS, both ways.
- Local Security Policy on the on-premises DCs: anonymous access to the netlogon, samr and lsarpc named pipes.
- Direction. Decide it explicitly, and say it in the command:
gcloud active-directory domains trusts create DOMAIN \
--target-domain-name=ONPREM_FOREST_FQDN \
--target-dns-ip-addresses=ONPREM_DNS_IP_1,ONPREM_DNS_IP_2 \
--direction=OUTBOUND # or BIDIRECTIONAL
SID filtering is enabled by default when the trust is created. Leave it on unless you know exactly why you need it off.
References
- Deploy hub and spoke model — Managed Microsoft AD
- Create a trust with an on-premises domain
- Firewall rules for Managed Microsoft AD
- Manage authorized networks
- VPC Network Peering — restrictions
Managed Microsoft AD in a hub-and-spoke network: the non-transitive peering trap was originally published in Google Cloud – Community on Medium, where people are continuing the conversation by highlighting and responding to this story.
Source Credit: https://medium.com/google-cloud/managed-microsoft-ad-in-a-hub-and-spoke-network-the-non-transitive-peering-trap-85ddc03d9307?source=rss—-e52cf94d98af—4
