< Back

Add-NsxEdgeInterfaceAddress

Sat Jan 18, 2020 8:58 pm

NAME Add-NsxEdgeInterfaceAddress



SYNOPSIS

Adds a new address to the specified ESG interface





SYNTAX

Add-NsxEdgeInterfaceAddress -Interface <XmlElement> -AddressSpec <XmlElement[]> [-Connection <PSObject>]

[<CommonParameters>]



Add-NsxEdgeInterfaceAddress -Interface <XmlElement> -PrimaryAddress <String> -SubnetPrefixLength <String>

[-SecondaryAddresses <String[]>] [-Connection <PSObject>] [<CommonParameters>]





DESCRIPTION

NSX ESGs interfaces can be configured with multiple 'Address Groups'. This

allows a single interface to have IP addresses defined in different subnets,

each complete with their own Primary Address, Netmask and zero or more

Secondary Addresses.



The Add-NsxEdgeInterfaceAddress cmdlet adds a new address to an

existing ESG interface.





PARAMETERS

-Interface <XmlElement>



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-PrimaryAddress <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SubnetPrefixLength <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SecondaryAddresses <String[]>



Required? false

Position? named

Default value @()

Accept pipeline input? false

Accept wildcard characters? false



-AddressSpec <XmlElement[]>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? named

Default value $defaultNSXConnection

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>get-nsxedge Edge01 | Get-NsxEdgeInterface -Index 9 | Add-NsxEdgeInterfaceAddress -PrimaryAddress

44.44.44.44 -SubnetPrefixLength 24 -SecondaryAddresses 44.44.44.45,44.44.44.46



Adds a new primary address and multiple secondary addresses to vNic 9 on edge Edge01









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$add2 = New-NsxAddressSpec -PrimaryAddress 22.22.22.22 -SubnetPrefixLength 24 -SecondaryAddresses

22.22.22.23



$add3 = New-NsxAddressSpec -PrimaryAddress 33.33.33.33 -SubnetPrefixLength 24 -SecondaryAddresses 33.33.33.34



get-nsxedge Edge01 | Get-NsxEdgeInterface -Index 9 | Add-NsxEdgeInterfaceAddress -AddressSpec $add2,$add3



Adds two new addresses to Edge01's vnic9 using address specs.











RELATED LINKS