This commit enables support for running custom startup scripts at boot, allowing a mix of a NETCONF-based system and Classic /etc. For example, use NETCONF to set up network interfaces, users, etc. and runparts for enabling and configuring the device as an OSPF router. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
6.2 KiB
Introduction
Infix is an embedded Linux Network Operating System (NOS) based on Buildroot, Finit, ifupdown-ng, and sysrepo. Providing an easy-to-maintain and easy-to-port Open Source base for networked equipment.
See the GitHub Releases page for out pre-built images. The Latest Build has the bleeding edge images, if possible we recommend using a versioned release.
Infix has two main flavors, or defconfigs:
-
NETCONF: the default, is configured using the
clitool, or any external NETCONF client, after boot. It uses sysrepo as the data store to generate configuration files in/etcand control the system daemons, e.g., enable DHCP client on an interface. -
Classic: built from
$ARCH_classic_defconfig. Here it is up to the administrator to modify configuration files in/etcand control the system daemons using theinitctltool. After login, see the onlinehelpcommand for an introduction to the system.
Both flavors have a root user, which is only allowed to log in from
the console port, no password by default on standard builds. There is
also a factory user, password reset, to perform factory reset on
systems that do not have a reset button.
Additionally, the standard builds also have an admin user, which is
allowed to log in from remote, password admin on standard builds. It
is the recommended account to use for managing Infix.
Hybrid Mode
Since Infix is under heavy development, it does not yet have all its bells and whistles in place, in particular the default build. To that end it is possible to manually manage certain services that are not yet possible to configure using NETCONF.
At bootstrap Finit can optionally start scripts from a run-parts(8)
like directory: /cfg/start.d. To enable this mode, see the following
example:
root@infix:~$ mkdir /cfg/start.d
root@infix:~$ cd /cfg/start.d
root@infix:/cfg/start.d$ cat <<EOF >10-enable-ospf.sh
#!/bin/sh
# Use vtysh to modify the OSPF configuration
rm /etc/frr/frr.conf
ln -s /cfg/frr/frr.conf /etc/frr/
initctl enable zebra
initctl enable ospfd
initctl enable bfdd
EOF
root@infix:/cfg/start.d$ chmod +x 10-enable-ospf.sh
Reboot to activate the changes. To activate the changes without
rebooting, run the script and call initctl reload.
Hardware
aarch64
By default, Infix builds with support for the following boards (you may enable additional boards in the config, of course):
- Marvell CN9130 CRB
- Marvell EspressoBIN
- Microchip SparX-5i PCB135 (eMMC)
See the aarch64 specific documentation for more information.
x86_64
Primarily intended to be run under QEMU for development & test as well as evaluation, demo and training purposes, e.g. using GNS3 or Qeneth.
QEMU
A virtualized instance can easily be launched from a Linux system, with
Qemu installed, by issuing make run.
Some settings, e.g. networking, can be configured via make menuconfig
under External options -> QEMU virtualization.
GNS3
Download the latest build of the x86_64, or x86_64_classic
flavor. Unpack in a dedicated directory and use "Import Appliance"
to install the .gns3a file into GNS3. Infix (x86_64) is in the
"Router" category, it has 10 interfaces available by default for use as
switch ports or routing. The classic build only has one interface by
default, geared more towards acting as an end device.
Building
Buildroot is almost stand-alone, but need a few locally installed tools to bootstrap itself. For details, see the excellent manual.
Briefly, to build an Infix image; select the target and then make:
make x86_64_defconfig
make
Online help is available:
make help
To see available defconfigs for supported targets, use:
make list-defconfigs
Note: build dependencies (Debian/Ubuntu): sudo apt install make libssl-dev
Origin & Licensing
Infix is entirely built on Open Source components (packages). Most of them, as well as the build system with its helper scripts and tools, is from Buiildroot, which is distributed under the terms of the GNU General Public License (GPL). See the file COPYING for details.
Some files in Buildroot contain a different license statement. Those files are licensed under the license contained in the file itself.
Buildroot and Infix also bundle patch files, which are applied to the sources of the various packages. Those patches are not covered by the license of Buildroot or Infix. Instead, they are covered by the license of the software to which the patches are applied. When said software is available under multiple licenses, the patches are only provided under the publicly accessible licenses.
Infix releases include the license information covering all Open Source
packages. This is extracted automatically at build time using the tool
make legal-info. Any proprietary software built on top of Infix, or
Buildroot, would need separate auditing to ensure it does not link with
any GPL1 licensed library.
-
Infix image builds use GNU libc (GLIBC) which is covered by the LGPL. The LGPL does allow proprietary software, as long as said software is linking dynamically, not statically, to GLIBC. ↩︎