Managing Network Interface
In OpenStack, you can attach a network interface to an instance to provide additional network connectivity. This allows the instance to communicate with other resources on the network, including other instances, services, and external networks. In this how-to guide, we will walk you through the process of attaching and detaching a network interface using the OpenStack command-line interface (CLI).
Prerequisites
Before you begin, you should have the following:
- An instance that you want to attach a network interface to
- A pre-existing OpenStack network that you want to attach to the instance
Attaching Interface
Info
If you approach a problem with your IPv6 deployment, please refer to IPv6 troubleshooting.
Go to Project > Compute > Instances. Click on the menu Actions on the instance you wish to change and click on Attach interface.
Example
In the Network dropdown menu select available network.
Example
Detaching Interface
Go to Project > Compute > Instances. Click on the menu Actions on the instance you wish to change and click on Detach interface.
Example
In the Port dropdown menu select port on what you want to detach interface.
Example
Troubleshooting
If you encounter any issues while attaching or detaching a network interface, you can use the following commands to troubleshoot:
- Check the status of an OpenStack port: Make sure that the status is “ACTIVE” and that the port is attached to the correct network. Use the following command:
- Check the instance and its associated network interfaces: Make sure that the instance is running and has the appropriate network interfaces attached. Use the following command:
-
Check FAQ: If you approach an issue, make sure to first check FAQ before contacting support.
-
Contact support: If you’re unable to resolve the issue on your own, contact your OpenStack support team for further assistance. Be sure to provide as much information as possible, including error messages and steps you’ve already taken to troubleshoot the issue.
Security Considerations
- Limit the use of network interfaces: Only attach network interfaces to instances that require them. Avoid attaching network interfaces to instances that do not require them to minimize the attack surface.
- Review firewall rules: Review and update firewall rules to ensure that only necessary ports and services are accessible from the network interface.
- Use security groups: Use security groups to define the network traffic that is allowed to or from the instance.
Last updated on