> For the complete documentation index, see [llms.txt](https://patriq.gitbook.io/iota/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://patriq.gitbook.io/iota/development/node.md).

# Node control

Now that we have obtained the knowledge on how to initialize our main IOTA repository object, we can explore what are we able to do with the node that we are connected to.

The first thing we can do is to fetch node info by calling the method ***GetNodeInfo*****&#x20;as follows**:

```csharp
var repository = IotaRepositoryFactory.Create("https://altnodes.devnet.iota.org");
var info = repository.GetNodeInfo();
```

![NodeInfo](https://2043776177-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Laz1nydn5IbWWiM1u12%2F-LdNrUXk0YV8JNmWPno3%2F-LdNrm9yJ7fQyAEOYj4C%2Fimage.png?alt=media\&token=ac0e2eed-8802-48d2-b326-b7fef6430087)

As we can see, the method returns quite a lot of information about the node that we are currently connected to. One of the things to pay attention to here is the LatestMilestoneIndex and the LatestSolidSubtangleMilestoneIndex numbers. If both numbers are equal, it means that the node is currently in sync with the network.

{% hint style="info" %}
**WARNING**: The next set of methods are by default blocked by the nodes. The only way to access them is from localhost.
{% endhint %}

Another method we can call is ***GetNeighbors*** which will return the list of IRI neighbors:

```csharp
var repository = IotaRepositoryFactory.Create("https://altnodes.devnet.iota.org");
var neighbors = repository.GetNeighbors();
```

We can also add neighbors to the node by calling ***AddNeighbors*** method:

```csharp
var repository = IotaRepositoryFactory.Create("https://altnodes.devnet.iota.org");
var response = repository.AddNeighbors(new List<string>() {
    "https://to.add.neighbor.URL"
});
```

We're also able to remove them by calling ***RemoveNeighbors*** method:

```csharp
var repository = IotaRepositoryFactory.Create("https://altnodes.devnet.iota.org");
var response = repository.RemoveNeighbors(new List<string>() {
    "https://to.remove.neighbor.URL"
});
```
