Post

Mini Lab Part 1

Creating a test lab environment for learning Ansible and advanced networking techniques.

Introduction

I am building a lab environment to test Ansible Playbooks and learn about policy based routing, VRF’s, and ISP failover capabilities. I will also test the different options that are available on Mikrotik routers. To prepare for this testing environment, I upgraded by home router from a HEX S model to a more powerful unit and purchased a Waveshare 4 port UART adapter from Amazon that has a max baud rate of 460,800 (more on this later).

Obstacles

The first issue I encountered was the Raspberry Pi I had slated for this project would not boot. I tried different micro sd cards, different power supplies. Setting that problem aside, I decided to start working on the Orange Pi 5 so it could be used as a jumphost and OOB console server. My goal was to have the Orange Pi be a central access point to my home network and mini lab utilizing ethernet connections for primary access and serial connections as a backup in the event I make a network change that breaks access. I made a rough diagram in Excalidraw to show how everything was connected.

foo

This is when I encountered the second hurdle in this project. The USB wifi adapter I had on-hand (Qualcomm Atheros) needed the kernel module ath9k enabled when building the kernel. The adapter was recognized when running lsusb but no interface was listed when running iwconfig. I was not interested in going down the path of performing a custom kernel build. The version of Ubuntu that I am using is community built Ubuntu ported to Rockchip hardware.

I wanted to have the Orange Pi broadcast a wifi network called RescueNET and be running a DHCP server. This way I can use it as an isolated management device for all my networking gear.

Persistance

I changed up my design and moved the Orange Pi to function as the client in my mini lab and a Intel n150 mini pc as the jumphost and OOB server. I wiped the included Windows 11 install from the mini pc and installed Ubuntu 24.04. The mini pc is made by Aoostar, has 12 GB of LPDDR5, a 512 GB m.2 SSD, 2 2.5 gb ethernet adapters, and a built-in wifi adapter. This configuration suited my needs for this project perfectly. Also, the included wifi adapter had mainline Linux support.

Earlier, I mentioned that the baud rate of the Waveshare adapter would be an issue. Rockchip sets the default baud rate to 1,500,000 and the adapter I purchased had a max baud rate of 460,800. Since I wanted to be able to access the Orange Pi through the serial interface, I needed to lower the baud rate and enable the UART port. To achieve this, I edited the file /etc/default/u-boot and added the following line to the bottom:

1
U_BOOT_FDT_OVERLAYS="device-tree/rockchip/overlay/rk3588-uart0-m2.dtbo"

I also edited the file /etc/kernel/cmdline to add console=ttyS0,115200 and overlays=rk3588-uart0-m2. After running u-boot-update and rebooting, the serial console baud rate was a manageable 115,200. Now when I ssh in, I can see a agetty listening on ttyS0.

This rounds out part 1 of this build, part 2 I will be installing and configuring the software sides of things.

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.

© Kris Crawford. Some rights reserved.

Using the Chirpy theme for Jekyll.