# Initial CLI configuration

## Introduction

When Stream is deployed virtually or as a physical M-Series appliance, it defaults to DHCP for the management interface. If you are not using DHCP or would like to set a static address, you will need to login to the CLI of Stream to set a static interface assignment. DNS must also be configured at the CLI of Stream for these types of deployments.

## Connecting to the CLI

Stream login at the CLI is very similar to logging in to other Sensors. The primary difference is that there is no physical console access or IPMI/iDRAC to log in to unless you are using an M-Series physical appliance. Logging in can be done via your hypervisor console function or using SSH to the management interface if it was preconfigured with DHCP.

To connect to the CLI of an M-series appliance, please see the [quick start guide](https://docs.vectra.ai/deployment/ndr-physical-appliances/m-series) for more details.

* Available options for connecting will vary by your specific model. Some options are:
  * KVM or “crash cart”
  * Serial console (M29 only)
  * Support (MGT2) port
  * iDRAC/IPMI
  * MGT (MGT1) port once configured
* Default password is `changethispassword`.

For traditional hypervisor deployment (VMware, Hyper-V, KVM, etc)

* Connect to the Stream CLI using your hypervisor console or `ssh vectra@<IP or Hostname>` if you know the IP address or hostname (if configured in your DNS).
* Default password is `changethispassword`.

For cloud deployed Stream appliances (AWS, Azure, GCP)

* Connect to the Stream CLI using `ssh -i /path/to/private_key vectra@<IP or Hostname>` if you know the IP address or hostname (if configured in your DNS).
* Once logged in you can view command syntax for the `set interface` command:

```
set interface -h
Usage: set interface [OPTIONS] [mgt1] [dhcp|static] [IP] [SUBNET_MASK]
[GATEWAY_ADDRESS]
Sets mgt1 to either dhcp or static ip configuration
Options:
-h, --help Show this message and exit.
```

{% hint style="info" %}
A KB article is available for IP address configuration should more detail be desired: [Configuring IP settings for appliances](https://docs.vectra.ai/deployment/appliance-operations/configuring-ip-settings-for-appliances)
{% endhint %}

## Setting Static IP and DNS

**Setting the IP address statically:**

`set interface mgt1 static x.x.x.x y.y.y.y z.z.z.z`

Where:

* `x.x.x.x` is the desired interface IP address
* `y.y.y.y` is the desired interface network mask
* `z.z.z.z` is the desired gateway

To change back to DHCP (default):

`set interface mgt1 dhcp`

**Configure DNS for the appliance:**

Command syntax to set DNS (up to 3 nameservers are supported):

`set dns [nameserver1 <ip>] [nameserver2 <ip>] [nameserver3 <ip>]`

Example:

`set dns 10.50.10.101 10.50.10.102`

**Verifying DNS Configuration:**

`show dns`

Once you have set an IP and DNS, please use the `set password` command to change the password.

Example:

```
vscli > set interface mgt1 static 172.16.12.11 255.255.255.0 172.16.12.1
Interfaces updated successfully
vscli > set dns 10.50.10.101
DNS Set: success
vscli > show interface
mgt1:
    Running:
        Gateway: 172.16.12.1,
        Ip: 172.16.12.11,
        Link Speed: 10Gbps,
        Link State: up,
        Mac: 00:0c:29:89:ad:a6,
        Mode: static,
        Netmask: 255.255.255.0
vscli > show dns
Id|Server      |Description
1  10.50.10.101 Configured DNS nameserver
```
