Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Contrail] How to determine the tap interface associated with the instance of a VM’s interface



Article ID: KB30668 KB Last Updated: 12 May 2016Version: 1.0
In OpenContrail, there are two types of VMs (virtual machines) that can be spawned:
  1. VMs running general applications.
  2. VMs running network services such as a virtual load balancer or a virtual firewall.
Regardless of the type of VM spawned, an associated tap interface is also created on the compute node host. The number of tap interfaces spawned depends on the number of interfaces a VM contains. For example, a vSRX service instance may contain left and right interfaces which translates to multiple tap interfaces on the compute node.

This article describes using the CLI method to find the associated tap interface for a VM running on Contrail.


What is the tap interface associated with the VM instance's interface on Contrail? The tap interface information can be used to debug connectivity issues using tools such as tcpdump.


Navigate to http://<openstak-ip>/horizon/admin/instances/ and note the following:

  • IP address of the VM/Interface for which the associated tap interface is to be found. The ‘IP Address’ column of the web page can be used for this.
  • The physical host point that the VM is spawned on. The ‘Host’ column of the web page can be used for this.

In the following screenshot, we are trying to find the associated tap interface for the VM with the IP address

Notice the virtual machine with the IP is sitting on compute node host ‘host1’.

After the items above are determined, ssh to the compute node hosting the VM. In this example, it is ‘host1’. Then run the following commands:

root@host1:~# source /etc/contrail/openstackrc

root@host1:~# cd /etc/libvirt/qemu/

root@host1:/etc/libvirt/qemu# nova list | grep | cut -d "|" -f2

The above output provides the UUID of the instance. Use this output as a parameter for grep in the following command to find out the tap interface associated:

root@host1:/etc/libvirt/qemu# grep "8335b3f7-def1-43e8-9f55-fbef670e39e7" *.xml | awk '{print $1}' | head -1 | cut -d ":" -f1 | xargs cat | grep tap
<target dev='tap4e3a2fe8-7d'/>

The associated tap interface of the VM’s interface bearing the IP address is tap4e3a2fe8-7d.

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search