XenSource
Skip navigation links
Overview Expand Overview
Products Expand Products
Solutions Expand Solutions
Support Services Expand Support Services
Partners Expand Partners
About Us Expand About Us
How to Buy

Chapter 3. Networking

This chapter discusses how the physical network devices on the XenServer Host are hooked up with the virtual network devices present in VMs so that VMs can be connected properly both to each other and to external networks.

XenServer Host networks are virtual ethernet switches. Each network may be connected to an external interface (with or without a VLAN tag) or it may be entirely virtual, internal to an individual XenServer Host. When a XenServer Host is installed, one network is created per physical NIC. When a XenServer Host is added to a Resource Pool, these default networks are merged so that all physical NICs with the same device name are attached to the same network. Typically you would only add a new network if you wished to create an internal network or set up a new VLAN using an existing NIC.

When a new VM is installed via the CLI, it is not attached to any networks; virtual interfaces must be created as a second step. When using XenCenter, the New VM wizard will lead you through the process of creating virtual interfaces.

XenServer supports up to four physical network interfaces per XenServer Host, and each VM supports up to seven virtual network interfaces.

The xe CLI can be used to create, destroy and modify three types of server-side objects which represent networking entities. These objects are:

  • A PIF represents a physical interface on a XenServer Host. Separate VLANs are assigned separate PIFs, so multiple PIFs can be associated with a single network interface card.

  • A VIF represents a virtual interface on a Virtual Machine.

  • A network is a virtual ethernet switch. This object has a name and description for the network, a globally unique UUID, and the collection of VIFs and PIFs connected to the network.

3.1. Configuring networks for XenServer Hosts

You can also create additional internal networks (that is, networks that are not connected to a physical network interface but are internal to the XenServer Host). These serve to connect VMs to each other without connecting them to the outside world.

Also, you can create additional networks if you add additional physical NICs to the machine. When a new NIC is added to a machine, you need to create network configuration files for the new interface manually, then add the new network as described below. See Section 3.3, “Modifying physical network configuration after installation”.

To add a new network, or remove a network using XenCenter, refer to the online Help.

To add a new network via the CLI

  1. Open a host text console on any XenServer Host in the pool.

  2. Create the network by: xe network-create name-label=mynetwork.

    The UUID of the network will be printed on the terminal. This network is not connected to anything and therefore is entirely virtual.

To connect a network to an external VLAN via the CLI

  1. Open a host text console on any XenServer Host in the pool.

  2. Find the UUID of a physical NIC on which to create the VLAN interface by: xe pif-list.

    The UUIDs and device names of all physical NICs and existing VLANs are printed on the terminal.

  3. Create the VLAN interface with tag “5” by: xe vlan-create network-uuid=uuid pif-uuid=uuid vlan=5.

    The UUID is printed on the terminal.