# Routing

## Set/Unset interface

### ip

From here <https://www.redeszone.net/tutoriales/servidores/configurar-linux-comando-ip-iproute2-suite/>

To see links, masks, local network config:

```bash
ip a
ip link show
```

To activate an interface:

```bash
ip link set enp0s1 up
```

To deactivate an interface:

```bash
ip link set enp0s1 down
```

To configure a network interface:

```bash
ip addr add 192.168.1.1/24 dev enp0s1
```

To delete a network interface:

```bash
ip addr del 192.168.1.1 dev enp0s1
```

### nmcli

If we detect a interface as "disconnected".

```bash
nmcli device status
```

We could try to "activate" it:

```bash
nmcli dev connect enp0s8
```

And maybe the interface now is giving us new info (:
