9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Loopback device
@ 2022-01-03 15:29 Benjamin Riefenstahl
  2022-01-03 17:43 ` hiro
  2022-01-03 21:05 ` rgl
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Riefenstahl @ 2022-01-03 15:29 UTC (permalink / raw)
  To: 9front

Hi all,

I found out how to activate the loopback interface
(localhost/127.0.0.1).

While I was trying things, I stumbled over loopback(3).  The
documentation says to call "bind -a #λ /net" (which should actually be
spelled "bind -a '#λ' /net"), but my system responds to that with "bind:
#λ: unknown device in # filename".  Is this not compiled in?  Is it
usefull?

TIA, benny


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Loopback device
  2022-01-03 15:29 [9front] Loopback device Benjamin Riefenstahl
@ 2022-01-03 17:43 ` hiro
  2022-01-03 20:30   ` Benjamin Riefenstahl
  2022-01-03 21:05 ` rgl
  1 sibling, 1 reply; 6+ messages in thread
From: hiro @ 2022-01-03 17:43 UTC (permalink / raw)
  To: 9front

loopback is a *link*. it has two sides.
it's not the same as the 127.0.0.1 feature from other unixes.

localhost/127.0.0.1 is not normally used on plan9.

it doesn't make much sense on a distributed and namespaced system.
better use more meaningful unique IPs and hostnames and service names
and then use just those, together with our excellent ndb service to
resolve it all.

On 1/3/22, Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> wrote:
> Hi all,
>
> I found out how to activate the loopback interface
> (localhost/127.0.0.1).
>
> While I was trying things, I stumbled over loopback(3).  The
> documentation says to call "bind -a #λ /net" (which should actually be
> spelled "bind -a '#λ' /net"), but my system responds to that with "bind:
> #λ: unknown device in # filename".  Is this not compiled in?  Is it
> usefull?
>
> TIA, benny
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Loopback device
  2022-01-03 17:43 ` hiro
@ 2022-01-03 20:30   ` Benjamin Riefenstahl
  2022-01-03 22:22     ` hiro
       [not found]     ` <CAFSF3XMZnF1TsM6tVHS220LwF7e0YW4kbWC3O15r5JJiR=0WKg@mail.gmail.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Riefenstahl @ 2022-01-03 20:30 UTC (permalink / raw)
  To: hiro; +Cc: 9front

Hi hiro,

Thanks for taking the time.

hiro writes:
> loopback is a *link*. it has two sides.
> it's not the same as the 127.0.0.1 feature from other unixes.

Ok.  But that does not answer my questions.  Why doesn't the bind
command from the man page work?  And what *does* loopback do?

Calling it a link with two sides makes it sound like a pipe.  And being
mounted in /net makes it sound like, well, localhost, which also has two
sides, in the sense that I can run a server on it and than connect to
that server, all on the same host.

> localhost/127.0.0.1 is not normally used on plan9.
>
> it doesn't make much sense on a distributed and namespaced system.
> better use more meaningful unique IPs and hostnames and service names
> and then use just those, together with our excellent ndb service to
> resolve it all.

I find I most often use it for testing and for other code that needs an
IP with two sides where I do not want to hardcode, configure or find out
the host name or host IP.

Thanks, benny

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Loopback device
  2022-01-03 15:29 [9front] Loopback device Benjamin Riefenstahl
  2022-01-03 17:43 ` hiro
@ 2022-01-03 21:05 ` rgl
  1 sibling, 0 replies; 6+ messages in thread
From: rgl @ 2022-01-03 21:05 UTC (permalink / raw)
  To: 9front

hi!

you can accomplish something similar to the unixen lo0 with:

	% ip/ipconfig loopback /dev/null 127.1


hth,

-rodri


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Loopback device
  2022-01-03 20:30   ` Benjamin Riefenstahl
@ 2022-01-03 22:22     ` hiro
       [not found]     ` <CAFSF3XMZnF1TsM6tVHS220LwF7e0YW4kbWC3O15r5JJiR=0WKg@mail.gmail.com>
  1 sibling, 0 replies; 6+ messages in thread
From: hiro @ 2022-01-03 22:22 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: 9front

i think the main use case would be something like what tc is used for on linux:
simulating a network link with output buffers, fragmentation, packet
drop, delay.

somebody might use it's flow-control for creating a bit of fairness on
a saturated slow link...

you're right that it isn't currently being built by default:

cpu% cd /sys/src/9/port
cpu% g λ
devloopback.c:718:      L'λ',
cpu% g loopback|grep -v devloopback.c
sdloop.c:2:  * sd loopback driver,

also try cat master in same directory.


On 1/3/22, Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> wrote:
> Hi hiro,
>
> Thanks for taking the time.
>
> hiro writes:
>> loopback is a *link*. it has two sides.
>> it's not the same as the 127.0.0.1 feature from other unixes.
>
> Ok.  But that does not answer my questions.  Why doesn't the bind
> command from the man page work?  And what *does* loopback do?
>
> Calling it a link with two sides makes it sound like a pipe.  And being
> mounted in /net makes it sound like, well, localhost, which also has two
> sides, in the sense that I can run a server on it and than connect to
> that server, all on the same host.
>
>> localhost/127.0.0.1 is not normally used on plan9.
>>
>> it doesn't make much sense on a distributed and namespaced system.
>> better use more meaningful unique IPs and hostnames and service names
>> and then use just those, together with our excellent ndb service to
>> resolve it all.
>
> I find I most often use it for testing and for other code that needs an
> IP with two sides where I do not want to hardcode, configure or find out
> the host name or host IP.
>
> Thanks, benny
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9front] Loopback device
       [not found]     ` <CAFSF3XMZnF1TsM6tVHS220LwF7e0YW4kbWC3O15r5JJiR=0WKg@mail.gmail.com>
@ 2022-01-03 22:45       ` Benjamin Riefenstahl
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Riefenstahl @ 2022-01-03 22:45 UTC (permalink / raw)
  To: 9front

Hi hiro,

hiro writes:
> i think the main use case would be something like what tc is used for
> on linux: simulating a network link with output buffers,
> fragmentation, packet drop, delay.
>
> somebody might use it's flow-control for creating a bit of fairness on
> a saturated slow link...

Ok.

> you're right that it isn't currently being built by default:
>
> cpu% cd /sys/src/9/port
> cpu% g λ
> devloopback.c:718: 	L'λ',
> cpu% g loopback|grep -v devloopback.c
> sdloop.c:2:  * sd loopback driver,
>
> also try cat master in same directory.

I see.  Thanks for that pointer.

Thank you very much,
benny

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-03 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 15:29 [9front] Loopback device Benjamin Riefenstahl
2022-01-03 17:43 ` hiro
2022-01-03 20:30   ` Benjamin Riefenstahl
2022-01-03 22:22     ` hiro
     [not found]     ` <CAFSF3XMZnF1TsM6tVHS220LwF7e0YW4kbWC3O15r5JJiR=0WKg@mail.gmail.com>
2022-01-03 22:45       ` Benjamin Riefenstahl
2022-01-03 21:05 ` rgl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).