Technology Encyclopedia Home >How do I configure network settings on openSUSE?

How do I configure network settings on openSUSE?

Configuring network settings on openSUSE can be done through the YaST (Yet another Setup Tool) utility or manually editing configuration files.

Using YaST:

  1. Open YaST by typing yast in the terminal.
  2. Navigate to "Network Devices" and select the network interface you want to configure (e.g., Ethernet or Wi-Fi).
  3. Follow the prompts to set up your IP address, subnet mask, gateway, and DNS servers. You can choose between DHCP (Dynamic Host Configuration Protocol), which automatically assigns network settings, or manual configuration.
  4. Apply the changes and exit YaST.

Manual Configuration:

  1. Open a terminal and edit the network interface configuration file. For example, for the Ethernet interface eth0, you would edit /etc/sysconfig/network/ifcfg-eth0.
  2. Modify the following parameters:
    • BOOTPROTO: Set to "static" for manual configuration or "dhcp" for automatic configuration.
    • IPADDR: Your IP address.
    • NETMASK: Your subnet mask.
    • GATEWAY: Your gateway address.
    • DNS1 and DNS2: Your DNS server addresses.
  3. Save the file and restart the network service using the command sudo systemctl restart network.

Example:

If you want to manually configure the Ethernet interface eth0 with a static IP address, you would set the following in /etc/sysconfig/network/ifcfg-eth0:

BOOTPROTO='static'
IPADDR='192.168.1.100'
NETMASK='255.255.255.0'
GATEWAY='192.168.1.1'
DNS1='8.8.8.8'
DNS2='8.8.4.4'

After saving the file and restarting the network service, your openSUSE system should be configured with the specified network settings.

For cloud-related networking configurations, you might consider using services like Tencent Cloud's Virtual Private Cloud (VPC), which allows you to create isolated virtual networks and customize your network settings within the cloud environment.