agenda

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: sloan

Post on 14-Jan-2016

15 views

Category:

Documents


0 download

DESCRIPTION

NDIS LBFO Miniports (Load Balancing And Failover) Larry Cleeton Program Manager Windows Networking And Communications Microsoft Corporation. Agenda. Overview of NDIS LBFO Miniports How to write LBFO miniports How to install LBFO miniports. Typical LBFO Scenario. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Agenda

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

Page 2: Agenda
Page 3: Agenda

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

Page 4: Agenda

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

Page 5: Agenda

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

Page 6: Agenda

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

Page 7: Agenda

Normal BindingNormal Binding

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 2Interface 2Interface 1Interface 1

Page 8: Agenda

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

Page 9: Agenda

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

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 1Interface 1

Page 10: Agenda

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

MiniportMiniport

TCP/IPTCP/IP

Adapter 2Adapter 2Adapter 1Adapter 1

Interface 1Interface 1

Page 11: Agenda

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

Page 12: Agenda

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?

Page 13: Agenda

Modify Your Miniport CodeModify Your Miniport Code

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

Page 14: Agenda

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

Page 15: Agenda

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

Page 16: Agenda

NdisMIndicateReceivePacketNdisMIndicateReceivePacket

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

Page 17: Agenda

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

Page 18: Agenda

MiniportHaltMiniportHalt

Secondary AdapterSecondary Adapter Normal halt handlingNormal halt handling

Primary AdapterPrimary Adapter Promote secondary with Promote secondary with

NdisMPromoteMiniportNdisMPromoteMiniport

Page 19: Agenda

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

Page 20: Agenda

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

Page 21: Agenda

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"

Page 22: Agenda

DemonstrationDemonstration

Page 23: Agenda

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

Page 24: Agenda

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

Page 25: Agenda

DiscussionDiscussion

Page 26: Agenda