API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Configuring a VLAN

If you have configured a VLAN on the physical switch for the management network or storage network, you need to enter the VLAN ID when setting up the virtual distributed switch for the management network or storage network during Step 5: Configuring networks.

If you have configured a Trunk VLAN on the physical switch for the management network, you also need to perform the following operations before deploying the cluster to configure a subinterface for the management network. Otherwise, skip these operations.

Procedure

  1. Log in to the ACOS system of each node using the default root account.

  2. Run the cd /etc/sysconfig/network-scripts/ command to navigate to the port configuration file directory.

  3. Run the ip a command to view the information of all ports, and then run the ethtool <port> command to view the speed of each port to determine which port is used for the management network, where <port>represents the actual name of the port.

    • When the management network and storage network are deployed on different virtual distributed switches, the port whose Speed is 1000 Mb/s or higher can be used for the management network.
    • When the management network and storage network are deployed on one virtual distributed switch, the port whose Speed is 10000 Mb/s or higher can be shared by both the management network and storage network.
  4. Run the following command in the port configuration file directory to create a VLAN subinterface for the port, and then configure the IP address, gateway, and subnet mask for it.

    network-preconfig create-vlanif --iface <iface> --ipaddr <ipaddr> --netmask <netmask> --gateway <gateway> --vlanid <vlanid>

    The fields with the <> symbol represent the parameters of the management network.

    Parameter Description
    iface The name of the port.
    • When the physical switch planned to access the ACOS management network has enabled LACP dynamic link aggregation, if the port used for the management network on the current node is a pre_bond port, you need to change the port name to pre_bond.
    • If the port used for the management network on the current node is not a pre_bond port, change the port name to the actual name, such as eth0.
    ipaddr The actually planned IP address.
    netmask The actually planned subnet mask.
    gateway The actually planned gateway.
    vlanid The actually planned VLAN ID.

    If the following information is displayed, the VLAN subinterface has been created and the management network port has been successfully configured with the subinterface.

    create vlan interface success
  5. Optional: If you need to reconfigure the VLAN subinterface for the management network port, you can first execute the following command to clear all configurations, and then perform the next step based on the output.

    network-preconfig clear-config

    When the following information is displayed, the configuration of the VLAN subinterface is cleared successfully. Refer to steps 3 to 4 to reconfigure the VLAN subinterface for the management network port.

    delete pre_vlan configuration

    If the management network ports have been bound, the following information will be displayed, indicating that the configuration of the pre_bond port has also been cleared. If you need to rebind the management network ports, refer to the Enabling LACP section to configure it before deploying the cluster.

    delete pre_bond configuration