Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How to add another loop device?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Chili0_
n00b
n00b


Joined: 09 Oct 2017
Posts: 71

PostPosted: Thu Dec 09, 2021 2:01 am    Post subject: [Solved] How to add another loop device? Reply with quote

Hi,

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

Code:
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

Code:
 $ 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.
_________________
Regards.


Last edited by Chili0_ on Thu Dec 09, 2021 2:50 am; edited 3 times in total
Back to top
View user's profile Send private message
Chili0_
n00b
n00b


Joined: 09 Oct 2017
Posts: 71

PostPosted: Thu Dec 09, 2021 2:43 am    Post subject: Reply with quote

Frist: kernel should support dummy driver in Devices drivers -> Net driver support -> dummy
Code:
#  ip link add name type dummy


Then in /etc/conf.d/net

Code:

### Add one more loop device for dnscrypt-proxy
config_loop0="127.0.0.3 netmask 255.0.0.0"


Finally,
Code:
/etc/init.d/net.loop0 start

_________________
Regards.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Thu Dec 09, 2021 9:18 am    Post subject: Reply with quote

Moved from Other Things Gentoo to Networking & Security.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Dec 12, 2021 2:53 pm    Post subject: Reply with quote

Code:
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.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Chili0_
n00b
n00b


Joined: 09 Oct 2017
Posts: 71

PostPosted: Tue Dec 14, 2021 6:16 am    Post subject: Reply with quote

UberLord wrote:
Code:
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.


Thanks, now I understand.
_________________
Regards.
Back to top
View user's profile Send private message
dimko
Apprentice
Apprentice


Joined: 12 Feb 2006
Posts: 196

PostPosted: Thu Feb 10, 2022 11:44 pm    Post subject: Could I ask Reply with quote

Why loop device?
Would TAP/TAN device not satisfy?
_________________
Just a user.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum