首页主机资讯CentOS Dolphin网络配置技巧

CentOS Dolphin网络配置技巧

时间2025-10-20 14:25:03发布访客分类主机资讯浏览255
导读:Note: “CentOS Dolphin” typically refers to CentOS 8/Stream 8 (or later with the KDE Plasma Desktop (where Dolphin is th...

Note: “CentOS Dolphin” typically refers to CentOS 8/Stream 8 (or later) with the KDE Plasma Desktop (where Dolphin is the default file manager). Network configuration in this context involves system-wide network settings (managed by NetworkManager) rather than Dolphin-specific configurations. Below are key network configuration techniques for CentOS with KDE Dolphin:

1. View Current Network Configuration

Before making changes, verify existing network interfaces and settings:

  • Command Line: Use ip addr show (preferred) or ifconfig (legacy) to list all network interfaces, their IP addresses, and statuses.
    ip addr show
    
  • GUI: Click the network icon in the KDE Plasma taskbar → Select “Connection Information” to view interface details.

2. Configure Static IP Address (Command Line)

For a persistent static IP setup (recommended for servers or fixed networks):

  • Edit the network interface configuration file (replace ens33 with your actual interface name, e.g., eth0):
    sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33
    
  • Modify the following parameters (adjust values to match your network):
    BOOTPROTO=static       # Disable DHCP (use static IP)
    ONBOOT=yes             # Enable interface at boot
    IPADDR=192.168.1.100   # Static IP address
    NETMASK=255.255.255.0  # Subnet mask (or use PREFIX=24)
    GATEWAY=192.168.1.1    # Default gateway
    DNS1=8.8.8.8           # Primary DNS server
    DNS2=8.8.4.4           # Secondary DNS server
    
  • Save the file and restart the network service:
    sudo systemctl restart NetworkManager
    
  • Verify connectivity:
    ip addr show ens33     # Check IP assignment
    ping 8.8.8.8           # Test external connectivity
    

3. Configure Static IP Address (GUI via nmtui)

For a user-friendly approach, use the NetworkManager Text User Interface (nmtui):

  • Open nmtui in the terminal:
    sudo nmtui
    
  • Navigate to “Edit a connection” → Select your interface (e.g., ens33) → Press Enter.
  • Switch to the “IPv4 Configuration” section:
    • Set Method to “Manual”.
    • Add IP addresses (e.g., 192.168.1.100/24), gateway (192.168.1.1), and DNS servers (comma-separated).
  • Press Tab to highlight OK → Press Enter → Save changes.
  • Restart the network service to apply:
    sudo systemctl restart NetworkManager
    

4. Configure Static IP Address (GUI via System Settings)

Alternatively, use the KDE Plasma System Settings for network configuration:

  • Click the application menu → Select “System Settings” → “Connections”.
  • Select your network interface (e.g., “Wired Connection 1”) → Click Edit.
  • Go to the IPv4 tab:
    • Set Method to “Manual”.
    • Enter IP address, netmask (or prefix), gateway, and DNS servers.
  • Click Apply → Restart the network service if prompted.

5. Configure Network Proxy (for Dolphin/KDE)

If your network requires a proxy server (e.g., for internet access in Dolphin):

  • Open System Settings → “Network” → “Proxy”.
  • Select Manual proxy configuration → Enter:
    • HTTP Proxy: proxy.example.com (replace with your proxy address)
    • Port: 8080 (default for HTTP proxies)
  • Optionally, configure proxy exceptions (e.g., localhost, 127.0.0.1).
  • Click Apply → Restart Dolphin to apply proxy settings.

6. Troubleshooting Common Issues

  • Interface Not Showing Up: Ensure the interface is enabled (ONBOOT=yes in config file) and cables are connected. Use ip link show to check interface status.
  • No Internet Access: Verify gateway/DNS settings. Test connectivity with ping 192.168.1.1 (gateway) and ping 8.8.8.8 (external DNS).
  • Configuration Not Applied: Restart NetworkManager (sudo systemctl restart NetworkManager) instead of the legacy network service.
  • Firewall Blocking Traffic: Temporarily disable the firewall to test (sudo systemctl stop firewalld)—re-enable it afterward for security.

These techniques cover essential network configuration tasks for CentOS with KDE Dolphin. For advanced scenarios (e.g., VLANs, bonding), refer to the CentOS NetworkManager documentation.

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: CentOS Dolphin网络配置技巧
本文地址: https://pptw.com/jishu/730070.html
centos jenkins故障怎么排查 Dolphin在CentOS中的日志管理

游客 回复需填写必要信息