ndis lbfo miniports (load balancing and failover) larry cleeton program manager windows networking...

26
NDIS LBFO Miniports NDIS LBFO Miniports (Load Balancing (Load Balancing And Failover) And Failover) Larry Cleeton Larry Cleeton Program Manager Program Manager Windows Networking And Windows Networking And Communications Communications Microsoft Corporation Microsoft Corporation

Upload: maud-griffin

Post on 26-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

NDIS LBFO Miniports NDIS LBFO Miniports (Load Balancing (Load Balancing And Failover)And Failover)

Larry CleetonLarry CleetonProgram ManagerProgram ManagerWindows Networking And CommunicationsWindows Networking And CommunicationsMicrosoft CorporationMicrosoft Corporation

AgendaAgenda

Overview of NDIS LBFO MiniportsOverview of NDIS LBFO Miniports How to write LBFO miniportsHow to write LBFO miniports How to install LBFO miniportsHow to install LBFO miniports

Typical LBFO ScenarioTypical LBFO Scenario

Server machine attached to Server machine attached to network with multiple linksnetwork with multiple links

More total bandwidthMore total bandwidth Continue to work on failed NIC Continue to work on failed NIC

or cable cutor cable cut

OverviewOverview

An NDIS LBFO miniport is a normal An NDIS LBFO miniport is a normal NDIS miniport driver plus:NDIS miniport driver plus: Code to use multiple NICs together for Code to use multiple NICs together for

load balancing network trafficload balancing network traffic Code to manage a primary NIC and Code to manage a primary NIC and

secondary NICs and manage a fail-secondary NICs and manage a fail-over upon the failure of the primaryover upon the failure of the primary

OverviewOverview

NDIS gives the miniport driver control NDIS gives the miniport driver control over the designation of primary and over the designation of primary and secondary NICs, exposing only a single secondary NICs, exposing only a single binding to protocolsbinding to protocols

Two key NDIS API calls:Two key NDIS API calls: NdisMSetMiniportSecondaryNdisMSetMiniportSecondary NdisMPromoteMiniportNdisMPromoteMiniport

Normal BindingNormal Binding

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 2Interface 2Interface 1Interface 1

LBFO BindingLBFO Binding

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 1Interface 1

Second binding not established if Second binding not established if Miniport calls NdisMSetSecondary Miniport calls NdisMSetSecondary in Adapter 2 MiniportInitializein Adapter 2 MiniportInitialize

LBFO Data Flow LBFO Data Flow (Normal)(Normal)

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 1Interface 1

LBFO Data Flow LBFO Data Flow (Failure)(Failure)

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 1Interface 1

How To Implement LBFOHow To Implement LBFO

Design your LBFO strategyDesign your LBFO strategy Modify your miniport codeModify your miniport code Modify your INF fileModify your INF file

Design Your LBFO StrategyDesign Your LBFO Strategy

Just failover or load balancing too?Just failover or load balancing too? How to run multiple ports as one How to run multiple ports as one

load-sharing bundle? (Network issues)load-sharing bundle? (Network issues) Coordination with attached Coordination with attached

switch/router?switch/router?

Modify Your Miniport CodeModify Your Miniport Code

MiniportInitializeMiniportInitialize MiniportSend/SendPacketsMiniportSend/SendPackets NdisMIndicateReceivePacketNdisMIndicateReceivePacket Miniport(Query,Set)InformationMiniport(Query,Set)Information

MiniportInitializeMiniportInitialize

Read “BundleId” keyword using Read “BundleId” keyword using NdisReadConfiguratonNdisReadConfiguraton

Search for other adapters that have the Search for other adapters that have the same BundleId valuesame BundleId value

If no match, do nothing, adapter If no match, do nothing, adapter defaults to primarydefaults to primary

If match, set self to secondary using If match, set self to secondary using NdisMSetMiniportSecondaryNdisMSetMiniportSecondary

MiniportSend/SendPacketsMiniportSend/SendPackets

MiniportAdapterContext is always the MiniportAdapterContext is always the primary NICprimary NIC

Miniport code can redirect send to Miniport code can redirect send to other NICs with it’s own logicother NICs with it’s own logic

Always complete Send with original Always complete Send with original primary MiniportAdapterContextprimary MiniportAdapterContext

NdisMIndicateReceivePacketNdisMIndicateReceivePacket

Regardless of adapter on which Regardless of adapter on which received, indicate with primary received, indicate with primary MiniportAdapterHandleMiniportAdapterHandle

MiniportQuery/SetInformationMiniportQuery/SetInformation

Process Query or Set OID for Process Query or Set OID for specific adapter referenced by specific adapter referenced by MiniportAdapterContextMiniportAdapterContext

No change from normal behaviorNo change from normal behavior

MiniportHaltMiniportHalt

Secondary AdapterSecondary Adapter Normal halt handlingNormal halt handling

Primary AdapterPrimary Adapter Promote secondary with Promote secondary with

NdisMPromoteMiniportNdisMPromoteMiniport

SampleSample

Pass-through sample in DDK Pass-through sample in DDK implements failoverimplements failover

Although intermediate driver Although intermediate driver it shows the basic it shows the basic implementation requirementsimplementation requirements

Installing LBFO MiniportsInstalling LBFO Miniports

Create net class INF for miniportCreate net class INF for miniport Add additional advanced property Add additional advanced property

key “BundleId”key “BundleId” BundleId property’s existence is BundleId property’s existence is

the trigger to the miniport to the trigger to the miniport to enable LBFO support and the enable LBFO support and the string is the Bundle identifierstring is the Bundle identifier

BundleId property can be optionalBundleId property can be optional

BundleId INF ExampleBundleId INF Example

AddReg = example.advprop.regAddReg = example.advprop.reg

[example.advprop.reg][example.advprop.reg]

; BundleId for support of LBFO; BundleId for support of LBFO

HKR, Ndi\params\BundleId, ParamDesc, 0, "LBFO Bundle ID"HKR, Ndi\params\BundleId, ParamDesc, 0, "LBFO Bundle ID"

HKR, Ndi\params\BundleId, type, 0, "edit"HKR, Ndi\params\BundleId, type, 0, "edit"

HKR, Ndi\params\BundleId, LimitText, 0, "15"HKR, Ndi\params\BundleId, LimitText, 0, "15"

HKR, Ndi\params\BundleId, UpperCase, 0, "1"HKR, Ndi\params\BundleId, UpperCase, 0, "1"

HKR, Ndi\params\BundleId, default, 0, "Bundle1"HKR, Ndi\params\BundleId, default, 0, "Bundle1"

HKR, Ndi\params\BundleId, optional, 0, "1"HKR, Ndi\params\BundleId, optional, 0, "1"

DemonstrationDemonstration

LimitationsLimitations

Configuration is spread across Configuration is spread across multiple network connectionsmultiple network connections

If a primary adapter is halted the If a primary adapter is halted the new primary will have a new new primary will have a new interface to IP with a potentially interface to IP with a potentially different IP configurationdifferent IP configuration

Call To ActionCall To Action

Implement LBFO in your miniport Implement LBFO in your miniport Simple, no config code necessarySimple, no config code necessary Valuable feature without high costValuable feature without high cost

Test your LBFO scenarios with Test your LBFO scenarios with appropriate network devicesappropriate network devices

DiscussionDiscussion