OpenStack Networking Cookbook
上QQ阅读APP看书,第一时间看更新

Viewing the virtual interface information for Linux bridge on the compute node

Users can create Networks, Subnets, and instances as tenants. However, the underlying physical and virtual network details are hidden from them. This is important because tenants should focus on their business requirements instead of specific implementation details.

However, administrators of the cloud platforms that have been built using OpenStack need to understand the physical and virtual networking details. This is required in order to troubleshoot any problems faced by the tenants. In this recipe, we will show you how an administrator can view the virtual interface (VIF) information for an instance that is running on a compute node.

Getting ready

As this recipe is described from the point of view of an administrator who is troubleshooting a tenant problem, the following information is required:

  • The tenant network name
  • The VM instance whose VIF information is to be identified

How to do it…

The following steps will show you how to view the VIF information on a compute node when using the Linux bridge:

  1. Log in to the OpenStack Horizon dashboard using a user ID with an administrative role.
  2. In the left navigation menu, navigate to Admin | System | Instances. On the right-hand side, you will see a list of all the VM instances.
  3. Click on the checkbox next to the VM instance whose VIF details you want to see. Using the drop-down menu at the end of the row, select Console, as follows:
    How to do it…
  4. This should show the VNC console for the selected instance. Log in to the instance and execute the following command:
    $ ifconfig
    
  5. You should see an output similar to the following screen. Note down the IP address, 70.70.70.2 in this case, and the MAC address, (FA:16:3E:3E:F0:EB), as shown in the following screenshot:
    How to do it…
  6. In the left navigation menu, navigate to Project | Admin | Networks. Click on the name of the Network to which the instance belongs. This will display the Network Detail for this Network. Note the Segmentation ID (VLAN ID), which is 1002 in our example:
    How to do it…
  7. You can also see the list of the OpenStack ports for this Network. Our VM instance has an IP address of 70.70.70.2 and there is a Port corresponding to this IP address. Click on the Port Name to view the Port Detail. Note that the MAC and IP addresses match our VM:
    How to do it…
  8. Pay attention to the ID of the port, especially the first 11 characters: 911185a6-06.
  9. Now log in to the compute node of your setup with the appropriate credentials and execute the following command:
    openstack@compute:~$ brctl show
    
  10. You should see an output as follows:
    How to do it…

The preceding output shows two important things. The Linux bridge name, brq1e023dc6-7a, is derived from the ID of the Network and the Tap interface name, tap911185a6-06, is derived from the OpenStack Port used for our VM. The Tap interface is the entity that connects the virtual interface on the instance to the Linux bridge.

The output of the brctl command also shows that eth1.1002 is the physical interface on the Linux bridge. This notation indicates that the traffic on that Linux bridge will be sent out on the eth1 physical interface with a VLAN tag of 1002.

How it works…

In the preceding example, we identified the Port ID for the instance, and using this ID, we were able to view the Linux bridge and VLAN information on the compute node. These are usually the foremost steps in identifying the networking problems on a compute node.

We also saw that the Linux bridge name is derived from the ID of the OpenStack Network. This implies that when a Linux bridge is used as the mechanism driver, one bridge will be created for every OpenStack Network. The Linux bridge-based configuration on a compute node is pictorially depicted here:

How it works…

There's more…

This recipe showed you how to identify the virtual interface on the compute node. On the Network node, there is no change due to the Linux bridge being a mechanism driver. You can refer to the recipe titled Viewing the virtual interface information on the Network node in Chapter 2, Using Open vSwitch for VLAN-Based Networks, to view the virtual interface on a Network node.