-
Notifications
You must be signed in to change notification settings - Fork 2
cli tour
Pre-Alpha. This page describes behavior that may change.
The Ze CLI is a network-OS shell, not a Unix CLI bolted on top of a daemon. You connect over SSH, you get tab completion driven by the YANG schema, and the workflow is the one you would expect from a JunOS or Cisco operator: you edit, you diff, you commit, and you can roll back. This page is the five-minute tour. The full reference lives at interfaces/cli.md.
Ze does not have a separate management daemon. Every CLI access goes through the SSH server built into the Ze process. Once ze start is running, you have three ways to talk to it.
ze cli # Interactive shell
ze cli -c "peer list" # One-shot command
ze show peer upstream show # Read-only query, safe in scriptsThe interactive shell (ze cli) is what you use day to day. ze show is the read-only path you put in monitoring scripts and dashboards because it cannot mutate state.
Drop into the shell, list your peers, and look at one in detail.
$ ze cli
ze# peer list
NAME REMOTE AS STATE
upstream 10.0.0.1 65001 ESTABLISHED
ixp 192.0.2.42 65010 ESTABLISHED
ze# peer upstream show
peer upstream {
connection { remote { ip 10.0.0.1; } }
session { asn { remote 65001; } }
state established
uptime 2h13m
capabilities [ four-octet-asn add-path route-refresh ]
}
Tab completion works on every position: command verbs, peer names, address families, log levels. Hit Tab twice to see the candidates.
This is the part that distinguishes Ze from a script-driven daemon. Configuration changes happen in a draft session that belongs to you. They are invisible to other users until you commit them, and they survive disconnection.
ze# edit bgp peer upstream
ze[bgp peer upstream]# set timer hold-time 180
ze[bgp peer upstream]# top
ze# diff
+ bgp peer upstream timer hold-time 180
- bgp peer upstream timer hold-time 90
ze# commit
Commit successful.
If you mistype, discard throws away the draft. If you want a safety net for a remote change you might lock yourself out of, commit confirmed runs a rollback timer: if you do not type commit confirm again within the window, Ze reverts.
ze# commit confirmed 60
Commit applied. Auto-rollback in 60s if not confirmed.
ze# commit confirm
rollback 1 undoes the last commit. The archive keeps every committed config, so rollback 5 is also legal, and you can show archive to see what is in the history.
The shell has a small set of pipe operators borrowed from network OS shells, not from Unix.
ze# bgp summary | json
ze# peer list | match upstream
ze# rib routes received upstream | count
| json is the one you will use most often, both interactively (to inspect a structure) and from scripts (to parse the output cleanly). | no-more disables paging when you want to dump a long table into a file.
For automation, the one-shot form is what you want. ze cli -c runs a single command and exits, and ze show does the same for read-only queries. The exit code is non-zero on error, so you can chain it into shell pipelines without surprises.
- The web UI tour shows the same operations through a browser.
- The Configuration overview explains the YANG model that drives every prompt and form.
- The CLI reference is the long version of this page.
Adapted from main/docs/guide/cli.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology