How to use tagged VLAN Network on management interface

How to use tagged VLAN Network on management interface

book

Article ID: CTX230616

calendar_today

Updated On:

Description

This article introduces the configuration details of using tagged VLAN network on management interface on different use scenarios.
 


Instructions

XenServer 7.3 supports VLAN tagging on management and storage interfaces. With this feature, you’ll be able to:
  • Provide VLAN ID to host installer on clean installation or upgrade, in this way, host installer can fetch installation files over tagged VLAN network:
User-added image
In a silent installation scenario, you can use Command Line Interface (CLI) parameter to provide VLAN tag as follows:
  • DHCP: --network_config=dhcp[:vlan=<VLAN ID>]
  • Static: --network_config=static:ip=ip;netmask=netmask[;gateway=gw][;dns=dns1[,dns2]][;domain=domain][:vlan=<VLAN ID>]
  • Configure tagged VLAN network for XenServer management interface on clean host installation, so that the host will use tagged VLAN network on management interface after installation.
User-added image
In a silent installation scenario, you can extend answer file to provide VLAN tag for host management interface, as follows:
<admin-interface hwaddr="xx:xx:xx:xx:xx:xx" enabled="yes" proto="dhcp" vlan=<VLANID>></admin-interface>
For example:
<admin-interface hwaddr="xx:xx:xx:xx:xx:xx" enabled="yes" proto="dhcp" vlan="601"></admin-interface>
  • Create a pool of XenServer hosts with management interface on tagged VLAN network as long as all hosts’ management interface on same VLAN tag.
  • Reconfigure management interface to tagged VLAN network for existing XenServer hosts or pools. Please refer to the configuration details in How to reconfigure management interface to tagged VLAN network section.
Note:
  • Network switches must support VLAN tagging on ports connected to NICs of XenServer host
  • VLAN tag must be configured on network switch before configuring XenServer management interface on that VLAN
How to reconfigure management interface
In following sections, we’ll provide the configuration details of how to reconfigure management interface to tagged VLAN or non-VLAN network for existing standalone XenServer hosts and pools respectively:
  • For standalone XenServer host, you can change the management interface:
    • From XenCenter or xe CLI (host-management-reconfigure), check Reconfigure management interface to tagged VLAN network for a standalone host for details.
    • Through “Emergency Network Reset” utility, check Reset XenServer management interface for details.
  • For existing XenServer pool, a new xe CLI (pool-management-reconfigure) is provided. Check Reconfigure management interface for all hosts in a pool for details.
Reconfigure management interface to tagged VLAN network for a standalone host
For an existing standalone XenServer 7.3 host, you can switch the management interface to a tagged VLAN network by following steps:
  1. Add the VLAN network to the XenServer host:
    • From the XenCenter menu, click on the host, select Networking -> Add Network…, choose “External Network” and click Next.
    • Specify the network Name and Description (optional), click Next.
    • Specify the NIC and VLAN ID and click Finish to finish setting up tagged VLAN network.
  1. Reconfigure the management interface to the created VLAN network either from XenCenter or from the xe CLI:
    • From the XenCenter menu, go to Networking -> IP Address Configuration -> Configure…On the pop up window, choose Management, choose the created VLAN network and set the IP address and DNS server settings:

Click OK to finish the reconfiguration, a confirmation window would pop up for you to make sure the settings are correct. Click Reconfigure anyway to confirm re-configuration.

After that, there will be a transient period that XenCenter displays both original management interface network and the new VLAN network with obtained IP address:
After reconfiguration finishes, XenCenter will lose connectivity to the XenServer host because the management interface IP address has changed. You should re-connect to XenServer host with new VLAN IP address, and you can see the management interface has changed to VLAN network:

Note:
  • Make sure the VLAN network settings are correct, otherwise you’ll lose connection to the host.
  • Make sure the VLAN network is accessible from XenCenter client prior moving management interface to VLAN network, otherwise XenCenter client will lose connectivity to host.
  • It is recommended that you get the new VLAN network IP address prior moving management interface to VLAN network. If you’re using DHCP for the VLAN network, you can obtain an IP address by adding a new network on that VLAN by clicking “Add IP address”:

Record the obtained IP address:
And remove the new network:

The obtained IP address (192.168.8.32 in the example) will be the new management interface IP address after switching management interface to the tagged VLAN network.
  • You can also switch the management interface from the xe CLI:
    • Get the PIF UUID of the created VLAN network from command xe pif-list, for example:
User-added image
  • Configure the VLAN network with valid network settings using the following command line:
xe pif-reconfigure-ip uuid=<PIF_UUID> mode=DHCP
Or
xe pif-reconfigure-ip uuid=<PIF_UUID> netmask=<NETMASK> IP=<STATIC_IP> mode=static
For example, use DHCP to get IP address:
xe pif-reconfigure-ip uuid=d4fe0c47-e47b-15e4-3800-2ac114232eb7 mode=DHCP
  • Reconfigure host management interface using the following command:
xe host-management-reconfigure pif-uuid=<PIF_UUID>
For example:
xe host-management-reconfigure pif-uuid=d4fe0c47-e47b-15e4-3800-2ac114232eb7

Reset XenServer management interface
You can reset XenServer management interface through Emergency Network Reset or xe-reset-networking utility:
  • Go to xsconsole -> Network and Management Interface -> Emergency Network Reset. If you want to reset the management interface to a VLAN network, specify the VLAN tag in VLAN (Optional), otherwise, leave it as blank.
User-added image
  • Use xe-reset-networking command line:
    • Reset to VLAN network: xe-reset-networking --vlan <VLAN tag>
    • Reset to non-VLAN network: xe-reset-networking --novlan
Note that both commands will reboot the host and VMs running on this host will be forcefully shutdown.

Reconfigure management interface for all hosts in a pool
For an existing XenServer pool, you can follow below steps to change management interface of all hosts in the pool to a tagged VLAN (or non-VLAN) network.
  1. Create the tagged VLAN network from XenCenter for the pool, for example, VLAN 1209:
  1. SSH to pool master and run following command to identify the VLAN network UUID: xe network-list
    For example:
    [root@xrtuk-11-03 ~]# xe network-list
    uuid ( RO)                : 2f7a2dc0-f84d-77ed-8c27-c99e1b0706bf
              name-label ( RW): VLAN 1209
        name-description ( RW):
                  bridge ( RO): xapi2
      
    uuid ( RO)                : a213bdb5-9e47-a1ef-2937-6c44e4a2d16c
              name-label ( RW): Pool-wide network associated with eth0
        name-description ( RW):
                  bridge ( RO): xenbr0
     
    uuid ( RO)                : 983f9ead-7020-51ba-7e2f-e07812a754b8
              name-label ( RW): Pool-wide network associated with eth1
        name-description ( RW):
                  bridge ( RO): xenbr1
     
    uuid ( RO)                : eb266d68-0acf-fc3b-7e30-7c5d57e4cdf5
              name-label ( RW): Host internal management network
        name-description ( RW): Network on which guests will be assigned a private link-local IP address which can be used to talk XenAPI
                  bridge ( RO): xenapi
  2. Get related pif uuids of this VLAN network:
    xe network-list uuid=<NETWORK_UUID> params=all
For example:
[root@xrtuk-11-03 ~]# xe network-list uuid=2f7a2dc0-f84d-77ed-8c27-c99e1b0706bf params=all
uuid ( RO)                    : 2f7a2dc0-f84d-77ed-8c27-c99e1b0706bf
              name-label ( RW): VLAN 1209
        name-description ( RW):
               VIF-uuids (SRO):
               PIF-uuids (SRO): 0d0c19b2-4f82-97da-a284-ffe69191be6b; 692a59e5-11d7-3c5b-1d6e-f1aa0d107803
                     MTU ( RW): 1500
                  bridge ( RO): xapi2
                 managed ( RO): true
            other-config (MRW): automatic: false
                   blobs ( RO):
                    tags (SRW):
    default-locking-mode ( RW): unlocked
                 purpose (SRW):
  1. For each related pif, configure the VLAN network with valid network settings:
    • DHCP: xe pif-reconfigure-ip uuid=<PIF_UUID> mode=DHCP
    • Static:  xe pif-reconfigure-ip uuid=<PIF_UUID> netmask=<NETMASK> IP=<STATIC_IP> mode=static
Use DHCP as an example:
[root@xrtuk-11-03 ~]# xe pif-reconfigure-ip mode=DHCP uuid=0d0c19b2-4f82-97da-a284-ffe69191be6b
[root@xrtuk-11-03 ~]# xe pif-reconfigure-ip mode=DHCP uuid=692a59e5-11d7-3c5b-1d6e-f1aa0d107803
  1. Reconfigure the pool management interface for all hosts in the pool:
xe pool-management-reconfigure network-uuid=<NETWORK_UUID>
For example:
[root@xrtuk-11-03 ~]# xe pool-management-reconfigure network-uuid=f8cbd658-59d5-fdd3-2fae-4a35870406be

 
After reconfiguration, reconnect to the pool via VLAN network.

Issue/Introduction

This article introduces the configuration details of using tagged VLAN network on management interface on different use scenarios.