# Net

**Description**\
The subcommands can be used to interact with local p2p network connections.

**Subcommands**

* [Connect](/software_manuals/command_reference/net.md#connect) — Start a new connection to a peer.
* [Disconnect](/software_manuals/command_reference/net.md#disconnect) — Close an existing connection.
* [Status](/software_manuals/command_reference/net.md#status) — Status of existing connection.
* [Peers](/software_manuals/command_reference/net.md#peers) — Status of all existing peers.

## Connect

### Description

Start a new connection to a peer.

### Positional Parameters

* `(string) host`— The hostname:port to connect to (required).

### Options

No options required for this subcommand.

### Command

```bash
$ cleos net connect <host>
```

### Examples

Connect to 'hostname:port'.

```bash
$ cleos net connect hostname:port
```

## Disconnect

### Description

Close an existing connection.

### Positional Parameters

* `(string) host`— The hostname:port to disconnect from (required).

### Options

No options required for this subcommand.

### Command

```bash
$ cleos net disconnect <host>
```

### Examples

Disconnect from 'hostname:port'.

```bash
$ cleos net disconnect hostname:port
```

## Status

### Description

Status of existing connection.

### Positional Parameters

* `(string) host`— The hostname:port to query status of connection (required).

### Options

No options required for this subcommand.

### Command

```bash
$ cleos net status <host>
```

### Examples

```bash
$ cleos net status hostname:port
```

Given, a valid, existing 'hostname:port' parameter the above command returns a JSON response looking similar to the one below:

```
{
  "peer": "hostname:port",
  "connecting": false/true,
  "syncing": false/true,
  "last_handshake": {       // Structure explaining in detail in the Network Peer Protocol documentation section
    ...
  }
}
```

## Peers

### Description

Status of all existing peers.

### Positional Parameters

No parameters required fot this subcommand.

### Options

No options required for this subcommand.

### Command

```bash
$ cleos net peers
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cyberway.io/software_manuals/command_reference/net.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
