Configuring a NIC Added to or Deleted from a BMS
This section uses SUSE Linux Enterprise Server 12 SP3 (x86_64) as an example to describe how to configure a NIC added to or deleted from a BMS.
Configuring a NIC Added to a BMS
- Obtain information about the NIC to be added.
Table 1 Information to be collected Parameter
Description
Example Value
VLAN and MAC address
Specifies the VLAN information and MAC address. To obtain them, perform the following operations:
- In the BMS list, click the name of the target BMS.
- Click the NIC tab, locate the row that contains the NIC to be added, and click
. - Obtain the values of VLAN and MAC Address.
2835
fa:16:3e:01:c3:2e
Gateway
Specifies the gateway address. To obtain it, perform the following operations:
- On the NIC details page, obtain the subnet information.
- On the BMS details page, click the link following VPC to switch to the VPC list.
- Click the name of the VPC to which the BMS belongs to go to the VPC details page.
- Click the Subnets tab and obtain the gateway address of the subnet in step 1.
192.168.1.1
- Use a key or password to log in to the BMS as user root.
- Run the following command to copy network configuration file /etc/sysconfig/network/ifcfg-bond0 to generate file /etc/sysconfig/network/ifcfg-bond0.vlan (replace vlan with the VLAN obtained in step 1, such as 2835):
cp -p /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond0.2835
- Run the following command to edit /etc/sysconfig/network/ifcfg-bond0.vlan and configure the network configuration file of the newly added NIC, such as ifcfg-bond0.2835:
vim /etc/sysconfig/network/ifcfg-bond0.2835
Edit the file as follows:
STARTMODE=auto ETHERDEVICE=bond0 LLADDR=fa:16:3e:01:c3:2e NM_CONTROLLED=no BOOTPROTO=dhcp DEVICE=bond0.2835 USERCONTRL=auto TYPE=Ethernet VLAN_ID=2835
Where,
- Run the following command to start the added NIC:
/usr/sbin/wicked ifup bond0.vlan
For example, to start bond0.2835, run the command shown in the following figure.

- Run the following command to check the status of the NIC device:

- Ping the gateway from the new network device to check whether the network connectivity is normal.
Use the gateway address obtained from step 1.

Configuring a NIC Deleted from a BMS
- Obtain the VLAN and MAC address of the NIC to be deleted.
- Use a key or password to log in to the BMS as user root.
- Locate the network device based on the VLAN information and run the /usr/sbin/wicked ifdown band0.vlan command to delete the device.
serverc7fc560e-24d6-4ad4-9b1e-567a762532c3:~ # ip link | grep 2835 12: bond0.2835@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8888 qdisc noqueue state UP mode DEFAULT group default qlen 1000 serverc7fc560e-24d6-4ad4-9b1e-567a762532c3:~ # serverc7fc560e-24d6-4ad4-9b1e-567a762532c3:~ # /usr/sbin/wicked ifdown bond0.2835 serverc7fc560e-24d6-4ad4-9b1e-567a762532c3:~ #
- Run the following command to delete network configuration file /etc/sysconfig/network/ifcfg-bond0.vlan (replace vlan with the VLAN obtained from step 1, such as 2835):
rm /etc/sysconfig/network/ifcfg-bond0.2835
Last Article: Managing NICs
Next Article: Obtaining the Password for Logging In to a Windows ECS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.