Home >System Tutorial >LINUX >Running HIP VPLS on a NanoPI R2S

Running HIP VPLS on a NanoPI R2S

Joseph Gordon-Levitt
Joseph Gordon-LevittOriginal
2025-03-15 11:15:10841browse

This article details deploying a Host Identity Based Virtual Private LAN Service (HIP-VPLS) on real hardware using NanoPi R2S devices. A previous article showcased a Mininet prototype; this one focuses on a practical, physical implementation. VPLS creates Layer 2 communication over an IP network, and HIP, a Layer 3.5 solution, enhances security and mobility by separating IP address roles for identification (Host Identity Tags or HITs) and location (routable IP addresses).

Running HIP VPLS on a NanoPI R2S

Hardware and Setup: The setup uses three NanoPi R2S devices as HIP switches, connected via 8-port SNR switches to simulate an IP overlay. Each NanoPi R2S (1GB RAM, quad-core CPU, 32GB SD card) has a LAN and WAN interface. The SNR switches offer 8 1Gb/s ports and two SFP slots. The testbed configuration is shown above.

Deployment: A FriendlyWRT Linux image was flashed onto SD cards for each NanoPi R2S. The hip-vpls-hw repository (https://www.php.cn/link/b57fac77ca8ccadbcca2335607697701) was cloned, and the following commands were executed on each router:

cd hip-vpls-hw
opkg update
opkg install nano rsync python3 python3-pip python3-netifaces
pip3 install pycryptodome
mkdir /opt/hip-vpls/
rsync -rv hiplib switchd.py switchfabric.py /opt/hip-vpls/
cd startup
cp hip-vpls /etc/init.d/
chmod  x /etc/init.d/hip-vpls
/etc/init.d/hip-vpls enable
/etc/init.d/hip-vpls start

Crucially, the Ethernet interface configuration was modified to enable promiscuous mode (promisc '1') for raw socket capture:

<code>config device
        option name 'eth1'
        option macaddr '3e:25:61:94:f3:37'
        option promisc '1'</code>

Firewall rules were adjusted to allow all network traffic. HITs were generated, and host files and firewall rules were configured (details in a previous article).

Running HIP VPLS on a NanoPI R2S

Performance: iPerf testing between PC3 and Server0 yielded a throughput of 1.5Mb/s on 1Gb/s links. Further performance optimization is underway, including compiling the code in C.

The above is the detailed content of Running HIP VPLS on a NanoPI R2S. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn