Learn how to change the MTU size for an existing network using OpenStack CLI/API.
Jumbo frames are Ethernet frames with more than 1,500 bytes of payload. They can carry up to 9,000 bytes of payload. Using them minimizes routing processing time. In the case of vRack, this will optimize traffic on it.
But if connectivity from a fully private instance to outside networks (Internet) is done in the network, the MTU has to be set to 1,500 bytes of payload.
The MTU size will be the same for all services using IPs in the same network.
Requirements
- A Public Cloud project in your OVHcloud account
- Using the OpenStack command line environment
- The OpenStack Command Line Interface tool installed on your working environment
Instructions
Step 1: Listing networks available in the Public Cloud project
List available networks in the region:
openstack network list
+--------------------------------------+------------+-------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+------------+-------------------------------------+
| 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx|
| ed85c4df-5ba6-48fb-a7d3-xxxxxxxxxxxx | openstack | 10d5fe8b-0596-4525-a387-xxxxxxxxxxxx|
+--------------------------------------+------------+-------------------------------------+
Step 2: Displaying private network parameters
Use the following command to display the private network parameters:
openstack network show ed85c4df-5ba6-48fb-a7d3-xxxxxxxxxxxx
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2023-01-13T08:45:06Z |
| description | |
| dns_domain | None |
| id | ed85c4df-5ba6-48fb-a7d3-xxxxxxxxxxxx |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| l2_adjacency | True |
| mtu | 9000 |
| name | openstack |
| port_security_enabled | True |
| project_id | f6e0b44aa5104f689870xxxxxxxxxxxx |
| provider:network_type | vrack |
| provider:physical_network | None |
| provider:segmentation_id | 0 |
| qos_policy_id | None |
| revision_number | 5 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | 10d5fe8b-0596-4525-a387-xxxxxxxxxxxx |
| tags | |
| tenant_id | f6e0b44aa5104f689870bxxxxxxxxxxx |
| updated_at | 2023-01-13T13:43:27Z |
+---------------------------+--------------------------------------+
Step 3: Setting the new MTU size
- Using the OpenStack CLI:
openstack network set --mtu 1500 <networkid>
- Using the OpenStack API:
TOKEN=$(openstack token issue -c id -f value)
curl -s -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"network": {"mtu": 1500}}' https://network.compute.<region>.cloud.ovh.us/v2.0/networks/<networkid>
Step 4: Verifying the changes
Display the private network parameters to verify that the change is applied:
openstack network show <network>
Step 5: Restarting the services
Updating the MTU value for an existing network with instances plugged into it requires a hard reboot of those instances that have a port in this network:
- Public cloud instances
- Managed Kubernetes Node(s) if you use a custom gateway deployed in vRack with a Managed Kubernetes cluster.
Go further
For more information and tutorials, please see our other Public Cloud support guides or explore the guides for other OVHcloud products and services.