Partilhar via


Requisitos INF para extensões de comutador extensível Hyper-V

As extensões para switches extensíveis Hyper-V são desenvolvidas como controladores de filtro NDIS. Como resultado, os requisitos INF para extensões são baseados nos requisitos INF para todos os drivers de filtro NDIS. Ao criar um arquivo INF para uma extensão de switch extensível, você deve usar as configurações INF para modificar ou monitorar o driver de filtro. Para obter mais informações sobre essas configurações, consulte Configurações de arquivo INF para drivers de filtro.

Além disso, você deve seguir estas diretrizes para arquivos INF para extensões de switch extensíveis:

  • Uma extensão de switch extensível deve ser instalada como um driver de filtro modificador.

    Para obter mais informações sobre os requisitos INF para um driver de filtro de modificação, consulte Configurando um arquivo INF para um driver de filtro de modificação.

    Note An extension with a filter class of ms_switch_capture can perform the same tasks as a monitoring filter driver. Para obter mais informações, consulte Tipos de Drivers de Filtro.

  • The FilterMediaTypes entry in the filter INF file defines the driver's bindings to other drivers and interfaces. The FilterMediaTypes entry for an extensible switch extension must include the vmnetextension value. Esse valor especifica uma ligação ao adaptador de miniporta do switch extensível.

    The FilterMediaTypes entry allows a comma-delimited list of media types to be specified. Isso permite que a extensão seja vinculada a uma interface física ou à interface de switch extensível.

    The following example shows a FilterMediaTypes entry that allows an extension to be bound to either the physical Ethernet network adapter or an extensible switch virtual network adapter.

    HKR, Ndi\Interfaces, FilterMediaTypes, , "ethernet, vmnetextension"
    

    If the FilterMediaTypes entry only specifies the vmnetextension value, the extension will only bind to the driver stacks for all extensible switches on the system.

    If the FilterMediaTypes entry specifies vmnetextension as well as other media types, the extension can determine whether it is bound within an extensible switch driver stack by calling NdisFGetOptionalSwitchHandlers. Se a função retornar NDIS_STATUS_SUCCESS, a extensão será associada dentro da pilha de controladores de extensão. Se a função retornar NDIS_STATUS_NOT_SUPPORTED, a extensão está vinculada dentro da stack de drivers a uma interface de rede física diferente.

    For more information about the FilterMediaTypes entry, see Intermediate Driver UpperRange And LowerRange INF File Entries.

  • The FilterClass value in the INF file for an extension determines its order in a stack of filters. The FilterClass entry must contain one of the values from the following table.

    FilterClass value Description

    ms_switch_capture

    Uma extensão dessa classe monitora o tráfego de pacotes. No entanto, essa classe de extensão não pode aplicar políticas de porta ou alterar portas de destino para um pacote.

    For more information about this class of extension, see Capturing Extensions.

    ms_switch_filter

    Uma extensão dessa classe filtra o tráfego de pacotes e impõe a política de porta ou switch para entrega de pacotes por meio do switch extensível. Essa classe de driver também pode inspecionar e remover portas de destino para cada pacote com base nas configurações de política.

    For more information about this class of extension, see Filtering Extensions.

    ms_switch_forward

    An extension of this class has the same capabilities as the ms_switch_filter class. Essa classe de extensão também pode encaminhar pacotes para outras portas de switch extensíveis, bem como injetar tráfego de pacotes para qualquer porta de switch extensível.

    On the ingress data path, this class of extension is invoked after the ms_switch_filter class of extension. On the egress data path, this class of extension is invoked before the ms_switch_filter class of extension.

    For more information about this class of extension, see Forwarding Extensions.

    Note Only one extension of this class is allowed in the extensible switch driver stack.

Quando a extensão é instalada com essas configurações INF, ela será configurada para se vincular a cada instância de switch extensível. No entanto, a associação será desabilitada e deve ser explicitamente habilitada por meio de um cmdlet do PowerShell. Para obter mais informações sobre este procedimento, consulte Habilitando Hyper-V extensões de comutador extensível.