此内容没有您所选择的语言版本。
Chapter 19. Configuring allowed address pairs
19.1. Overview of allowed address pairs 复制链接链接已复制到粘贴板!
An allowed address pair is when you identify a specific MAC address, IP address, or both to allow network traffic to pass through a port regardless of the subnet. When you define allowed address pairs, you are able to use protocols like VRRP (Virtual Router Redundancy Protocol) that float an IP address between two VM instances to enable fast data plane failover.
The allowed-address pairs extension is currently supported only by the ML2 and Open vSwitch plug-ins.
You define allowed address pairs using the Red Hat OpenStack Platform command-line client openstack port
command.
Be aware that you should not use the default security group with a wider IP address range in an allowed address pair. Doing so can allow a single port to bypass security groups for all other ports within the same network.
For example, this command impacts all ports in the network and bypasses all security groups:
openstack port set --allowed-address mac_address=3e:37:09:4b,ip_address=0.0.0.0/0 9e67d44eab334f07bf82fa1b17d824b6
# openstack port set --allowed-address mac_address=3e:37:09:4b,ip_address=0.0.0.0/0 9e67d44eab334f07bf82fa1b17d824b6
With an ML2/OVN mechanism driver network back end, it is possible to create VIPs. However, the IP address assigned to a bound port using allowed_address_pairs
, should match the virtual port IP address (/32).
If you use a CIDR format IP address for the bound port allowed_address_pairs
instead, port forwarding is not configured in the back end, and traffic fails for any IP in the CIDR expecting to reach the bound IP port.
19.2. Creating a port and allowing one address pair 复制链接链接已复制到粘贴板!
Creating a port with an allowed address pair enables network traffic to flow through the port regardless of the subnet.
Prerequisites
- You are using an ML2/OVS plug-in.
Do not use the default security group with a wider IP address range in an allowed address pair. Doing so can allow a single port to bypass security groups for all other ports within the same network.
Procedure
Use the following command to create a port and allow one address pair:
openstack port create <port-name> --network <network> --allowed-address mac_address=<mac-address>,ip_address=<ip-cidr>
# openstack port create <port-name> --network <network> --allowed-address mac_address=<mac-address>,ip_address=<ip-cidr>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
19.3. Adding allowed address pairs 复制链接链接已复制到粘贴板!
You can add an allowed address pair to a port to enable network traffic to flow through the port regardless of the subnet.
Prerequisites
- You are using an ML2/OVS plug-in.
Do not use the default security group with a wider IP address range in an allowed address pair. Doing so can allow a single port to bypass security groups for all other ports within the same network.
Procedure
Use the following command to add allowed address pairs:
openstack port set <port-uuid> --allowed-address mac_address=<mac_address>,ip_address=<ip_cidr>
# openstack port set <port-uuid> --allowed-address mac_address=<mac_address>,ip_address=<ip_cidr>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou cannot set an allowed-address pair that matches the
mac_address
andip_address
of a port. This is because such a setting has no effect since traffic matching themac_address
andip_address
is already allowed to pass through the port.