Xen Cloud Platform (XCP) – Assigning A VLAN An IP Address


Once you create VLAN’s on your XCP server you will find that the physical interface you used to be able to hit by an IP address no longer responds. This is because you have trunked the interface into multiple VLAN’s and need to assign IP’s to the VLAN interfaces rather than the physical interface.

In order to do this first remove the static IP from the physical interface if it was assigned one. Then do the following:

(Note this example uses eth1 as the physical interface the VLAN’s are assigned to.)

First lets check the settings on the VLAN interface you need to assign an IP to.

xe pif-param-list uuid=d14427c2-4940-0db1-7d96-f55434af319e

This should return a list of the VLAN interfaces parameters for VLAN201

uuid ( RO): d14427c2-4940-0db1-7d96-f55434af319e
                     device ( RO): eth1
                        MAC ( RO): fe:ff:ff:ff:ff:ff
                   physical ( RO): false
         currently-attached ( RO): true
                        MTU ( RO): 1500
                       VLAN ( RO): 201
             bond-master-of ( RO): 
              bond-slave-of ( RO): <not in database>
       tunnel-access-PIF-of ( RO): 
    tunnel-transport-PIF-of ( RO): 
                 management ( RO): false
               network-uuid ( RO): 85a9aba5-73ea-4008-0a28-395c96be30fd
         network-name-label ( RO): network201
                  host-uuid ( RO): e965ccec-1dcd-4e48-bbed-147a877fb94b
            host-name-label ( RO): xen1
      IP-configuration-mode ( RO): None
                         IP ( RO): 
                    netmask ( RO): 
                    gateway ( RO): 
                        DNS ( RO): 
                io_read_kbs ( RO): 0.345
               io_write_kbs ( RO): 0.000
                    carrier ( RO): false
                  vendor-id ( RO): 
                vendor-name ( RO): 
                  device-id ( RO): 
                device-name ( RO): 
                      speed ( RO): 0 Mbit/s
                     duplex ( RO): half
            disallow-unplug ( RW): false
               pci-bus-path ( RO): 
               other-config (MRW): 

Notice the following parameters are all empty:

      IP-configuration-mode ( RO): None
                         IP ( RO): 
                    netmask ( RO): 
                    gateway ( RO): 
                        DNS ( RO):

Lets assign an IP address to this VLAN:

xe pif-reconfigure-ip uuid=d14427c2-4940-0db1-7d96-f55434af319e \
mode=static IP= netmask= \
gateway= DNS=

Now we can confirm the setting by listing the parameters again:

xe pif-param-list uuid=d14427c2-4940-0db1-7d96-f55434af319e

Which should show:

      IP-configuration-mode ( RO): Static
                         IP ( RO):
                    netmask ( RO):
                    gateway ( RO):
                        DNS ( RO):

Now try to ping the address it should respond again.

You can also set it to use DHCP instead of assigning a Static address by using


4 Responses to “Xen Cloud Platform (XCP) – Assigning A VLAN An IP Address”

  1. murali

    Here you assigning the ip address to the brige(xapi*) of the vlan…what is the use of it?

  2. Ronny

    This is needed in order to be able to communicate to that network card again. Without the IP address that interface becomes inaccessible. The virtual machines can still pass traffic, but you wont be able to hit your server on that interface since it has no IP address. So by putting the bridge on a VLAN and giving it an address it makes the server available again.

    If you just want to use the management interface to access the server you do not need to worry about this.

  3. Dave

    Let us say that we have a host, and this host uses gig0 for management.

    I’d like to put gig0 on a trunked port for Vlan 20, and Vlan 30. My goal is to seperate management (20) traffic from VM(30) traffic.

    The problem That I think I’m having is that in XCP’s GUI for network, I can’t select a user generated “Network” for the management, and also can’t change what Vlan the two NIC’s I have operate on.

    Does the tutorial above solve these issues?

    Thanks in advance!

  4. Ronny


    XCP has been deprecated since Citrix XenServer is now available for free. I would suggest that you try to upgrade to the latest Citrix XenServer and XenCenter.