From 9f573f6c6f861aa9bc48bcaff5664a81a9b0ca17 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 9 Sep 2023 17:59:20 +0200 Subject: [PATCH] Add CLI example fold-out Signed-off-by: Joachim Wiberg --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 588ad111..b8544a81 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,47 @@ Infix is a Linux Network Operating System (NOS) based on [Buildroot][1], and [sysrepo][2]. A powerful mix that ease porting to different platforms, simplify long-term maintenance, and provide made-easy -management using NETCONF[^1]. +management using NETCONF[^1] (remote) or the built-in [CLI][3]. + +
Example CLI Session + +The CLI configure context is automatically generated from the loaded +YANG models and their corresponding [sysrepo][2] plugins. The following +is brief example of how to set the IP address of an interface: + +``` +admin@infix-12-34-56:/> configure +admin@infix-12-34-56:/config/> edit interfaces interface eth0 +admin@infix-12-34-56:/config/interfaces/interface/eth0/> set ipv4 + address autoconf bind-ni-name enabled + forwarding mtu neighbor +admin@infix-12-34-56:/config/interfaces/interface/eth0/> set ipv4 address 192.168.2.200 prefix-length 24 +admin@infix-12-34-56:/config/interfaces/interface/eth0/> show +type ethernetCsmacd; +ipv4 address 192.168.2.200 prefix-length 24; +ipv6 enabled true; +admin@infix-12-34-56:/config/interfaces/interface/eth0/> diff +interfaces { + interface eth0 { ++ ipv4 { ++ address 192.168.2.200 { ++ prefix-length 24; ++ } ++ } + } +} +admin@infix-12-34-56:/config/interfaces/interface/eth0/> leave +admin@infix-12-34-56:/> show interfaces brief +lo UNKNOWN 00:00:00:00:00:00 +eth0 UP 52:54:00:12:34:56 +admin@infix-12-34-56:exec> show ip brief +lo UNKNOWN 127.0.0.1/8 ::1/128 +eth0 UP 192.168.2.200/24 fe80::5054:ff:fe12:3456/64 +admin@infix-12-34-56:/> copy running-config startup-config +``` + +[Click here][3] for more details. +
Infix can run on many different types of architectures and boards, much thanks to Linux and Buildroot. Currently the focus is on 64-bit ARM @@ -45,3 +85,4 @@ more information, see: [Infix in Virtual Environments](doc/virtual.md). [1]: https://buildroot.org/ [2]: https://www.sysrepo.org/ +[3]: doc/cli/introduction.md