Port Groups are the group of ports used on that port group. Port Groups are created on the Virtual Switch then VM’s are assigned to the Port Group. Port Groups are also used to manage the vm by categories such as Windows, Linux etc. You can create multiple port groups depending on your requirements. In vSwitch you can assign policies on vSwitch & the Port group level but in case of vDS you will have the more granular option by which you can assign policies on ports also. In this post we will look at some of the Basic Port group settings which you will get while creating port group on the vSphere Distributed Switch.
When you create new port group or edit an existing port group you will find the common general settings which allows a simple operations such as port group name, number of ports required etc etc. You can check the below image for more.
Here you can configure the Port binding settings as well as the Port allocation settings. You can also set the Number of ports you want to use with this port group. So we will look at each of the Port Group settings one by one.
Port binding has 3 options Static binding, Dynamic binding & Ephemeral – no binding.
Port allocation :
Port allocation will give you the 2 option either you can go for Fixed Port allocation or you can choose the Elastic Port allocation.
When you choose the Static binding you can choose for either Fixed Port allocation or Elastic Port allocation.
Now we will see on how Port allocation works with Static binding
Static Binding with Fixed Port allocation:
Static binding as the name says port are allocated static at the time of creation only.
First we will see on Static Port binding with Fixed Port allocation option.
In Static port binding with Fixed port allocation you specify the ports you want to use with Port Group. So let’s say you have specified 3 ports in the Number of ports to be used. So now you can only use the 3 Port in this port group. If you try to assign new vm to this port group you will get the error message saying that “No free Port is available”.
I have also attached screenshot of the error below.
Static binding with Elastic Port allocation:
In this scenario Static binding with Elastic port allocation Port numbers will be elastically increased or decreased depending on the number of ports needed.
In this scenario if all the ports are used by the virtual machines and we add the new vm to this port group then vDS will automatically increase the number of ports required but when we remove or delete the vm from this port group then Port Numbers will get reduced to the ports which are specified at the time of creation of port group.
Dynamic Binding :
VMware has deprecated the Dynamic port binding so it is strongly recommended to not to choose Dynamic binding instead you can go for static binding with elastic port allocation.
Ephemeral – no binding:
When you choose the Ephemeral – no binding you will see that Number of ports option is not there. It is because Ephemeral port binding works with like the standard switch & uses all the ports available.
When you choose Ephemeral – no binding you will see that Ports are set to zero at first.
When you assign the powered on vm to this port group you can see that the Ports are increased & Ports are showing 2 used ports.
But when the VM is powered off you can see that the Ports value is decreased to 1 but Virtual Machines connected is still the 2.
So Ephemeral – no binding increase or decrease the port values based on the VM when it is powered on & connected to the vDS.
That’s it for Today Friends. I Hope you liked reading this post & If you find anything more to be added or removed feel free to write it in our comments. If you find it useful You are Feel free to share this on social media to help others & spread knowledge.
If you have any query on any thing you are free to write it in our comments section & we will make sure to provide you the better solution as soon as possible.