vSphere vNetwork

 View Only
Expand all | Collapse all

Portgroup network Label and VLAN ID difference

  • 1.  Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 12:10 PM

    I am building up virtual machine portgroup and came to know about these two things portgroup network lable and VLAN ID. can some one please let me know

    1. how these two are correlated to each other.

    2. Is is always necessary to put these two as same value?

    3. Virtual machine IP details depend on network lable or VLAN ID (if network lable only then whats use of VLAN ID)

    4. How Network lable and VLAN ID at vswitch are related to physical VLAN available at ESX switch.

    Thanks



  • 2.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 12:34 PM

    I will try to answer your questions:

    Ad 1. You can see the portgroup as a connection between the Network Label and the VLAN ID. Just like you can make connections between server names and IP addresses in DNS.

    Ad 2. No. The Network Label and VLAN ID can be different. E.g. Network Label: "Production VLAN" and VLAN ID: 5

    Ad 3. While configuring the VM you have to specify the Network Label. The VM depends off course also to the VLAN ID.

    Ad 4. The VLAN ID of the portgroup on the vSwitch is related to the vlans of the physical switch port. You need to have enabled the vlan on the physical switch port.

    I hope this makes it all clear to you.

    Regards, Robert



  • 3.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 01:04 PM

    Thanks , what i udnerstoon from your answers is that both of them are correlated to each other and this is VLAN ID which needs to be shared with Network guys to get it presented to physical NIC of ESX, I am right here?

    As well in order to deeply understand the situation can be you please give me some real time scenario howz both of them are correlated ?( eg.As its pretty simple to understand server name and IP in DNS ) .

    Now let me tell you my issue:

    Due to some reasons i have to migrate few VM's from one cluster "A" to another  "B",

    And i came to find that cluster "A" have a portgroup with network label and VLAN ID as "VLANx" and "123". However Cluster "B " have portgroup with network label and vlan ID as "x" and 123.  Hence VLAN ID are same at both hosts of clusters (A and B) .

    Hence i edited the cluster "B" host network conf and edited the portgroup network label as "VLANx", hence its having config of VLANx and 123 network lable and VLAN ID .(Hoping to keep similar as that of cluster "A" hosts). As the configuration gets similar and i migrated the few Vm's and it went successfully .

    Now question is i have few Vm left at cluster "B" which needs not to migrated, but when i check in the Vm Edit settings and go to network then network lable shows blank. And only option available at drop down box is "VLANx".

    Am afraid due to this my Vm still present in cluster B hosts can loose there IP anyway?

    Thanks



  • 4.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 01:10 PM

    If this is VLAN ID which is defines the VLAN for ESX hosts and physical NIC configurations matters with VLAN ID value then why IP (of VM) gets changed when we move Vm from one network lable to another?

    And if this VLAN id which defines VM IP and then why Vmware given option of choosing only Network lable (Not VLAN ID ) while VM> edit settings?Network adapter

    Thanks



  • 5.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 01:44 PM

    Afaik the IP address of a VM doesn't change when you change the Network label of a VM.

    Because the Network Label and VLAN ID are matched in the portgroup, you only can specify the Network Label name.

    Remember that a portgroup is actually a match between a portgroup name, vlan id and vSwitch. So if you change the Network Label of a VM, you actualy change the vlan id and vSwitch at once.



  • 6.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 02:55 PM

    This makes sense to me that if VLAN ID and network label are same, thats why changing network label of a Vm change its IP. As well, as per your ideas i came to conclusion that i go back to my Vm of cluster"B" and select edit settings < network adapter>network label and from drop down select the option of "VLANx " as network label. (I hope as still VLAN ID for portgroup name VLANx is 123 , hence while changing the Network label of VM to VLANx from "x" , its IP will not change) Much appreciated your help. Let me have to put this scenario in prod . and i will update you how its goes.



  • 7.  RE: Portgroup network Label and VLAN ID difference

    Posted Jun 21, 2011 03:19 PM

    Comming back ater long time...

    My problem was partially solved and i awarded the points too...but again digging more in same issues few questions come in my mind.

    . As vmx file contains information for network label and its the VLAN ID which determines the IP of Vm, hence when VM requested IP then i belive Vmx goes for network label and network label tells its corresponding IP address . IS this is the case?

    I need to know more deeper how this conversion process actioned and step by step how VM gets its IP details ..doest it communicate vmx. then to network label and network lable tells corresponding VLAN ID, Can i get a deeper look?

    Thanks



  • 8.  RE: Portgroup network Label and VLAN ID difference

    Posted Jun 29, 2011 08:59 PM

    Hello,

    Let's look at this a bit different. SInce it sounds like you are using virtual switch tagging I will use that as an example...

    VLAN Trunk <-> External Switch <-> VLAN TRUNK <-> VIrtual Switch <-> PG w/VLAN ID A

                                                                     <-> PG w/VLAN ID B     

    Now let's assume we have labeled those portgroups as follows:

    PG w/VLAN ID A -> Labeled as "Network A"

    PG w/VLAN ID B -> Labeled as "Network B"                   

    When I connect a VM to one of these portgroups I select the appropriate label in order to make the connection. You do not need to specify a VLAN ID for the VM just select the appropriate label. You need the VLAN ID so the network folks know what to TRUNK.

    So VM A's vNIC I connect to Network A

    So VM B's vNIC I connect to Network B

    VM A is now on a different VLAN than VM B.

    Best regards,

    Edward L. Haletky

    Communities Moderator, VMware vExpert,

    Author: VMware vSphere and Virtual Infrastructure Security,VMware ESX and ESXi in the Enterprise 2nd Edition

    Podcast: The Virtualization Security Podcast Resources: The Virtualization Bookshelf



  • 9.  RE: Portgroup network Label and VLAN ID difference

    Posted Jun 30, 2011 08:55 AM

    Thanks for your explanation.

    Basically i was looking for an answer "If two portgroup have same VLAN ID but different Network Label  (X and Y) then if we change a VM's Network adapter (Having "X" Network label at its Network adapter) settings to choose Network label  ( i.e Edit settings<Network adapter =  ) "Y" then is there any downtime?

    Thanks



  • 10.  RE: Portgroup network Label and VLAN ID difference

    Posted Jun 30, 2011 11:41 AM

    Hello,

    No there is no downtime for this. There may be a slight hiccup (about the same as a vMotion) in network traffic but when I have done this in the past I have yet to see anything really happen other than traffic is now flowing out a differnet path.

    Best regards,

    Edward L. Haletky

    Communities Moderator, VMware vExpert,

    Author: VMware vSphere and Virtual Infrastructure Security,VMware ESX and ESXi in the Enterprise 2nd Edition

    Podcast: The Virtualization Security Podcast Resources: The Virtualization Bookshelf



  • 11.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 01:37 PM

    The VLAN ID needs to be communicated with the network boys and girls. You are right about that.

    If you create a new portgroup, you can specify the name and vlan id. So the combination is all up to you. We use the vlan id as the last part of the portgroup name. E.g.:

    VM installation vlan 600

    VM production vlan 700

    VM test vlan 800

    VM acceptation vlan 900

    The Network Label  is a configuration item of the VM in the vmx file. E.g.:

    ethernet0.networkName = "VM production vlan 700"

    If you change the name of a portgroup, you have to change the configuration of all the VM's that still use the old name. Because the old portgroup name does not exist anymore, the old name is not shown in "Edit Settings". Instead you will see an empty name. So change the Network label of all the VM's that used the old portgroup name!

    It is practical to use the same portgroup names all over your VMware environment. That makes it more easy to understand. And doesn't give you this kind of problems when moving VM's to another cluster.



  • 12.  RE: Portgroup network Label and VLAN ID difference

    Posted May 30, 2011 12:46 PM

    Hi,

    I will try to briefly answer your questions:

    1. They aren't. The network label is something that you can define freely.

    It is important though when you try to vMotion a VM from one host to another: On the target host the VM will be connected to the virtual switch portgroup that has the same network label as the portgroup it was connected to on the source host (regardless of confgured VLAN IDs).

    2. No, as said before the network label is something that you can define freely. However, it is a generally accepted good practice to derive the network label from the VLAN ID.

    3. It depends on the VLAN ID only.

    4. Only the VLAN ID is (and must be!) related to the VLANs configured on the physical switch.

    On a vSwitch you can define and use only these VLANs that are also present on the physical up-links of this vSwitch.

    In large environment with lots of VLANs it is common practice to configure a trunk of multiple VLANs on the physical up-links of the ESX-hosts. In the vSwitches that connect to these up-links you can then separate the VLANs again by creating a portgroup for each of them and specifying the VLAN ID in the portgroup properties.

    Hope, this make things clearer...

    Andreas

    - Check out my VMware Front Experience Blog