How Can I Configure a Static IP Address for a BMS?
Scenarios
To customize the DNS server information of a BMS, you need to configure a static IP address for the BMS. If you change the IP address assignment mode from DHCP to the static mode, the IP address and gateway must be consistent with those when the BMS is provisioned. Otherwise, network disconnections may occur. This section takes CentOS 7 as an example to describe how to configure a static IP address for a BMS.
Procedure
- Query the IP address and gateway of the BMS.
Run the following command to query the IP address of the BMS:
ifconfig bond0
Run the following command to query the gateway address of the BMS:
ip ro
- Modify the network configuration file.
Run the vi /etc/sysconfig/network-scripts/ifcfg-bond0 command to open the /etc/sysconfig/network-scripts/ifcfg-bond0 file, change the network information from DHCP to static, or delete PERSISTENT_DHCLIENT=1 and add configuration items IPADDR, NETMASK, and GATEWAY (indicating the IP address, subnet mask, and gateway).
Figure 1 Modifying the network configuration file
The IP address, subnet mask, and gateway must be consistent with those when the BMS is provisioned. Otherwise, network disconnections may occur.
- Run the systemctl disable bms-network-config.service command to disable the bms-network-config network script.
- Restart the BMS to make the network configuration take effect, or run the kill dhclient command to restart the network service to make the configuration take effect.
Network and Security FAQ FAQs
- Can BMSs of Different Accounts Communicate with Each Other over an Internal Network?
- How Do Two BMSs in the Same Region But Different AZs Communicate with Each Other?
- Are My BMSs in the Same Subnet?
- Can I Associate a BMS with Multiple Security Groups?
- Can BMSs Communicate with ECSs in the Same VPC?
- What Are the Differences Between the Primary and Extension NICs of BMSs?
- Can I Bind Multiple EIPs to a BMS?
- Can I Configure the EIP?
- Will I Obtain an EIP That Has Been Released?
- What Are the Differences Between EIPs, Private IP Addresses, and Virtual IP Addresses?
- How Can I Modify the Network Configuration or Restart the Network If I Can Log In to a BMS Using Only SSH?
- How Do I Handle the Failure to Ping a CentOS 7 Extension NIC?
- What Do I Do If a Service Port Is Used by a One-Click Password Reset Plug-in?
- What Do I Do If the Communication Between the Primary NIC and Extension NIC of the BMS is Abnormal?
- How Can I Configure a Static IP Address for a BMS?
- What Do I Do If the Network Performance Is Poor When 128 Ethernet Network Devices Are Bound to a BMS?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore