Documente Academic
Documente Profesional
Documente Cultură
Day 2
VMware vSphere:
Install, Configure, Manage
Content
• Virtual Networking
• Introduction to vSphere Standard Switches
• Troubleshooting of vSS
• Scenarios
• Introduction to vSphere Distributed Switches
• Troubleshooting of vDS
• NSX
Introduction to vSphere
Standard Switches
Learner Objectives
By the end of this lesson, you should be able to meet the following
objectives:
• Describe the virtual switch connection types
• Configure and view standard switch configurations, such as virtual machine
port group, VMkernel port, VLAN, and so on
About Virtual Networks
A virtual network is a network of virtual machines running on a physical machine
that are connected logically to one another so that they can send data to and
receive data from one another. Virtual machines can be connected to the virtual
networks that you create when you add a network.
Hardware
Uplink Ports
Virtual Switch Connection Examples
More than one network can coexist on the same virtual switch. Or
networks can exist on separate virtual switches.
Virtual Switch
Virtual Switch Virtual Switch Virtual Switch Virtual Switch Virtual Switch
Types of Virtual Switches
A virtual network supports these types of virtual switches:
• Standard switches:
– Virtual switch configuration for a single host
• Distributed switches:
– Virtual switches that provide a consistent network configuration for virtual machines
as they migrate across multiple hosts
Standard Switch Components
A standard switch provides connections for virtual machines to
communicate with one another, whether they are on the same host or on
different hosts.
VM VM VM IP Management
1 2 3 storage Network
VMkernel
Delete the
port group.
•All VLAN tagging of packets is performed by the virtual switch before leaving the
ESXi/ESX host.
Virtual Switch •The ESXi/ESX host network adapters must be connected to trunk ports on the
physical switch.
Tagging •The portgroups connected to the virtual switch must have an appropriate VLAN ID
specified.
Peak Bandwidth
Average
Time
Burst Size = Bandwidth x Time
Configuring Traffic Shaping
A traffic-shaping policy is defined by average bandwidth, peak
bandwidth, and burst size. You can establish a traffic-shaping policy for
each port group and each distributed port or distributed port group:
• Traffic shaping is disabled by default.
• Parameters apply to each virtual NIC in the standard switch.
• On a standard switch, traffic shaping controls only outbound traffic.
NIC Teaming and Failover Policies
Administrators can edit the NIC teaming and failover policy by
configuring specific options.
Load-Balancing Method: Originating Virtual Port ID
The diagram shows routing based on the originating port ID, called virtual
port ID load balancing.
Virtual
Switch
Physical
Switch
Internet
Virtual
Switch Physical
Switch
Virtual Physical
NICs NICs
Load-Balancing Method: Source and Destination IP
Hash
Internet
Virtual Physical
Switch Switch
~ nc -h
VMPING Command
You can test connectivity to remote ESXi host using the ping and
vmkping utilities. Using vmkping to test connectivity via vMotion
interfaces is a common practice. For example:
~ vmkping 192.168.1.20
OpenSSL Command
You can use the open ssl client present on an ESXi host to test
connectivity to an ssl port – for example to vCenter or to another host. To
do so:
~ openssl s_client -connect 192.168.1.100:443
TCPDUMP Command
This command is used to identify the packet flow in an NIC. To display
packets on interface vmk0 you can run:
~ tcpdump-uw -i vmk0 | more
ESXCFG Command
The esxcfg-nics command provides information about the physical NICs
in use by the VMkernel.
This prints the VMkernel name for the NIC, its PCI ID, driver, link state,
speed, duplex, and a short PCI description of the card. It also allows
users to set speed and duplex settings for a specific NIC.
~ esxcfg-nics <options> [nic]
PKTCAP-UW Tool
The pktcap-uw tool is an enhanced packet capture and analysis tool that
can be used in place of the legacy tcpdump-uw tool. The pktcap-uw tool
is included by default in ESXi 5.5.
vMA
The vSphere Management Assistant (vMA) allows administrators
and developers to run scripts and agents to manage ESXi hosts and
vCenter Server systems. vMA is a virtual machine that includes
prepackaged software, a logging component, and an authentication
component that supports non-interactive login.
As an alternative to esxcli, you can also use the vicfg-dns command from
the vMA or vSphere CLI. Running the command without any parameters
will display a host’s DNS configuration:
DCUI
Command
Prompt
Identifying Possible Causes
If you know that your hardware is functioning correctly, take the top-down
approach to troubleshooting, starting with the ESXi host configuration.
Possible Causes
APP
Virtual
FIREWALL Machine
OS
Virtual NIC
Port Groups
Virtual
Switch
Uplink Ports
Physical NICs
Network Problem 2
Possible Causes
vCenter Server
Management
Firewall ESXi Network
Windows (vmk0)
Possible Causes
ESXi vCenter Server is not using port 902 for receiving heartbeats,
Host or the ESXi firewall is blocking that port.
Hardware
(CPU, Memory, The network between ESXi and vCenter Server is congested.
Network, Storage)
Possible Cause: Port Blocked by Windows Firewall
If Windows Firewall is enabled and UDP port 902 is blocked, view the
ports blocked by Windows Firewall.
To resolve this problem, adjust Windows Firewall settings:
• If ports are not configured, disable Windows Firewall.
• If the firewall is configured to affect ports, ensure that Windows Firewall is not
blocking UDP port 902.
Possible Cause: vCenter Server Not Using Port 902
By default, the vpxa agent on the ESXi host sends heartbeats to vCenter
Server (vpxd) through UDP port 902.
A problem might exist if the host is configured to send heartbeats over a
port other than 902.
Use the less /etc/vmware/vpxa/vpxa.cfg command on the host
to determine the port that is used to send heartbeats:
…
Resolving the Use of a Port Other Than 902 (1)
If you prefer to use a nondefault port for heartbeats, ensure that the ESXi
firewall is not blocking that port.
Contents of heartbeat.xml
Resolving the Use of a Port Other Than 902 (2)
Check the vCenter Server configuration to verify the port number used
for heartbeats.
Possible Cause: Network Congestion
If the network between ESXi and vCenter Server is congested, dropped
heartbeats might occur.
To verify whether your management network is congested, use a network
packet analyzer:
• You can use the resxtop utility or graphical views to analyze traffic.
• The pktcap-uw command is an enhanced packet capture and analysis tool.
• The tcpdump-uw command is a legacy network traffic capture tool:
– Available in vSphere ESXi Shell, based on the standard tcpdump utility
– For example, to display packets on the VMkernel interface vmk0, run the command:
• tcpdump-uw –i vmk0
This problem can occur if the ESXi host’s management network was
misconfigured or manipulated from the command line.
For example, you can bring a physical network card up or down with the
esxcli command:
• esxcli network nic up –n vmnic0
• esxcli network nic down –n vmnic0
• esxcli network nic list
Preventing Loss of Management Network Connectivity
vSphere network rollback prevents accidental misconfiguration of
management networking and loss of connectivity:
• For example, if you try to change the IP address of your management
VMkernel interface, VMware vSphere® Web Client returns the error message
in the screenshot.
Host Networking Rollback
Rollback enables you to roll back to a previous valid configuration.
The host networking rollback is triggered when a network configuration
change is made that disconnects the host
Several events can trigger a host networking rollback:
• Updating DNS and routing settings
• Updating the speed or duplex of a physical NIC
• Changing the IP settings of a management VMkernel network adapter
• Updating teaming and failover policies to a port group that contains the
management VMkernel network adapter
If a network disconnects for any of these reasons, the task fails and the
host reverts to the last valid configuration.
Recovering a Lost Management Network: Standard Switch
If your management network is on a standard switch and you lose
management network connectivity, the solution uses the Configure
Management Network option in the DCUI.
Network Restore Options in the DCUI
To restore the network through the DCUI:
1. Select Network Restore Options.
2. Perform a full network restore.
3. Repair the Management network on a misconfigured standard or
distributed switch.
The Restore Network Settings option deletes all the current network
settings except for the Management network.
Review of Learner Objectives
You should be able to meet the following objectives:
• Provide a network troubleshooting overview
• Analyze and troubleshoot standard switch problems
• Analyze and troubleshoot virtual machine connectivity problems
• Analyze and troubleshoot management network problems
Key Points
• Virtual network connectivity problems might occur with standard switches,
distributed switches, virtual machines, or management networks.
• A virtual machine connectivity problem might exist in the physical layer, the
virtual layer, or the guest operating system.
• The ping command is useful when troubleshooting ESXi host and virtual
machine connectivity issues.
• When an ESXi host frequently disconnects from vCenter Server, heartbeat
packets are being lost between vCenter Server and the ESXi host.
• vSphere network rollback prevents accidental misconfiguration of management
networking and loss of connectivity.
• A good practice is to back up your distributed switch configuration with the
vSphere Web Client whenever you make a change to the configuration.
• You can use the restore or the import function to reset the distributed switch
configuration.
Questions?