Wednesday, January 11, 2012

Managing Virtual Network Adapters

Virtual network adapters (a.k.a VMKernel networks) handle host network services over a vSphere distributed switch.

You can configure VMkernel virtual adapters for a host through an associated vSphere distributed switch either by creating new virtual adapters or migrating existing virtual adapters.

Create a VMkernel Network Adapter on a vSphere Distributed Switch

let’s create a VMkernel network adapter for use as a vMotion interface or an IP storage port group.

 

Procedure

1 Log in to the vSphere Client and select the Hosts and Clusters inventory view.
2 Select the host in the inventory pane.
3 On the host Configuration tab, click Networking.
4 Select the vSphere Distributed Switch view.
5 Click Manage Virtual Adapters.

image
6 Click Add.

SNAGHTML5e65c70
7 Select New virtual adapter, and click Next.

SNAGHTML5e6d6fc
8 Select VMkernel and click Next.

SNAGHTML5e76cd4


9 Choose a distributed port or distributed port group connection for the virtual adapter.

image_thumb[2]

10 Select Use this virtual adapter for vMotion to enable this port group to advertise itself to another ESXi host as the network connection where vMotion traffic is sent.

You can enable this property for only one vMotion and IP storage port group for each host. If this property is not enabled for any port group, migration with vMotion to this host is not possible.

SNAGHTML5ea0877

11 Choose whether to Use this virtual adapter for fault tolerance logging. (I’ve selected FT in this case)
12 Choose whether to Use this virtual adapter for management traffic, and click Next.
13 Under IP Settings, specify the IP address and subnet mask.

IPv6 cannot be used with a dependent hardware iSCSI adapter.


14 Click Edit to set the VMkernel default gateway for VMkernel services, such as vMotion, NAS, and iSCSI.

SNAGHTML5ec2dd2

15 On the DNS Configuration tab, the name of the host is entered by default. The DNS server addresses and domain that were specified during installation are also preselected.

SNAGHTML5ecbb32

16 On the Routing tab, enter gateway information for the VMkernel. A gateway is needed for connectivity to machines not on the same IP subnet as the VMkernel. Static IP settings is the default. Do not use routing with software iSCSI Multipathing configurations or dependent hardware iSCSI adapters.

17 Click OK, and then click Next.

18 Click Finish.

SNAGHTML5ee0108

 

SNAGHTML5eea5a0

Private VLANs

Private VLANs are used to solve VLAN ID limitations and waste of IP addresses for certain network setups. A private VLAN is identified by its primary VLAN ID. A primary VLAN ID can have multiple secondary VLAN IDs associated with it. Primary VLANs are Promiscuous, so that ports on a private VLAN can communicate with ports configured as the primary VLAN. Ports on a secondary VLAN can be either Isolated, communicating only with promiscuous ports, or Community, communicating with both promiscuous ports and other ports on the same secondary VLAN.

To use private VLANs between a host and the rest of the physical network, the physical switch connected to the host needs to be private VLAN-capable and configured with the VLAN IDs being used by ESXi for the private VLAN functionality. For physical switches using dynamic MAC+VLAN ID based learning, all corresponding private VLAN IDs must be first entered into the switch's VLAN database.

How To Create a Private VLAN

You can create a private VLAN for use on a vSphere distributed switch and its associated distributed ports.

 

Procedure


1. Log in to the vSphere Client and select the Networking inventory view.
2. Right-click the vSphere distributed switch in the inventory pane, and select Edit Settings.

image


3. Select the Private VLAN tab.

4 Under Primary Private VLAN ID, click [Enter a Private VLAN ID here], and enter the number of the primary private VLAN. I’ve entered 777

SNAGHTML59177bb


5 Click anywhere in the dialog box, and then select the primary private VLAN that you just added. The primary private VLAN you added appears under Secondary Private VLAN ID.

SNAGHTML5932143

6 For each new secondary private VLAN, click [Enter a Private VLAN ID here] under Secondary Private VLAN ID, and enter the number of the secondary private VLAN.

7 Click anywhere in the dialog box, select the secondary private VLAN that you just added, and select either Isolated or Community for the port type.

SNAGHTML59535eb

8 Click OK.

Add a Distributed Port Group with PLVAN enabled

Add a distributed port group to a vSphere distributed switch to create a distributed switch network for your virtual machines which needs PVLAN

 

Procedure


1 Log in to the vSphere Client and select the Networking inventory view.
2 Select Inventory > vSphere Distributed Switch > New Port Group.
3 Enter a Name and the Number of Ports for your new distributed port group.
4 Select a VLAN Type, as Private VLAN

5 From down menu of Private VLAN Entry: select appropriate VLAN

SNAGHTML59d5c11

5 Click Next.
6 Click Finish.

 

Note Before removing a private VLAN, be sure that no port groups are configured to use it.

Migrate an Existing Virtual Adapter to a vSphere Distributed Switch & vice versa

 

Migrate an Existing Virtual Adapter to a vSphere Distributed Switch

You can migrate an existing virtual adapter from a vSphere standard switch to a vSphere distributed switch.

Procedure
1 Log in to the vSphere Client and select the Hosts and Clusters inventory view.

2 Select the host in the inventory pane.
3 On the host Configuration tab, click Networking.
4 Select the vSphere Distributed Switch view.

image_thumb2
5 Click Manage Virtual Adapters.

image_thumb6
6 Click Add.

SNAGHTML602a69a


7 Select Migrate existing virtual network adapters and click Next.

SNAGHTML6037eb0

8 Select one or more virtual network adapters to migrate.

9 For each selected adapter, choose a port group from the Select a port group drop-down menu.

SNAGHTML607ef3d

10 Click Next.

SNAGHTML60842aa

11 Click Finish.


Migrate an existing virtual adapter from a vSphere distributed switch to a vSphere standard switch.


Procedure


1 Log in to the vSphere Client and select the Hosts and Clusters inventory view.
2 Select the host in the inventory pane.
3 On the host Configuration tab, click Networking.
4 Select the vSphere Distributed Switch view.

image_thumb2
5 Click Manage Virtual Adapters.

image_thumb6


6 Select the virtual adapter to migrate, and click Migrate.

SNAGHTML5f2f91c_thumb3

7 Select the vSphere Standard switch Name to migrate the adapter to and click Next.

SNAGHTML5fced2b_thumb3

8 Enter a Network Label and optionally a VLAN ID for the virtual adapter, and click Next.

SNAGHTML5fc7972_thumb2

9 Click Finish to migrate the virtual adapter and complete the wizard.

Working with Distributed Ports

A distributed port is a port on a vSphere distributed switch that connects to the VMkernel or to a virtual machine's network adapter. Default distributed port configuration is determined by the distributed port group settings, but some settings for individual distributed ports can be overridden.

Monitor Distributed Port State
vSphere can monitor distributed ports and provide information on the current state of each port and the port's runtime statistics.

 

Procedure

1 Log in to the vSphere Client and select the Networking inventory view.
2 Select the vSphere distributed switch in the inventory pane.
3 On the Ports tab, click Start Monitoring Port State on the top right hand side corner

image

The table on the Ports tab for the distributed switch now displays runtime statistics for each distributed port, including broadcast, multicast, and unicast ingress and egress traffic and packets. Various columns as listed down below are available to select and view the respective information.

image

Configure Distributed Port Settings

You can change general distributed port settings such as the port name and description.

 

Procedure

1 Log in to the vSphere Client and select the Networking inventory view.
2 Select the vSphere distributed switch in the inventory pane.
3 On the Ports tab, right-click the port to modify and select Edit Settings.

image
4 Click General.
5 Modify the port Name and Description.

SNAGHTML5883291

6 Click OK.

Editing General & Advanced Distributed Port Group Settings

 

You can edit general & advanced distributed port group settings such as the distributed port group name and port group type.

Procedure

1 Log in to the vSphere Client and select the Networking inventory view.
2 Right-click the distributed port group in the inventory pane, and select Edit Settings.
3 Select General to edit the following distributed port group settings.

SNAGHTML2ef11e9

 

Edit Advanced Distributed Port Group Settings

You can edit advanced distributed port group settings, such as override settings and reset at disconnect.

 

Procedure

1 Log in to the vSphere Client and select the Networking inventory view.
2 Right-click the distributed port group in the inventory pane, and select Edit Settings.

SNAGHTML57dbcc6
3 Select Advanced to edit the distributed port group properties.

SNAGHTML57b0b52

SNAGHTML57e5721

4 Click OK.

View Network Adapter Information for a vSphere Distributed Switch

View physical network adapters and uplink assignments for a vSphere distributed switch from the networking inventory view of the vSphere Client.

Procedure

1. Log in to the vSphere Client and select the Networking inventory view.
2. Right-click the vSphere distributed switch in the inventory pane, and select Edit Settings.
3. On the Network Adapters tab, you can view network adapter and uplink assignments for associated hosts.
 This tab is read-only. Distributed switch network adapters must be configured at the host level.
4. Click OK.

SNAGHTML2e382c5

Manage vSphere Distributed Switch

 

Set the Number of Ports Per Host on a vSphere Distributed Switch

Set the maximum number of ports on a host to limit the number of distributed ports that can exist on one or more hosts associated with a vSphere distributed switch.

Procedure

1 Log in to the vSphere Client and select the Hosts and Clusters inventory view.
2 Select the host to modify in the inventory pane.
3 On the host Configuration tab, click Networking.
4 Select the vSphere Distributed Switch view.
5 Click Properties next to the vSphere distributed switch to modify.

SNAGHTML2d2ab79
6 Select the maximum number of ports from the drop-down menu, and click OK.

Edit General vSphere Distributed Switch Settings

You can edit the general settings for a vSphere distributed switch, such as the distributed switch name and the number of uplink ports on the distributed switch.

Procedure
1 Log in to the vSphere Client and select the Networking inventory view.
2 Right-click the vSphere distributed switch in the inventory pane, and select Edit Settings.
3 Select General to edit the vSphere distributed switch settings.

image

SNAGHTML2d78219

Select Advanced to edit vSphere distributed switch settings

image

SNAGHTML2de756c

Manage Hosts on a vSphere Distributed Switch

 

You can change the configuration for hosts and physical adapters on a vSphere distributed switch after they are added to the distributed switch.

 

Procedure

1 Log in to the vSphere Client and select the Networking inventory view.
2 Right-click the distributed switch and select Manage Hosts.
3 Select the hosts to manage and click Next.

 

SNAGHTML2abbaf3

 

4 Select the physical adapters to add, deselect the physical adapters to remove, and click Next.
5 For each virtual adapter, select the Destination port group from the drop-down menu to migrate the virtual adapter to the distributed switch or select Do not migrate.
6 Click Next.

SNAGHTML2ade57c

 

For each virtual adapter, select the Destination port group from the drop-down menu to migrate the
virtual adapter to the distributed switch or select Do not migrate.

6 Click Next.

SNAGHTML2c2e30c

Migrate virtual machine networking to the vSphere distributed switch.
a. Select Migrate virtual machine networking.
b. For each virtual machine, select the Destination port group from the drop-down menu or select Do not migrate.
8 Click Next.

SNAGHTML2c650fb

9 (Optional) If you need to make any changes, click Back to the appropriate screen.
10 Review the settings for the distributed switch, and click Finish.

SNAGHTML2c75177

Add hosts to a vSphere Distributed Switch

 

Procedure
1 Log in to the vSphere Client and select the Networking inventory view.
2 Right-click the vSphere distributed switch in the inventory pane, and select Add Host.
3 Select the hosts to add.

image

Under the selected hosts, select the physical adapters to add and click Next.


NOTE You can select physical adapters that are not being used and physical adapters that are being used.Moving a physical adapter to a distributed switch without moving any associated virtual adapters can cause those virtual adapters to lose network connectivity.


SNAGHTML27f0c0e

For each virtual adapter, select Destination port group and select a port group from the drop-down menu to migrate the virtual adapter to the distributed switch or select Do not migrate.

SNAGHTML2894d03

Click Next.
8 (Optional) Migrate virtual machine networking to the distributed switch.
a Select Migrate virtual machine networking.
b For each virtual machine, select Destination port group and select a port group from the drop-down menu or select Do not migrate.

SNAGHTML28cf3cd


9 Click Next.
10 (Optional) If you need to make any changes, click Back to the appropriate screen.

SNAGHTML28e85ee


11 Review the settings for the distributed switch and click Finish.