Friday 22 July 2016

Networking Troubleshooting

Networking Troubleshooting


If you are having problems with configuring networking, first ensure that you have not directly modified any of the control domain ifcfg-* files directly. These files are directly managed by the control domain host agent, and changes will be overwritten.

Diagnosing Network Corruption


Some network card models require firmware upgrades from the vendor to work reliably under load, or when certain optimizations are turned on. If you are seeing corrupted traffic to VMs, then you should first try to obtain the latest recommended firmware from your vendor and apply a BIOS update. If the problem still persists, then you can use the CLI to disable receive / transmit offload optimizations on the physical interface.

First, determine the UUID of the physical interface. You can filter on the device field as follows:

xe pif-list device=eth0

Next, set the following parameter on the PIF to disable TX offload:
xe pif-param-set uuid=<pif_uuid> other-config:ethtool-tx=off
Finally, re-plug the PIF or reboot the host for the change to take effect.

Emergency Network Reset


Incorrect networking settings can cause loss of network connectivity, and a XenServer host may become inaccessible via XenCenter or remote SSH. Emergency Network Reset provides a simple mechanism to recover and reset a host's networking. This feature is available from the Command Line Interface (CLI) using the xe-reset-networking command and within the Network and Management Interface section of xsconsole.

Incorrect settings which could cause a loss of network connectivity could include renaming network interfaces, creating bonds or VLANs, or mistakes when changing the management interface (for example, entering the wrong IP address). In addition, you may want to run this utility if a rolling pool upgrade, manual upgrade, hotfix installation or driver installation causes a lack of network connectivity, or if a Pool master or host in a resource pool is unable to contact with other hosts.

This utility should only be used in an emergency as it will remove the configuration for all PIFs, Bonds, VLANs and tunnels associated with the host. Guest Networks and VIFs are preserved. As part of this utility, VMs will be shutdown forcefully, where possible before running this command, VMs should be cleanly shutdown. Before applying a reset, users can make changes to the management interface and specify which IP configuration, DHCP or Static, should be used.

If the Pool Master requires a network reset, it must be carried out before a network reset of any other pool members. It should then be followed a network reset on all remaining hosts in the pool to ensure that the pool's networking configuration is homogeneous. This is a particularly important factor for XenMotion.

Verifying the Network Reset

After specifying the configuration mode to be used after the network reset, xsconsole and the CLI will display the settings which will be applied after host reboot. This offers a final chance to make any modifications before applying the emergency network reset command. After reboot, the new network configuration can be verified in XenCenter and xsconsole. In XenCenter, with the host selected, click the Networking tab, this displays the new network configuration. In xsconsole, this information is displayed in the Network and Management Interface section.

Using the CLI for Network Reset

The following table shows the available optional parameters which can be used with the xe-reset-networking command. Resetting the networking configuration of a whole pool must begin on the Pool Master, and should then be followed by network reset on all remaining hosts in the pool.

Pool Master Command Line Examples

Examples of commands that could be applied on a Pool Master:
To reset networking for DHCP configuration:
xe-reset-networking

To reset networking for Static IP configuration:
xe-reset-networking --mode= static --ip=<ip-address> \
--netmask=<netmask> --gateway=<gateway> \
--dns=<dns>

To reset networking for DHCP configuration if another interface became the management interface after initial setup:
xe-reset-networking --device=<device-name>

To reset networking for Static IP configuration if another interface became the management interface after initial setup:
xe-reset-networking --device=<device-name> --mode=static \
--ip=<ip-address> --netmask=<netmask> \
--gateway=<gateway> --dns=<dns>

Pool Member Command Line Examples

All previous examples also apply to pool members. Additionally the Pool Master's IP address can be specified (which will be necessary if it has changed.)

To reset networking for DHCP configuration:
xe-reset-networking

To reset networking for DHCP if the Pool Master's IP address was modified:
xe-reset-networking --master=<master-ip-address>

To reset networking for Static IP configuration, assuming the Pool Master's IP address didn't change:
xe-reset-networking --mode=static --ip=<ip-address> --netmask-<netmask> \
--gateway=<gateway> --dns=<dns>

To reset networking for DHCP configuration if the management interface and the Pool Master's IP address was modified after initial setup:
xe-reset-networking --device=<device-name> --master<master-ip-address>

No comments:

Post a Comment