VMware Networking Community
nram1983
Contributor
Contributor
Jump to solution

Powernsx command to add multicast addresses and Universal multicast addresses

Does anyone know the PowerNSX command to add multicast addresses and Universal multicast addresses in NSX 6.x?

Reply
0 Kudos
1 Solution

Accepted Solutions
smitmartijn
VMware Employee
VMware Employee
Jump to solution

If you're using the plain command line (and not inside your own script), you need to load the function before you can use it. Otherwise, PowerShell won't recognize is; I'm guessing you got a 'command not found' message?

Load it using the following command, before trying the cmdlet itself: .\New-NsxMulticastRange.ps1

View solution in original post

Reply
0 Kudos
8 Replies
smitmartijn
VMware Employee
VMware Employee
Jump to solution

There is no cmdlet in PowerNSX to add multicast ranges. I had to create my own function a while back, you might be able to use this: New-NsxMulticastRange.ps1 · GitHub

Reply
0 Kudos
nram1983
Contributor
Contributor
Jump to solution

Hi smitmartijn

Thanks for the cmdlet. I tried to used the function but it didnt work.

Steps I followed:

1. Saved the file New-NsxMulticastRange.ps1

2. Run the command "New-NsxMulticastRange -Name Multicast01 -Begin 239.0.0.0 -End 239.1.1.255" in powercli.

Correct me if I am wrong.

Thanks in advance.

Reply
0 Kudos
smitmartijn
VMware Employee
VMware Employee
Jump to solution

If you're using the plain command line (and not inside your own script), you need to load the function before you can use it. Otherwise, PowerShell won't recognize is; I'm guessing you got a 'command not found' message?

Load it using the following command, before trying the cmdlet itself: .\New-NsxMulticastRange.ps1

Reply
0 Kudos
nram1983
Contributor
Contributor
Jump to solution

Yes. That's what I tried.

pastedImage_0.png

Reply
0 Kudos
nram1983
Contributor
Contributor
Jump to solution

THANK YOU. It worked after restarting my powercli. Do you know how to add the multicast range for Universal?

Reply
0 Kudos
smitmartijn
VMware Employee
VMware Employee
Jump to solution

Oh right, sorry - I forgot you also mentioned universal. I've updated the gist to allow a -Universal switch to make it universal. I haven't tested it, but according to the API guide, it should work. New-NsxMulticastRange.ps1 · GitHub

Reply
0 Kudos
nram1983
Contributor
Contributor
Jump to solution

I tried "New-NsxMulticastRange -Name Multicast02 -Universal -Begin 239.2.0.0 -End 239.3.1.255". But it didnt work and got parameter not found. Also I tried to set the $Universal=True in the function and executed "" New-NsxMulticastRange -Name Multicast02 -Begin 239.2.0.0 -End 239.3.1.255" but no luck.

pastedImage_0.png

Reply
0 Kudos
nram1983
Contributor
Contributor
Jump to solution

smitmartijn​ Hi Did you get a chance to test it in your lab?.

It seems the there is no rest API for adding universal multicast address range. Manually tried to add the multicast address through API it succeeded but not setting the "isUniversal" to true.

Reply
0 Kudos