This section uses CentOS 6.8 (x86_64) as an example to describe how to configure a user-defined VLAN for BMSs.
The configuration methods of Red Hat, Oracle Linux, EulerOS, and CentOS are similar.
ip link
Information similar to the following is displayed.

Among the devices, eth0 and eth1 bear the VPC, and eth3 and eth5 bear the user-defined VLAN.
ll /etc/udev/rules.d/ | grep 80-persistent-net.rules
cp -p /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/80-persistent-net.rules
Write the MAC addresses and names of NICs except eth0 and eth1 obtained in step 2 (those not contained in the /etc/udev/rules.d/70-persistent-net.rules file) to the /etc/udev/rules.d/80-persistent-net.rules file so that the names and sequence of NICs do not change after the BMS is restarted.
Ensure that the NIC MAC address and name are lowercase letters.
vim /etc/udev/rules.d/80-persistent-net.rules
The modification result is as follows:

After the modification, press Esc, enter :wq, save the configuration, and exit.
cp -p /etc/sysconfig/network-scripts/ifcfg-bond0 /etc/sysconfig/network-scripts/ifcfg-bond1
cp -p /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth3
cp -p /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth5
Edit the eth3 network configuration file as follows:
USERCTL=no MTU=8888 NM_CONTROLLED=no BOOTPROTO=static DEVICE=eth3 TYPE=Ethernet ONBOOT=yes MASTER=bond1 SLAVE=yes
Change the value of BOOTPROTO to static, that of DEVICE to the network device name eth3, and that of MASTER to the port name of the user-defined VLAN (bond1). Retain values of other parameters.
Edit the eth5 network configuration file as follows (similar to eth3):
USERCTL=no MTU=8888 NM_CONTROLLED=no BOOTPROTO=static DEVICE=eth5 TYPE=Ethernet ONBOOT=yes MASTER=bond1 SLAVE=yes
vim /etc/sysconfig/network-scripts/ifcfg-bond1
Edit the file as follows:
MACADDR=f4:4c:7f:3f:da:07 BONDING_MASTER=yes USERCTL=no ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static BONDING_OPTS="mode=1 miimon=100" DEVICE=bond1 TYPE=Bond IPADDR=10.10.10.3 NETMASK=255.255.255.0 MTU=8888
Where,
Retain values of other parameters.
After the modification, press Esc, enter :wq, save the configuration, and exit.
ifup bond1
Determining if ip address 10.10.10.3 is already in use for device bond1...
