To confirm if an ICMP redirect is the cause of your connectivity problems, perform a capture on the affected host and vCenter Server.
If both devices connect through the same router or firewall, their traffic should be destined for the same MAC address.
When you perform a capture, you see that one entity is sending the traffic to a MAC address that is unfamiliar. The unfamiliar MAC address is actually the MAC of the ICMP redirected gateway.
To perform a capture on vCenter Server, you can use a utility such as
Wireshark.
Note: VMware does not endorse or recommend any particular third-party utility, nor is the list above meant to be exhaustive.
- To perform a capture on an ESXi/ESX host, run this command:
tcpdump or tcpdump-uw : tcpdump/tcpdump-uw -e -i vmk# -nn host x.x.x.x
- Where vmk# is the vmk associated with the management interface of the host and x.x.x.x is the IP of vCenter Server.
- -i denotes the interface and -e allows tcpdump to display the MAC addresses (by default it does not).
To work around this issue, perform one of these options:
- Work with the physical switch, router, or firewall vendor to determine if there is a way to force an ICMP redirect to be sent correcting the communication issue.
- Reboot the host to clear the ICMP redirect from the hypervisor.
- Delete the affected interface and recreate it.
This issue generally occurs on host Service Console or Management interfaces. The proceeding steps walk you through removing and recreating a service console or management interface. Perform these steps from a console session. When the console session is removed, you lose connectivity to the host until the interface is recreated. The virtual machines remain unaffected during this process.
- Find where the vmknic in question is located using these commands:
- Run esxcfg-vmknic -l for ESXi hosts
- Run esxcfg-vswif -l for ESX hosts
- Find the vSwitch or vDSwitch name on which the interface is running. Run the command:
esxcfg-vswitch -l |less
Record the name exactly as it appears (it is case sensitive). If using a vDS, record the port number that the interface is associated with.
- Remove the offending interface by running one of these commands:
- To remove a vmk from a vSwitch, run: esxcfg-vmknic -d PortGroupName
- To remove a vmk from a vDSwitch, run: esxcfg-vmknic -d -v port_number -s vDSname
- To remove a vswif interface from a vSwitch, run: esxcfg-vswif -d vswif#
- To remove a vswif interface from a vDSwitch, run: esxcfg-vswif -d vswif#
- Recreate the interface by running one of these commands:
-
- To create a vmk interface on a vSwitch, run: esxcfg-vmknic -a -i x.x.x.x -n x.x.x.x -p PortGroupName vSwitchName
- To create a vmk interface on a vDS, run: esxcfg-vmknic -a -i x.x.x.x -n x.x.x.x PortGroupName -s vDSwitchName
- To create a vswif interface on a vSwitch, run: esxcfg-vswif -a -i x.x.x.x -n x.x.x.x -p PortGroupName
- To create a vswif interface on a vDS, run: esxcfg-vswif -a -i x.x.x.x -n x.x.x.x PortGroupName -s vDSwitchName