If you’re familiar with Cisco IOS and networking in general, creating a new PortGroup on a Nexus1000v is pretty straightforward.
Here I’m going to add a new Port-Profile, of type ‘vmware port-group‘ called “VM_Prod_29” with VLAN ID “29 “.
Login to the active VSM and first create the VLAN;
1 2 3 4 |
conf t vlan 29 name VM_Prod_29 end |
Then create the Access PortGroup and assign VLAN 29 to it.
1 2 3 4 5 6 7 8 9 |
conf t port-profile type vethernet VM_Prod_29 vmware port-group switchport mode access switchport access vlan 29 vmware max-ports 32 no shutdown state enabled end |
The last step is to add the new vlan into the existing physical uplink port-profile. If you don’t know the name of this you can find it by filtering out ‘uplink’ from a sh run;
Make sure you include the add or there’ll be consequences !
1 2 3 4 |
conf t port-profile uplink switchport trunk allowed vlan add 29 end |
Also, ensure you save your config after you have finished. (copy run start )
Job done….Or is it ? Later on I attempted to use the new PortGroup on a VM and it threw an error immediately;
Interesting ! Checking the properties, one thing looked odd;
Total Ports and Available ports was “0”
Looking back through the tasks, i could see when I created the port-profile, an error was thrown;
I logged back into the VSM and checked port-profiles max-ports settings;
1 |
sh port-profile | include max-ports |
It soon became obvious that the sum total of all the ports on all the Port-Groups across the vDS had exceeded the maximum allowed when I added the last Port-Group in. This N1K being a version V4.x, the max- ports per vDS is 8,192. For some reason, when this has been setup, the port-profiles had been configured with max-ports 512, meaning it was nearly exhausted before I configured a new one. Even though the default is 32.
The solution was easy. Change the Port-profile max-ports down to a smaller unit, in this case i chose 24.
The Port-Group Properties then showed correct Total and Available Ports, and we were back in business.
Now to review the other Port-Groups and revise down the max-ports values to more appropriate values.
To get a summary of the current amount of assigned ports per port-profile (PortGroup) simply run show port-profile brief;
The Assigned Intfs will quickly highlight where you can trim down the max-ports value if necessary.
The moral ? Don’t configure the maximums just because you can, configure values that are appropriate and sensible for your environment. It nay just help you avoid unnecessary troubleshooting further down the track.
Happy hunting.