A port is a virtual network card to which a MAC address and an IP address pair is assigned. The IP address is assigned to the port within the subnet in which the port is located.
Ports are used to connect devices to private subnets, global router subnets, and public subnets. If a port is disconnected from a device, the device will also be disconnected from the subnet. A private subnet cannot be deleted if it contains at least one port.
VRRP ports and downlinks (ports for reservation) in private subnets where a load balancer is located. The number of service ports depends on the type of load balancer; for more details, see load balancer ports;
a port in a private subnet where a File Storage is located. It is created together with the subnet for the file storage and can only be deleted with the storage.
Add a port to a subnet
Private subnet, global router subnet
Public subnet
Control panel
OpenStack CLI
In the control panel, on the top menu, click Products and select Cloud Servers.
Go to the Network section → Private networks tab.
Open the network page → Ports tab.
Click Add port.
Select a subnet.
Enter the port IP address.
Optional: select a server or a Managed Kubernetes cluster node to which you want to add this port.
<network> — ID or name of the public network; coincides with the <subnet> parameter; you can view it using the openstack subnet list;
<subnet> — ID or name of the subnet; you can view it using the openstack subnet list;
<port_ip_address> — port IP address;
<port_name> — port name.
Add a cloud server or a Managed Kubernetes cluster node to a subnet via a port
A cloud server can be added to a private subnet, a global router subnet, or a public subnet after the server has been created. A Managed Kubernetes cluster node can be added to a private subnet or a global router subnet.
To do this, you need to add a port to the server or node.
Control panel
OpenStack CLI
In the control panel, on the top menu, click Products and select Cloud Servers.
Go to the Servers section.
Open the server page → Ports tab.
Click Add port.
Select a private subnet, a global router subnet, or a public subnet.
<network> — ID or name of the private subnet, global router subnet, or public subnet; you can view it using the openstack network list. For a public subnet, this coincides with the <subnet>;;
<subnet> — ID or name of the subnet; you can view it using the openstack subnet list;
<port_ip_address> — port IP address;
<port_name> — port name.
Add a port to the cloud server:
openstack server add port <server><port>
Specify:
<server> — ID or name of a cloud server; you can view it using the openstack server list;
<port> — ID or name of a port; you can view it using the openstack port list.
Connect a public IP address to a port in a private subnet
If a cloud server or load balancer is connected to a port in a private subnet, you can connect a public IP address to the port.
To connect a public IP address in the device sections of the control panel, follow the Public IP addresses instruction.
Specify <public_ip_address> — ID or public IP address; you can view it using the openstack floating ip list.
Assign a security group to a port
To assign a security group on the cloud server page in the control panel, follow the Assign a security group instruction.
To be able to assign a security group to a port, traffic filtering (port security) must be enabled in the port's network. The filtering status in a network can be viewed in the Control panel: in the top menu, click Products → Cloud servers → Network → the Private networks or Public networks tab. A network with filtering enabled is marked with .
Private subnet, global router subnet
Public subnet
Control panel
OpenStack CLI
In the control panel, on the top menu, click Products and select Cloud Servers.
<security_group> — ID or name of the security group; you can view it using the openstack security group list;
<port> — ID or name of the port; you can view it using the openstack port list.
Add authorized IP/MAC addresses to a port
If traffic filtering (port security) is enabled in the network, port traffic can only be sent from a single IP/MAC address pair that is assigned when adding the port to a subnet. If traffic is transmitted through the port from addresses not specified on the port, such traffic will be blocked. To allow traffic from addresses not specified on the port, you need to add authorized IP/MAC addresses in the port settings.
For example, if you have independently deployed:
routing software on a cloud server — you need to allow all routed networks;
VPN server on a cloud server — you need to allow the IP addresses of all VPN clients;
a Kubernetes cluster with CNI Calico in Direct routing mode on a cloud server — you need to allow the entire subnet used in the cluster. Configuration is not required for CNI Flannel;
VRRP group of several cloud servers — depending on the VRRP settings, you need to allow the VIP address or the VIP/MAC address pair of the server on each of the servers.
You can add up to 10 additional IP/MAC address pairs for a single port. If authorized addresses are no longer needed, you can remove them from the port.
You do not need to configure authorized addresses in Managed Kubernetes clusters, Managed Databases, ready-made 1C cloud, as well as on cloud servers created from images with applications. All necessary settings for them have already been made.
Private subnet, global router subnet
Public subnet
Control panel
OpenStack CLI
In the control panel, on the top menu, click Products and select Cloud Servers.
Go to the Network section → Private networks tab.
Open the network page → Ports tab.
In the port card, in the security groups field, click .
If you want to allow all IP addresses, click Allow all IP addresses for VPN. Traffic from the 0.0.0.0/0 subnet will be allowed with the default port MAC address.
If you want to allow traffic from specific addresses:
6.1.Click Add IP/MAC pair.
6.2.Enter the IP address or subnet in CIDR format.
6.3.Enter the MAC address that corresponds to the IP address, or leave the default port MAC address. Do not use addresses from the 00:00:5e:00:01:82 – 00:00:5e:00:01:c6. These MAC addresses are reserved by Servercore network equipment; using them will result in traffic blocking on the cloud server interface.
6.4. To add another pair of addresses, repeat steps 6.1 — 6.3.
<ip_address> — IP address or subnet. If you want to allow all IP addresses, enter the subnet 0.0.0.0/0;
optional: ,mac-address=<mac_address> — the MAC address corresponding to the IP address. The <mac_address> parameter is the MAC address value. Do not use addresses from the 00:00:5e:00:01:82 – 00:00:5e:00:01:c6 range. These MAC addresses are reserved by Servercore network equipment; using them will block traffic on the cloud server interface. If you do not specify a MAC address, the default port MAC address will be used;
<port> — port ID; you can view it using the openstack port list command.
Control panel
OpenStack CLI
In the Control panel, from the top menu, click Products and select Cloud Servers.
Go to Network → Public networks tab.
Open the subnet card → Ports **** tab.
In the port row, in the Security Groups field, click .
If you want to allow all IP addresses, click Allow all IP addresses for VPN. Traffic from the 0.0.0.0/0 subnet will be allowed with the default port MAC address.
If you want to allow traffic from specific addresses:
6.1.Click Add IP/MAC pair.
6.2.Enter the IP address or subnet in CIDR format.
6.3.Enter the MAC address that corresponds to the IP address, or leave the default port MAC address. Do not use addresses from the 00:00:5e:00:01:82 – 00:00:5e:00:01:c6. These MAC addresses are reserved by Servercore network equipment; using them will result in traffic blocking on the cloud server interface.
6.4. To add another pair of addresses, repeat steps 6.1 — 6.3.
<ip_address> — IP address or subnet. If you want to allow all IP addresses, enter the subnet 0.0.0.0/0;
optional: ,mac-address=<mac_address> — the MAC address corresponding to the IP address. The <mac_address> parameter is the MAC address value. Do not use addresses from the 00:00:5e:00:01:82 – 00:00:5e:00:01:c6 range. These MAC addresses are reserved by Servercore network equipment; using them will block traffic on the cloud server interface. If you do not specify a MAC address, the port's primary MAC address will be used;
<port> — port ID; you can view it using the openstack port list command.
Remove authorized IP/MAC addresses from a port
Private subnet, global router subnet
Public subnet
Control panel
OpenStack CLI
In the Control panel, from the top menu, click Products and select Cloud Servers.
Go to Network → Private networks tab.
Open the network page → Ports **** tab.
In the port card, in the security groups field, click .