Configuring the NIC IP Address
After the OS is installed, you need to configure the IP address of the NIC on the iBMC remote management page to remotely connect to the server. The configuration method is as follows.
Configuring the NIC IP Address on CentOS/EulerOS
- Log in to the OS as the root user.
- Go to the configuration file of the NIC for which an IP address needs to be configured. NIC enp2s0f0 is used as an example. The NIC and path vary depending on the site requirements.
vi /etc/sysconfig/network-scripts/ifcfg-enp2s0f0
- Configure the service IP address, subnet mask, and gateway of the corresponding NIC, as shown in Figure B-9.Figure B-9 Setting network parameters
- BOOTPROTO indicates the IP address type of the device. For a static IP address, set this parameter to static or none. For a dynamic IP address, set this parameter to dhcp so that the IP address can be obtained automatically.
- Set ONBOOT to yes to enable automatic network connection.
- PREFIX indicates the network bit. If the value is 22, the subnet mask is 255.255.252.0.
- Restart the network service.
service network restart
- Check whether the IP address is configured successful.
ifconfig
Configuring the NIC IP Address on Ubuntu
- Log in to the OS as the root user.
- Go to the configuration file of the NIC. NIC enp125s0f0 is used as an example. The NIC and path vary depending on the site requirements.
vi /etc/netplan/01-netcfg.yaml
- Configure the service IP address, subnet mask, and gateway, as shown in Figure B-10.
- Apply the configuration file.
netplan apply
- Check whether the IP address is configured successful.
ifconfig