在 Resource Manager 部署模型中获取 ARP 表Getting ARP tables in the Resource Manager deployment model

本文指导你完成相关步骤,以便了解 ExpressRoute 线路的 ARP 表。This article walks you through the steps to learn the ARP tables for your ExpressRoute circuit.

Important

本文档旨在帮助你诊断和修复简单问题。This document is intended to help you diagnose and fix simple issues. 它不是为了替代 Microsoft 支持部门。It is not intended to be a replacement for Microsoft support. 如果无法通过下述指南解决问题,则必须通过 Microsoft 支持开具支持票证。You must open a support ticket with Microsoft support if you are unable to solve the problem using the guidance described below.

本文中的步骤和示例使用 Azure PowerShell Az 模块。The steps and examples in this article use Azure PowerShell Az modules. 若要在计算机上本地安装 Az 模块,请参阅安装 Azure PowerShellTo install the Az modules locally on your computer, see Install Azure PowerShell. 若要详细了解新 Az 模块,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module, see Introducing the new Azure PowerShell Az module. PowerShell cmdlet 经常更新。PowerShell cmdlets are updated frequently. 如果未运行最新版本,在说明中指定的值可能无法使用。If you are not running the latest version, the values specified in the instructions may fail. 若要在系统上查找已安装的 PowerShell 版本,请使用 Get-Module -ListAvailable Az cmdlet。To find the installed versions of PowerShell on your system, use the Get-Module -ListAvailable Az cmdlet.

地址解析协议 (ARP) 和 ARP 表Address Resolution Protocol (ARP) and ARP tables

地址解析协议 (ARP) 是在 RFC 826 中定义的第二层协议。Address Resolution Protocol (ARP) is a layer 2 protocol defined in RFC 826. ARP 用于映射以太网地址(MAC 地址)和 IP 地址。ARP is used to map the Ethernet address (MAC address) with an ip address.

可以通过 ARP 表来映射 IPv4 地址和 MAC 地址,以便实现特定的对等互连。The ARP table provides a mapping of the ipv4 address and MAC address for a particular peering. 用于 ExpressRoute 线路对等互连的 ARP 表为每个接口(主接口和辅助接口)提供以下信息The ARP table for an ExpressRoute circuit peering provides the following information for each interface (primary and secondary)

  1. 将本地路由器接口 IP 地址映射到 MAC 地址Mapping of on-premises router interface ip address to the MAC address
  2. 将 ExpressRoute 路由器接口 IP 地址映射到 MAC 地址Mapping of ExpressRoute router interface ip address to the MAC address
  3. 映射的使用期限Age of the mapping

ARP 表可帮助验证第 2 层配置,并可针对第 2 层的基本连接问题进行故障诊断。ARP tables can help validate layer 2 configuration and troubleshooting basic layer 2 connectivity issues.

ARP 表示例:Example ARP table:

    Age InterfaceProperty IpAddress  MacAddress    
    --- ----------------- ---------  ----------    
     10 On-Prem           10.0.0.1   ffff.eeee.dddd
      0 Microsoft         10.0.0.2   aaaa.bbbb.cccc

以下部分介绍如何查看供 ExpressRoute 边缘路由器查看的 ARP 表。The following section provides information on how you can view the ARP tables seen by the ExpressRoute edge routers.

了解 ARP 表需具备的先决条件Prerequisites for learning ARP tables

在继续下一步之前,请确保已具备以下条件Ensure that you have the following before you progress further

  • 配置了至少一个对等互连的有效的 ExpressRoute 线路。A Valid ExpressRoute circuit configured with at least one peering. 该线路必须由连接提供商进行完整的配置。The circuit must be fully configured by the connectivity provider. 你(或连接提供商)必须已经在该线路上配置了 Azure 专用、Azure 公共和 Microsoft 这三者中的至少一个对等互连。You (or your connectivity provider) must have configured at least one of the peerings (Azure private, Azure public and Microsoft) on this circuit.
  • 用于配置对等互连(Azure 专用、Azure 公共和 Microsoft)的 IP 地址范围。IP address ranges used for configuring the peerings (Azure private, Azure public and Microsoft). 查看 ExpressRoute 路由要求页中的 IP 地址分配示例,了解如何将 IP 地址映射到所在的一侧和 ExpressRoute 侧的接口。Review the ip address assignment examples in the ExpressRoute routing requirements page to get an understanding of how ip addresses are mapped to interfaces on your side and on the ExpressRoute side. 可通过查看 ExpressRoute 对等互连配置页了解对等互连配置。You can get information on the peering configuration by reviewing the ExpressRoute peering configuration page.
  • 网络团队/连接提供商提供的有关接口(用于这些 IP 地址)的 MAC 地址的信息。Information from your networking team / connectivity provider on the MAC addresses of interfaces used with these IP addresses.
  • 必须安装 Azure 的最新 PowerShell 模块(1.50 或更高版本)。You must have the latest PowerShell module for Azure (version 1.50 or newer).

Note

如果服务提供商提供第 3 层且 ARP 表在下面的门户/输出中为空,请使用门户中的刷新按钮来刷新线路配置。If layer 3 is provided by the service provider and the ARP tables are blank in the portal/output below, refresh the Circuit configuration using the refresh button on the portal. 此操作会将正确的线路配置应用到你的线路。This operation will apply the right routing configuration on your circuit.

获取 ExpressRoute 线路的 ARP 表Getting the ARP tables for your ExpressRoute circuit

本部分说明了如何使用 PowerShell 根据对等互连来查看 ARP 表。This section provides instructions on how you can view the ARP tables per peering using PowerShell. 你或连接提供商必须在执行下一步之前配置好对等互连。You or your connectivity provider must have configured the peering before progressing further. 每个线路有两个路径(主路径和辅助路径)。Each circuit has two paths (primary and secondary). 可以独立地检查每个路径的 ARP 表。You can check the ARP table for each path independently.

Azure 专用对等互连的 ARP 表ARP tables for Azure private peering

以下 cmdlet 为 Azure 专用对等互连提供 ARP 表The following cmdlet provides the ARP tables for Azure private peering

    # Required Variables
    $RG = "<Your Resource Group Name Here>"
    $Name = "<Your ExpressRoute Circuit Name Here>"

    # ARP table for Azure private peering - Primary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType AzurePrivatePeering -DevicePath Primary

    # ARP table for Azure private peering - Secondary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType AzurePrivatePeering -DevicePath Secondary 

下面为其中一个路径显示了示例性输出Sample output is shown below for one of the paths

    Age InterfaceProperty IpAddress  MacAddress    
    --- ----------------- ---------  ----------    
     10 On-Prem           10.0.0.1 ffff.eeee.dddd
      0 Microsoft         10.0.0.2 aaaa.bbbb.cccc

Azure 公共对等互连的 ARP 表ARP tables for Azure public peering

以下 cmdlet 为 Azure 公共对等互连提供 ARP 表The following cmdlet provides the ARP tables for Azure public peering

    # Required Variables
    $RG = "<Your Resource Group Name Here>"
    $Name = "<Your ExpressRoute Circuit Name Here>"

    # ARP table for Azure public peering - Primary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType AzurePublicPeering -DevicePath Primary

    # ARP table for Azure public peering - Secondary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType AzurePublicPeering -DevicePath Secondary 

下面为其中一个路径显示了示例性输出Sample output is shown below for one of the paths

    Age InterfaceProperty IpAddress  MacAddress    
    --- ----------------- ---------  ----------    
     10 On-Prem           64.0.0.1 ffff.eeee.dddd
      0 Microsoft         64.0.0.2 aaaa.bbbb.cccc

Microsoft 对等互连的 ARP 表ARP tables for Microsoft peering

以下 cmdlet 提供 Microsoft 对等互连的 ARP 表The following cmdlet provides the ARP tables for Microsoft peering

    # Required Variables
    $RG = "<Your Resource Group Name Here>"
    $Name = "<Your ExpressRoute Circuit Name Here>"

    # ARP table for Microsoft peering - Primary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType MicrosoftPeering -DevicePath Primary

    # ARP table for Microsoft peering - Secondary path
    Get-AzExpressRouteCircuitARPTable -ResourceGroupName $RG -ExpressRouteCircuitName $Name -PeeringType MicrosoftPeering -DevicePath Secondary 

下面为其中一个路径显示了示例性输出Sample output is shown below for one of the paths

    Age InterfaceProperty IpAddress  MacAddress    
    --- ----------------- ---------  ----------    
     10 On-Prem           65.0.0.1   ffff.eeee.dddd
      0 Microsoft         65.0.0.2   aaaa.bbbb.cccc

如何使用此信息How to use this information

对等互连的 ARP 表可用于确定/验证第 2 层配置和连接。The ARP table of a peering can be used to determine validate layer 2 configuration and connectivity. 本部分概述了不同方案的 ARP 表的外观。This section provides an overview of how ARP tables will look under different scenarios.

当线路处于运行状态(预期状态)时的 ARP 表ARP table when a circuit is in operational state (expected state)

  • ARP 表会有一个针对本地端且带有有效 IP 地址和 MAC 地址的条目,以及一个类似的针对 Microsoft 端的条目。The ARP table will have an entry for the on-premises side with a valid IP address and MAC address and a similar entry for the Microsoft side.

  • 本地 IP 地址的最后一个八位字节将始终是奇数。The last octet of the on-premises ip address will always be an odd number.

  • Microsoft IP 地址的最后一个八位字节始终会是偶数。The last octet of the Microsoft ip address will always be an even number.

  • 所有 3 种对等互连(主/辅助)在 Microsoft 端都会显示相同的 MAC 地址。The same MAC address will appear on the Microsoft side for all 3 peerings (primary / secondary).

     Age InterfaceProperty IpAddress  MacAddress    
     --- ----------------- ---------  ----------    
      10 On-Prem           65.0.0.1 ffff.eeee.dddd
       0 Microsoft         65.0.0.2 aaaa.bbbb.cccc
    

当本地端/连接提供商端出现问题时的 ARP 表ARP table when on-premises / connectivity provider side has problems

如果本地或连接提供商有问题,则可能会看到只有一个条目出现在 ARP 表中,或者本地 MAC 地址会显示不完整。If there are issues with the on-premises or connectivity provider you may see that either only one entry will appear in the ARP table or the on premises MAC address will show incomplete. 此时会显示在 Microsoft 端使用的 MAC 地址与 IP 地址之间的映射。This will show the mapping between the MAC address and IP address used in the Microsoft side.

   Age InterfaceProperty IpAddress  MacAddress    
   --- ----------------- ---------  ----------    
     0 Microsoft         65.0.0.2   aaaa.bbbb.cccc

or

   Age InterfaceProperty IpAddress  MacAddress    
   --- ----------------- ---------  ----------   
     0 On-Prem           65.0.0.1   Incomplete
     0 Microsoft         65.0.0.2   aaaa.bbbb.cccc

Note

通过连接提供商提出支持请求,以便进行此类问题的调试。Open a support request with your connectivity provider to debug such issues. 如果 ARP 表没有将接口的 IP 地址映射到 MAC 地址,请查询以下信息:If the ARP table does not have IP addresses of the interfaces mapped to MAC addresses, review the following information:

  1. 为 MSEE-PR 和 MSEE 之间的链接分配的 /30 子网的第一个 IP 地址是否用在 MSEE-PR 的接口上。If the first IP address of the /30 subnet assigned for the link between the MSEE-PR and MSEE is used on the interface of MSEE-PR. Azure 始终使用 MSEE 的第二个 IP 地址。Azure always uses the second IP address for MSEEs.
  2. 验证客户型 (C-Tag) 和服务型 (S-Tag) VLAN 标记在 MSEE-PR 和 MSEE 对上是否均匹配。Verify if the customer (C-Tag) and service (S-Tag) VLAN tags match both on MSEE-PR and MSEE pair.

当 Microsoft 端出现问题时的 ARP 表ARP table when Microsoft side has problems

  • 如果 Microsoft 端存在问题,则不会为对等互连显示 ARP 表。You will not see an ARP table shown for a peering if there are issues on the Microsoft side.
  • 通过 Microsoft 支持部门开具一个支持票证。Open a support ticket with Microsoft support. 指出第 2 层连接有问题。Specify that you have an issue with layer 2 connectivity.

后续步骤Next Steps

  • 验证 ExpressRoute 线路的第 3 层配置Validate Layer 3 configurations for your ExpressRoute circuit
    • 获取路由摘要以确定 BGP 会话的状态Get route summary to determine the state of BGP sessions
    • 获取路由表以确定哪些前缀跨 ExpressRoute 播发Get route table to determine which prefixes are advertised across ExpressRoute
  • 通过查看输入/输出中的字节数来验证数据传输Validate data transfer by reviewing bytes in / out
  • 如果仍然存在问题,请通过 Microsoft 支持部门 开具一个支持票证。Open a support ticket with Microsoft support if you are still experiencing issues.