How to Modify Network Speed and Duplexing

How to Modify Network Speed and Duplexing

book

Article ID: CTX117568

calendar_today

Updated On:

Description

This article describes how to change speed, duplex, and auto-negotiation on a network interface in XenServer.

Requirements

Console access required, if reconfiguring the management interface.


Instructions

To modify network speed and duplexing, complete the following procedure:

  1. Run the following command to find the physical interface where you need to apply the settings:
    # xe pif-list host-uuid=<host_uuid> 
    Note: xe pif-list command lists all the physical interfaces from all hosts in the pool. It is required to filter the interfaces by “host-uuid” if you need to find the right interface.

  2. Review current physical interface settings:
    # xe pif-list uuid=<UUID of physical interface> params=all

  1. Run the following command to set speed, duplex, and auto-negotiation:
    # xe pif-param-set uuid=<UUID of physical interface> other-config:ethtool-autoneg=off other-config:ethtool-speed=1000 other-config:ethtool-duplex=full
    Note: Turn off auto-negotiation before setting the speed manually.

  1. Apply the setting on the interface. 

  2. Unplug and plug the physical interface:
    Note: You do not need to unplug and plug the interface as follows. If you are unable to unplug the interface and skip the following step, then the settings will be applied after the next reboot.
    # xe pif-unplug uuid=<UUID of physical interface>
    # xe pif-plug uuid=<UUID of physical interface>
    Or
    Restart the host:
    # xe host-reboot host=<hostname>

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Issue/Introduction

This article describes how to modify network speed and duplex on a network interface.

Additional Information

Modifying duplex, speed, and auto-negotiation can be made with ethtool on the fly; the change is not persistent across reboot.

Show current settings:
# ethtool eth0

Configure duplex, speed, and autonegotiation manually:
# ethtool -s eth0 speed 100 duplex true autoneg off

Man page for the ethtool:
# man ethtool

Note: For more information, refer section ethtool settings in the XenServer Software Development Kit Guide.