在经典部署模型中获取 ARP 表Getting ARP tables in the classic deployment model

本文介绍为 Azure ExpressRoute 线路获取地址解析协议 (ARP) 表的步骤。This article walks you through the steps for getting the Address Resolution Protocol (ARP) tables for your Azure ExpressRoute circuit.

Important

本文档旨在帮助你诊断和修复简单问题。 它不是为了替代 Microsoft 支持部门。 如果使用以下指南无法解决问题,请使用 Azure 帮助+支持建立支持请求。

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

ARP 是 RFC 826中定义的第 2 层协议。ARP is a Layer 2 protocol that's defined in RFC 826. ARP 用于将以太网地址(MAC 地址)映射到 IP 地址。ARP is used to map an Ethernet address (MAC address) to an IP address.

可以通过 ARP 表来映射 IPv4 地址和 MAC 地址,以便实现特定的对等互连。An 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 an on-premises router interface IP address to a MAC address
  2. 将 ExpressRoute 路由器接口 IP 地址映射到 MAC 地址Mapping of an ExpressRoute router interface IP address to a MAC address
  3. 映射的使用期限The age of the mapping

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

下面是一个 ARP 表的示例:Following is an example of an 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 about how to view the ARP tables that are seen by the ExpressRoute edge routers.

使用 ARP 表的先决条件Prerequisites for using ARP tables

在继续之前,请确保具备以下条件:Ensure that you have the following before you continue:

  • 配置了至少一个对等互连的有效的 ExpressRoute 线路。A valid ExpressRoute circuit that's 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 configure at least one of the peerings (Azure private, Azure public, or Microsoft) on this circuit.
  • 用于配置对等互连(Azure 专用、Azure 公共和 Microsoft)的 IP 地址范围。IP address ranges that are used for configuring the peerings (Azure private, Azure public). 查看 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 aise and on the ExpressRoute side. 可通过查看 ExpressRoute 对等互连配置页了解对等互连配置。You can get information about the peering configuration by reviewing the ExpressRoute peering configuration page.
  • 网络团队或连接提供商提供的有关接口(用于这些 IP 地址)的 MAC 地址的信息。Information from your networking team or connectivity provider about the MAC addresses of the interfaces that are used with these IP addresses.
  • Azure 的最新 Windows PowerShell 模块(1.50 版或更高版本)。The latest Windows PowerShell module for Azure (version 1.50 or later).

ExpressRoute 线路的 ARP 表ARP tables for your ExpressRoute circuit

本部分说明如何使用 PowerShell 查看每种类型的对等互连的 ARP 表。This section provides instructions about how to view the ARP tables for each type of peering by using PowerShell. 在继续之前,你或连接提供商必须配置对等互连。Before you continue, either you or your connectivity provider needs to configure the peering. 每个线路有两个路径(主路径和辅助路径)。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
    $ckt = "<your Service Key here>

    # ARP table for Azure private peering--primary path
    Get-AzureDedicatedCircuitPeeringArpInfo -ServiceKey $ckt -AccessType Private -Path Primary

    # ARP table for Azure private peering--secondary path
    Get-AzureDedicatedCircuitPeeringArpInfo -ServiceKey $ckt -AccessType Private -Path Secondary

下面是其中一条路径的示例输出:Following is sample output 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
    $ckt = "<your Service Key here>

    # ARP table for Azure public peering--primary path
    Get-AzureDedicatedCircuitPeeringArpInfo -ServiceKey $ckt -AccessType Public -Path Primary

    # ARP table for Azure public peering--secondary path
    Get-AzureDedicatedCircuitPeeringArpInfo -ServiceKey $ckt -AccessType Public -Path Secondary

下面是其中一条路径的示例输出:Following is sample output 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

下面是其中一条路径的示例输出:Following is sample output 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

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

对等互连的 ARP 表可用于验证第 2 层配置和连接。The ARP table of a peering can be used to validate Layer 2 configuration and connectivity. 本部分概述了不同情况下的 ARP 表的外观。This section provides an overview of how ARP tables look in different scenarios.

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

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

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

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

  • 所有 3 种对等互连(主/辅助)在 Microsoft 端都会显示相同的 MAC 地址。The same MAC address appears on the Microsoft side for all three 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 表ARP table when it's on-premises or when the connectivity-provider side has problems

ARP 表中只显示一个条目。Only one entry appears in the ARP table. 它显示在 Microsoft 端使用的 MAC 地址与 IP 地址之间的映射。It shows the mapping between the MAC address and the IP address that's used on the Microsoft side.

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

Note

如果遇到此类问题,请通过连接提供商联系建立支持请求以解决它。

当 Microsoft 端出现问题时的 ARP 表ARP table when the 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.
  • 使用 Azure 帮助+支持建立支持请求。Open a support request with Azure Help+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 a route summary to determine the state of BGP sessions.
    • 获取路由表以确定哪些前缀跨 ExpressRoute 播发。Get a route table to determine which prefixes are advertised across ExpressRoute.
  • 通过查看输入/输出中的字节数来验证数据传输。Validate data transfer by reviewing bytes in and out.
  • 如果仍然遇到问题,请使用 Azure 帮助+支持 建立支持请求。Open a support request with Azure Help+support if you are still experiencing issues.