Skip to main content
Use the ZEDEDA CLI (ZCLI) to manage virtual networks from the command line. A virtual network gives application instances on an edge node their connectivity, either as a Local routed subnet with its own DHCP server or as a Switch bridge onto a physical port. The CLI name for a virtual network is network-instance, so this article covers zcli network-instance commands with syntax and examples for each operation. If you want to manage the node networks that define connectivity for the physical ports of an edge node, see Manage Networks instead.

Before You Start

Manage Virtual Networks

Create a virtual network

Create a virtual network on a single edge node (--edge-node) or on a node cluster (--edge-node-cluster). You must pass exactly one of the two. The --kind and --ip-type flags are required. The name must be unique and cannot be changed after creation. If you omit --title, ZCLI uses the name as the title.
The --kind flag selects the virtual network type. The console offers the following two types. ZCLI also accepts --kind=cloud, which the console does not offer; if you pass --config with this kind, you must also pass --port. The --port flag sets the node port the virtual network uses. It accepts a physical port name (for example eth0), a VLAN sub-interface logical label, an adapter label that groups several ports for multi-path routing, or one of the following predefined labels. Omit --port to create an air-gapped virtual network with no external connectivity (None in the console). The following flags are the ones you are most likely to need. For the full list, run zcli network-instance --help. Example (Local virtual network with DHCP on a single node):
Example (Local virtual network with static IP settings and a DHCP range):
Example (Switch virtual network bound to a specific port):
Example (Local virtual network on a node cluster):
Example (Local virtual network with tags and static routes from a file):

View a virtual network

Query a single virtual network by name or UUID, or list the virtual networks in your enterprise. Add --detail to a single-network query to show the full configuration and runtime status, including the bridge, IP mappings, and static routes. When listing, filter with --project to show the virtual networks in one project, --edge-node or --edge-node-cluster to show those on one node or cluster, --name-pattern to match a substring of the name, --state to match a run state, or --tags to match a tag. Use --summary to print counts by kind and address type instead of the full list. Add --raw to a single-network query to print the raw status and metrics JSON that the edge node reports for the virtual network instead of the formatted output. If the node has not reported any, ZCLI prints No metrics or status in response.
Example (list all virtual networks):
Example (list the virtual networks in a project):
Example (list the virtual networks on one edge node):
Example (list activated virtual networks whose name contains a substring):
Example (show one virtual network in detail):
Example response:
The --page-size flag changes how many records each API call returns while ZCLI builds the full list. It does not change the output; it only reduces the chance of a timeout on large enterprises.

Update a virtual network

Change the title, port, IP settings, DNS and NTP servers, static routes, MTU, tags, or default flag of an existing virtual network. You cannot change the name, kind, IP type, or hosting node after creation; to change those, create a new virtual network. If you pass --subnet or --gateway on its own, ZCLI validates the new value against the other value already stored on the virtual network. If you run the command with no options, ZCLI reports Nothing to update.
Example (change the title and port):
Example (set NTP servers):
Example (replace the static routes from a file):

Delete a virtual network

Delete a virtual network you no longer need. Without the -f flag, ZCLI asks you to confirm the deletion.
Example:
Example response:
The -f flag deletes the virtual network without a confirmation prompt.

Next Steps

Virtual Networks Overview

How Local and Switch virtual networks, IP options, VLANs, and routing fit together.

Create a Virtual Network

Create a Local or Switch virtual network in the Edge Intelligence Platform Console.

Manage a Virtual Network

GUI-based virtual network management.

Overview

All ZCLI command procedures, organized by resource type.