# [Solved] How to add another loop device?

## Chili0_

Hi,

According https://askubuntu.com/questions/444124/how-to-add-a-loopback-interface, I have successfully created a new loop device. 

```
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 2014825  bytes 1031007005 (983.2 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 2014825  bytes 1031007005 (983.2 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo:0: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.2  netmask 255.0.0.0

        loop  txqueuelen 1000  (Local Loopback)
```

To make the new loop device auto generated, I created a net.lo0 in /etc/init.d/ with  ln -s net.lo net.lo0 , in /etc/conf.d/net, I have   *Quote:*   

> config_lo0="127.0.0.2 netmask 255.0.0.0"

 , but I got following errors while running /etc/init.d/net.lo0 restart

```
 $ sudo /etc/init.d/net.lo0 restart

Password:

 * Bringing up interface lo0

 *   ERROR: interface lo0 does not exist

 *   Ensure that you have loaded the correct kernel module for your hardware

 * ERROR: net.lo0 failed to start
```

Any advice?

Thanks.

----------

## Chili0_

Frist: kernel should support dummy driver in Devices drivers -> Net driver support -> dummy

```
#  ip link add name type dummy
```

Then in /etc/conf.d/net

```

### Add one more loop device for dnscrypt-proxy

config_loop0="127.0.0.3 netmask 255.0.0.0"

```

Finally，

```
/etc/init.d/net.loop0 start
```

----------

## fedeliallalinea

Moved from Other Things Gentoo to Networking & Security.

----------

## UberLord

```
lo:0: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
```

No, that's an aliased address to the lo interface.

It's not a new loopback device.

But that's probably what you want, it doesn't make sense to have more than one loopback interface.

Anyway, on Linux the preferred command is `ip a` which will show this in more clarity.

----------

## Chili0_

 *UberLord wrote:*   

> 
> 
> ```
> lo:0: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
> ```
> ...

 

Thanks, now I understand.

----------

## dimko

Why loop device?

Would TAP/TAN device not satisfy?

----------

