IFPCNLBCluster2::AdditionalVIPs property

Applies to: desktop apps only

The AdditionalVIPs property gets an FPCIPAddresses collection that contains the additional virtual IP addresses of the Network Load Balancing (NLB) cluster.

This property is read-only.

Syntax


HRESULT get_AdditionalVIPs(
  IFPCIPAddresses **ppAdditionalVIPs
);

Property value

Reference to an FPCIPAddresses collection that contains the additional virtual IP addresses of the NLB cluster.

Error codes

This property method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

This property is read-only. Additional virtual IP addresses can be added and removed by calling the Add and Remove methods of the FPCIPAddresses collection retrieved (the IFPCIPAddresses interface retrieved in C++), but the changes made can be saved only by calling the Save method on the containing FPCNetwork object (IFPCNetwork interface in C++) or on a higher object (interface) in the administration COM object hierarchy.

The primary virtual IP address of the NLB cluster is defined by the VIP and Mask properties. Additional virtual IP addresses use the same subnet mask as the primary virtual IP address. Additional virtual IP addresses can be configured only when the primary virtual IP address is defined.

Note  All additional virtual IP addresses that are configured through this property must be removed before changing the primary virtual IP address of an NLB cluster by calling the SetVIPAndMask method or by programmatically importing the primary virtual IP address from a stored configuration.

Examples

This VBScript script ensures that NLB integration enabled in an array, verifies that NLB is enabled on the External network, displays the primary virtual IP address, subnet mask, and additional virtual IP addresses, and adds a hard-coded IP address to the collection of additional virtual IP addresses.


' Define the constants needed.
Const fpcDefaultExternal = 3
Const Error_AlreadyExists = &H800700B7
Const additionalVIP = "239.10.10.6"
 
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
'Declare the other objects needed.
Dim isaArray        ' An FPCArray object
Dim networks        ' An FPCNetworks collection
Dim network         ' An FPCNetwork object
Dim additionalVIPS  ' An FPCIPAddresses collection
Dim ip              ' A String
' Get the array object for the first array.
Set isaArray = root.Arrays.Item(1)
' Ensure that NLB integration is enabled in the array.
If isaArray.NetworkConfiguration.NLBConfiguration.NLBIntegrationEnabled = True Then
    WScript.Echo "NLB integration is enabled for the array."
Else 
    isaArray.NetworkConfiguration.NLBConfiguration.NLBIntegrationEnabled = True
    WScript.Echo "Enabling NLB integration for the array..."
    isaArray.Save True  ' Note that the Firewall service is restarted.
End If 
 
' Get the network object for the External network.
Set networks = isaArray.NetworkConfiguration.Networks
For Each network In networks
    If network.NetworkType = fpcDefaultExternal Then
        If network.NLBCluster.NLBEnabled = True Then
            WScript.Echo "NLB is enabled for the " & network.name  & " network."
            WScript.Echo "Primary VIP: " & network.NLBCluster.VIP
            WScript.Echo "IP mask: " & network.NLBCluster.Mask
        Else 
            WScript.Echo "NLB in not enabled on the " & network.name  & " network."
            WScript.Quit
        End If
        Set additionalVIPS = network.NLBCluster.AdditionalVIPs
        For Each ip In additionalVIPs
            WScript.Echo "Additional VIP: " & ip
        Next
        On Error Resume Next
        additionalVIPs.Add additionalVIP
        If Err.Number = Error_AlreadyExists Then
            WScript.Echo "The additional VIP " & additionalVIP & " already exits."
            Err.Clear
        ElseIf Err.Number <> 0 Then
            WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description
            Err.Clear
            WScript.Quit
        End If
        On Error GoTo 0
        ' Save the changes by calling the Save method
        ' on the network object.
        network.Save            
    End If
Next


Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCNLBCluster

 

 

Build date: 7/12/2010

Show: