CLI

The CLI (KonnectOS Shell Interface) is a convenient way to run low-level commands for troubleshooting and diagnostics. To open it, select Tools/Diagnostics > CLI from the side menu bar. A shell session opens in the browser, see figure below.

Tools_CLI (1)-20261105-075450.png
CLI
  • Type k4. and press Tab twice to list all available commands (as shown in the figure). Tab completion also completes partially typed command names.

  • Run k4.help to display the description and syntax of all commands. The output is shown in a pager: press Space to go to the next page and q to quit.

  • Click the ? (Click here for Help) icon at the top right of the terminal to open the CLI help document. The full list of commands is also available here: https://cdn.k4mobility.com/cdn/edge/doc/k4help.pdf

  • If the session is disconnected, click RECONNECT below the terminal to open a new shell session.

Commands marked with ⚠ change the system state (for example, reboot the system, flush caches or change settings). Use them with care, preferably under guidance from Kognitive support.

Command List

The commands are grouped by prefix.

Help

Command

Description

k4.help

Displays the description and syntax of all k4 commands in a pager.

Debug (k4.debug.*)

Command

Description

k4.debug.dpi [local-ip | local-subnet]

Investigates the recent DPI hits (last 5 minutes). The output can be restricted to the local IP or subnet specified.

k4.debug.frr

Prints debug information about FRR (dynamic routing).

k4.debug.tunepre help

k4.debug.tunepre dump

k4.debug.tunepre <parameter> <value>

Tunes the PRE parameters. <parameter> is one of: rtt_timeout, rtt_window, rate_window, rate_threshold, sample_interval, reweight_time, mini_bounded_rate, weight_lower_boundary or mini_bounded_rate_vtp. The help sub-command shows details of the parameters; dump shows their current values.

⚠ Changes the system state.

k4.debug.wireguard

k4.debug.wireguard today

k4.debug.wireguard -[0-9]

Prints debug information about WireGuard: its running status and the WireGuard client logs. today shows today's client log; -1, -2, etc. show the client logs of earlier days. Use it to troubleshoot current and past WireGuard VPN issues, for example a tunnel that does not come up or a connection that dropped earlier. Available from KonnectOS 8.1.2 Build 142.

Monitor (k4.monitor.*)

Unless stated otherwise, -i interface uses the named native WAN interface, -v interface uses the VTP tunnel over the named WAN interface, and -l vlan runs the command as if the traffic came from the named VLAN. Options after -- are passed to the underlying Linux utility (run man <utility> for details).

Command

Description

k4.monitor.iftop [-i interface] [-t target] [-- iftop-options]

Runs the Linux iftop utility, which displays a table of current bandwidth usage by pairs of hosts on a named interface (or on the first external-looking interface if none is specified). -i shows the named native WAN interface; -t shows traffic for the named native target host.

k4.monitor.iperf [-c server] [-i interface] [-- iperf3-options]

Runs iperf3 to measure throughput against an iperf3 server.

k4.monitor.iptraf [parameters]

Runs the Linux iptraf-ng utility, a full-screen IP LAN monitor that generates network statistics (TCP info, UDP counts, ICMP and OSPF information, Ethernet load, node stats, IP checksum errors and others).

k4.monitor.mypublicip [-v] [-i interface]

Shows the Internet-facing (public) IP for the WAN interface specified. With -v, shows the VTP/MPVPN public IP.

k4.monitor.ping [-i interface] [-- ping-options] target

k4.monitor.ping [-v interface] [-- ping-options] target

k4.monitor.ping [-l vlan] [-- ping-options] target

k4.monitor.ping [-- ping-options] target

Pings a target IP or FQDN using ICMP ECHO_REQUEST. -i pings through the named native WAN interface; -v through the VTP tunnel over the named WAN interface; -l as if coming from the named VLAN.

k4.monitor.speedtest [-s server] [-i interface] [-- speedtest-options]

k4.monitor.speedtest [-s server] [-v interface] [-- speedtest-options]

k4.monitor.speedtest [-s server] [-l vlan] [-- speedtest-options]

Runs a speed test using the Linux speedtest utility, which measures latency, jitter, packet loss, download and upload bandwidth to a nearby Speedtest server. -s selects a specific server; -i, -v and -l work as for ping.

k4.monitor.traceroute parameters

Runs the Linux traceroute utility, which tracks the route packets take to reach a host. The parameters are the same as for the Linux traceroute command.

k4.monitor.tshark [-i interface] [-v vlan-id] [-- tshark-parameters]

Runs the Linux tshark network protocol analyzer to capture packet data. -i captures on the named native WAN interface; -v captures on the specified VLAN on the LAN interface.

k4.monitor.wget parameters

Runs the Linux wget utility for non-interactive download of files from the Web (HTTP, HTTPS and FTP).

Operations (k4.op.* and k4.ops.*)

Command

Description

k4.op.eth

Ethernet interface operation command. (No description is shown in k4.help; contact Kognitive support before use.)

⚠ Changes the system state.

k4.op.reboot

Reboots the system, after asking for confirmation.

⚠ Changes the system state.

k4.op.ssh [-p port] [username@]target

Runs the Linux ssh utility to log in to a remote machine and run commands there over an encrypted connection.

k4.ops.arp-flush interface [ip-to-delete]

Flushes the ARP cache for the named interface. If an IP is specified, only that entry is deleted.

⚠ Changes the system state.

k4.ops.dhcp-lease-time [new-lease-time]

Shows or sets the DHCP lease time.

⚠ Changes the system state.

k4.ops.ignore-dns [on|off]

Turns the "Ignore DNS" mode on or off. When on, DPI ignores all DNS (udp/53) flows. Without a parameter, shows the current state.

⚠ Changes the system state.

k4.ops.ipsec.log on|off|view

Turns IPSec logging on or off, or views the IPSec log.

k4.ops.mpk.mode [<interface> standard|low_latency|speed]

Shows or modifies the PEP (MultiPath Konnect) mode.

⚠ Changes the system state.

k4.ops.mpk.server [ip country]

Shows or modifies the MultiPath Konnect server.

⚠ Changes the system state.

k4.ops.nostat [on|off]

Turns the "No Stats" mode on or off. When on, WAN usage statistics are not collected. The system must be rebooted for a change to take effect. Without a parameter, shows the current state.

⚠ Changes the system state.

k4.ops.sample-threshold [<value>|default]

Sets the DPI sample threshold. A reboot is required after a change. Without a parameter, shows the current state.

⚠ Changes the system state.

k4.ops.split_tunnel [flush]

Without an argument, lists the IP sets currently present for the Split Tunnel feature. With flush, clears all such IP sets.

⚠ Changes the system state.

k4.ops.voip start|restart|stop|status|enable|disable

k4.ops.voip extension add <extension> <password>

k4.ops.voip extension del <extension>

k4.ops.voip trunk <login> <password> <gateway>

k4.ops.voip incoming add <did-number> <extension> [<extension> ...]

k4.ops.voip incoming del <did-number>

k4.ops.voip outgoing <cli-number> [<display-name>]

k4.ops.voip country <long-distance-prefix> <international-prefix> <country-code>

k4.ops.voip no trunk|outgoing|country

k4.ops.voip cdr

k4.ops.voip log-on|log-off|log-view

Configures VoIP, views CDR records and controls SIP logging.

⚠ Changes the system state.

Show (k4.show.*)

Command

Description

k4.show.arp

Shows the ARP cache (runs the Linux ip -n neigh show command).

k4.show.dhcp [vlan<vid> | <subnet>]

Shows the current leases assigned by the Kea DHCP server. If an access VLAN or subnet is specified, only the leases pertaining to it are displayed.

k4.show.firewall

Lists the current firewall rules.

k4.show.flowcount [-r] [-f part-of-ip-or-mac] [-i ip] [-m mac]

Shows the current flow count for each local IP as tracked by DPI, sorted low-to-high. -r lists high-to-low; -f shows the flows for local IPs/MACs matching the pattern; -i or -m shows the flows for the specified local IP or MAC.

k4.show.frr <items-to-show>

Passes the items to the vtysh show command shell of FRR (dynamic routing).

k4.show.interfaces

Lists all non-virtual interfaces with their status, assigned addresses and TC configurations, and the speed and duplexity of Ethernet interfaces.

k4.show.log voip|ipsec

Runs tail -f on the Asterisk (VoIP) or IPSec log.

k4.show.multicast [interface]

Shows the count of received multicast packets on the specified interface. If no interface is specified, shows the count for each VLAN interface.

k4.show.routes

Shows the system routes.

k4.show.system

Prints a summary of the CPU, memory and disk status.

Delete (k4.del.*)

Command

Description

k4.del.dhcp <ip>

Deletes the existing lease for the specified IP from the Kea DHCP server.

⚠ Changes the system state.

VSAT (k4.vsat.*)

These commands are listed by Tab completion but have no description in k4.help. Use them only under guidance from Kognitive support.

Command

Description

k4.vsat.backup_config

Backs up the VSAT modem configuration.

⚠ Changes the system state.

k4.vsat.clear_config

Clears the VSAT modem configuration.

⚠ Changes the system state.

k4.vsat.switch_modem

Switches the VSAT modem.

⚠ Changes the system state.