Skip to main content

Static IP Settings

Wired Ethernet Port Directly Connected to PC

Starting from FlyOS-Fast v1.3.9, the wired Ethernet port supports automatic recognition of direct connections to a PC or router. If the device's Ethernet port is directly connected to a PC, you can access the device via 10.10.10.1 or local.klipper.cn after waiting approximately 15 seconds; manual static IP configuration for direct connection scenarios is generally no longer required.

Purpose and Advantages of Static IP

Static IP configuration ensures the device has a fixed address on the network, providing stable and reliable network connectivity for various application scenarios.

Main Application Scenarios

  1. Ensure Stable Device Accessibility

    • The device maintains the same IP address at all times, facilitating remote access and control
    • Suitable for scenarios requiring fixed addresses, such as web servers, MQTT communication, and PLC control
  2. Simplify Network Management

    • Devices like cameras, sensors, and controllers require fixed IPs on local area networks or industrial networks
    • Facilitates stable connections for other systems and services
  3. Adapt to Special Network Environments

    • Static IPs are mandatory in environments without DHCP services (e.g., industrial control, edge computing)
    • Avoids reliance on dynamic address assignment
  4. Enhance Development and Debugging Efficiency

    • Fixed IPs facilitate rapid device location and connection
    • Simplifies repetitive testing processes
  5. Support Device Discovery Mechanisms

    • When accessing devices via preset IP ranges, static IPs ensure devices respond as expected

Comparison of Static IP Advantages

AdvantageDescription
Stable and ReliableThe IP address remains fixed, ensuring stable communication for long-running devices
Friendly for Headless EnvironmentsSuitable for use in environments without a graphical interface, such as embedded devices
Convenient Remote MaintenanceMore efficient when connecting via SSH, Web, API, etc.
Closed Network AdaptationStatic IPs are necessary in industrial networks or private networks without DHCP
Automation SupportDeployment, monitoring, and update scripts rely on IP consistency for proper operation

System-Side Configuration

Suggestions for IP Address Selection
  • Avoid using IP addresses near boundary values such as 0, 1, 254, or 255
  • Using an address like 192.168.1.254 might be preempted by other applications, leading to unstable connections
  • It is recommended to use IP addresses in the middle range, such as 192.168.1.100 - 192.168.1.200

Configuration Steps

  1. Connect to the System Terminal

    • Use SSH to connect to the device system
  2. Check the Network Interface

    • Execute command: ip link show
    • Note the network interface name, e.g., eth0, end0
    Loading...
  3. Edit the Network Configuration File

    • Execute command: nano /etc/systemd/network/end0.network
    • Note: Replace end0 in the filename with your actual network interface name
    Loading...
  4. Configure Static IP Parameters

    • Modify the file content as follows (adjust according to your actual network environment):
    [Match]
    # Match the network interface name, modify as needed
    Name=end0

    [Network]
    # Set the static IP address and subnet mask
    # /24 indicates a subnet mask of 255.255.255.0
    Address=192.168.1.100/24
    # Set the default gateway address
    Gateway=192.168.1.1
    # Set the DNS servers
    DNS=8.8.8.8
    DNS=114.114.114.114
    Loading...
  5. Save and Apply the Configuration

    • Press Ctrl + S to save the file
    • Press Ctrl + X to exit the editor
    • Execute command to restart the network service: systemctl restart systemd-networkd
  6. Verify the Configuration Result

    • Execute command: ip a
    • Confirm that the displayed IP address matches the configured one
    Loading...

PC-Side Configuration

To ensure the PC can communicate properly with the device configured with a static IP, corresponding network configuration is required on the PC side.

Network Parameter Settings

ParameterConfiguration RequirementDescription
Host IP192.168.1.xxxMust be on the same subnet as the device IP
Gateway192.168.1.1Must match the gateway configured on the device
Subnet Mask255.255.255.0Corresponds to the /24 configuration on the device IP
DNS Server8.8.8.8, 114.114.114.114Use common public DNS services

Configuration Methods

Windows System

  1. Open "Network and Sharing Center"
  2. Click "Change adapter settings"
  3. Right-click the current network connection, select "Properties"
  4. Double-click "Internet Protocol Version 4 (TCP/IPv4)"
  5. Select "Use the following IP address" and fill in the corresponding parameters

macOS System

  1. Open "System Preferences" → "Network"
  2. Select the current network connection
  3. Click "Advanced" → "TCP/IP"
  4. Configure "IPv4" to "Manually"
  5. Enter the corresponding IP address, Subnet Mask, and Router address

Connectivity Test

After configuration, it is recommended to perform a connectivity test:

# Execute the ping command on the PC to test connectivity
ping 192.168.1.100

# If you receive replies, the network configuration is successful
Troubleshooting

If the device cannot be pinged, please check:

  • Whether the network cable connection is normal
  • Whether the firewall settings are blocking communication
  • Whether the IP addresses are on the same subnet
  • Whether the subnet mask and gateway configurations are correct
Loading...