如果要手动测试解决方案,可执行以下 PowerShell 示例,以在路由表级别模拟解决方案。 本例将每个 Teams 媒体 IP 子网的路由添加到路由表中。 可以在使用 Teams 网络评估工具 之前和之后测试 Teams 媒体性能,并观察指定终结点的路由差异。
示例:将 Teams 媒体 IP 子网添加到路由表
$intIndex = "" # index of the interface connected to the internet
$gateway = "" # default gateway of that interface
$destPrefix = " 52.112.0.0/14, 52.122.0.0/15, 2603:1063::/38" # Teams Media endpoints
# Add routes to the route table
foreach ($prefix in $destPrefix) {New-NetRoute -DestinationPrefix $prefix -InterfaceIndex $intIndex -NextHop $gateway}
$intIndex = "" # index of the interface connected to the internet
$gateway = "" # default gateway of that interface
# Query the web service for IPs in the Optimize category
$ep = Invoke-RestMethod ("https://endpoints.office.com/endpoints/worldwide?clientrequestid=" + ([GUID]::NewGuid()).Guid)
# Output only IPv4 Optimize IPs to $optimizeIps
$destPrefix = $ep | where {$_.category -eq "Optimize"} | Select-Object -ExpandProperty ips | Where-Object { $_ -like '*.*' }
# Add routes to the route table
foreach ($prefix in $destPrefix) {New-NetRoute -DestinationPrefix $prefix -InterfaceIndex $intIndex -NextHop $gateway}
应配置 VPN 客户端,以便优化 IP 的流量以此方式路由。 这样,流量就可以利用本地Microsoft资源,例如 Microsoft 365 服务 Front Door ,例如 Azure Front Door ,它尽可能向用户提供Microsoft 365 服务和连接终结点。 这使我们能够为世界各地的用户提供高性能级别,并充分利用 Microsoft的世界级全球网络,这可能在用户直接出口的几毫秒内。
适用于常见 VPN 平台的操作指南
本部分提供了相关链接,这些详细指南介绍了如何为来自此空间中最常见的合作伙伴的 Microsoft 365 流量实现拆分隧道。 我们会在可用指南时添加更多指南。