What are the steps to configure the network card IP in SUSE?
The steps to configure the IP address of a network card in the SUSE Linux operating system are as follows:
- Open the terminal and log into the system as the root user.
- To view the network card devices and their corresponding IP addresses on the current system, use the ifconfig command.
- Create a backup of the original network interface configuration file by using the command cp /etc/sysconfig/network/ifcfg-eth0 /etc/sysconfig/network/ifcfg-eth0.bak.
- Edit the network card configuration file using the command “vi /etc/sysconfig/network/ifcfg-eth0”. Replace “eth0” with the actual network card device name.
- Edit the following parameters in the editing window:
- BOOTPROTO is set to static, indicating the use of a static IP address.
- Set IPADDR to the IP address to be assigned to the network card.
- NETMASK: Set to subnet mask.
- Set the IP address as the default gateway.
- Press the “Esc” key to exit edit mode, then type “:wq” to save and exit the editor.
- Restart the network service using the command “systemctl restart network” to apply the configuration.
- Check if the IP address of the network card has been updated using the ifconfig command.
Note: The file names “eth0” and “ifcfg-eth0” in the above steps may vary depending on the actual situation, corresponding modifications need to be made based on the network card device name and configuration file name in the system.