Re: systemd-network and loopback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 09, 2022 at 12:17:42PM -0500, Greg Oliver wrote:
>      Il giorno ven 9 set 2022 alle 17:37:14 +02:00:00, Lennart Poettering
>      <[2]lennart@xxxxxxxxxxxxxx> ha scritto:
>      > People sometimes route stuff onto the loopback device in addition to
>      > the the usual [3]127.0.0.0/8 traffic so that it ends up on local
>      sockets.
> 
>      Thanks for the reply, but I don't fully understand the implications of
>      this, nor how sd-network is related - I'm quite ignorant when it comes
>      to networking :/
> 
>    Well, easiest to explain is user apps that use tcp or udp sockets to
>    communicate.  If they are on the same host, then huge gains can be
>    achieved by using the loopback adapter (especially TCP comms).
>    You should google search for loopback MTUs..

Sure, but network connections between processes on the local host will
always use the loopback interface, whether they go out of their way to
do so or not.  It's part of the IP spec and it doesn't matter who's
managing the loopback interface, nor does it depend on any special
routing tricks or prefixes being present on the loopback interface
specifically.

$ ip -4 addr show dev ens5 ; ip -4 addr show dev lo ; ip -4 ro
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    altname enp0s5
    inet 10.0.0.162/24 brd 10.0.0.255 scope global dynamic ens5
       valid_lft 3315sec preferred_lft 3315sec
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
default via 10.0.0.1 dev ens5 
10.0.0.0/24 dev ens5 proto kernel scope link src 10.0.0.162 
192.168.80.0/25 dev br-48e2d6739dbf proto kernel scope link src 192.168.80.1 

$ ip -4 ro get 10.0.0.162
local 10.0.0.162 dev lo src 10.0.0.162 uid 1000 
    cache <local>




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux