🛠 Use Case: Configure a File Server and Network Router

BPI-5202 Loongson 2K1000LAi Embedded Single Board Industrial Computer · debutant · Apprenez à exploiter les deux ports Ethernet et le stockage SSD du BPI-5202 pour créer une passerelle industrielle sécurisée.

Objectives

This tutorial guides beginners in configuring the BPI-5202 as an industrial gateway. We will leverage its two independent network interfaces (1x 1000M and 1x 100M) to isolate field and management networks, while using SSD storage for local data hosting. This use case highlights the reliability of the LoongArch architecture and integrated hardware security.

Required Hardware

Steps

  1. Storage Preparation: Insert the SSD into the dedicated connector. Boot the board and access the terminal via HDMI or RS232. Identify the disk with lsblk. Format the target partition if necessary with mkfs.ext4 /dev/sda1, then mount it: mount /dev/sda1 /mnt/data. Add an entry to /etc/fstab for automatic mounting at boot.
  1. Network Interface Configuration: The BPI-5202 has two distinct Ethernet ports. Edit the network configuration file (e.g., /etc/network/interfaces or via NetworkManager depending on the distribution). Assign a static IP to the 1000M port (management network, e.g., 192.168.1.10) and a different IP to the 100M port (field network, e.g., 10.0.0.1). Enable IP routing with sysctl -w net.ipv4.ip_forward=1 to allow communication between the two segments if needed.
  1. Security and Encryption: Activate hardware security features provided by SMEC98SP and SC1161Y chips. For beginners, ensure the firewall is active. Use iptables or firewalld to block all incoming traffic on the 100M port from the management network, except for specific ports (SSH, HTTP). This protects connected industrial equipment.
  1. Install a Sharing Service: Install a simple file server like Samba or NFS. For Samba: apt install samba (or equivalent depending on OS). Configure /etc/samba/smb.conf to share the /mnt/data folder. Restart the service: systemctl restart smbd. The share is now accessible from other machines on the management network.

Verification

Further Reading

Explore the 20-pin GPIO extension to connect IO modules (DI/DO) and automate tasks based on network data. Test the CAN2.0 ports to interface with Programmable Logic Controllers (PLCs). Finally, evaluate the performance of the Loongson 2K1000LAi processor under heavy network load to validate its suitability for your specific industrial needs.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials