PRE router flag, what is the E?

All around i2pd - a different implementation of the I2P protocol
Post Reply
supperman
Posts: 8
Joined: 22 Mar 2023 16:42

PRE router flag, what is the E?

Post by supperman »

title
User avatar
lgillis
Posts: 144
Joined: 20 Oct 2018 12:52

Re: PRE router flag, what is the E?

Post by lgillis »

Spring https://www.youtube.com/playlist?list=PLF-q-IGQQb1uK7fYuaQiRpcORDSmfsY2n
supperman
Posts: 8
Joined: 22 Mar 2023 16:42

Re: PRE router flag, what is the E?

Post by supperman »

I'm not seeing it. It's called router caps, apologies for the confusion. The P is bandwidth, f is floodfill R means router. I am typically a PR router, but I see E show up occasionally, and thus PRE.
User avatar
lgillis
Posts: 144
Joined: 20 Oct 2018 12:52

Re: PRE router flag, what is the E?

Post by lgillis »

The sparse information about "Router Caps" can be found by the user of I2Pd on the I2Pd web console usually under the address http://127.0.0.1:7070/, hidden under the flap "Hidden content. Press on text to see". The meaning of the letters was defined in "i2pd/libi2pd/RouterInfo.h", here an excerpt:

Code: Select all

  const char CAPS_FLAG_FLOODFILL = 'f';
  const char CAPS_FLAG_HIDDEN = 'H';
  const char CAPS_FLAG_REACHABLE = 'R';
  const char CAPS_FLAG_UNREACHABLE = 'U';
  /* bandwidth flags */
  const char CAPS_FLAG_LOW_BANDWIDTH1   = 'K'; /*   < 12 KBps */
  const char CAPS_FLAG_LOW_BANDWIDTH2   = 'L'; /*  12-48 KBps */
  const char CAPS_FLAG_HIGH_BANDWIDTH1  = 'M'; /*  48-64 KBps */
  const char CAPS_FLAG_HIGH_BANDWIDTH2  = 'N'; /*  64-128 KBps */
  const char CAPS_FLAG_HIGH_BANDWIDTH3  = 'O'; /* 128-256 KBps */
  const char CAPS_FLAG_EXTRA_BANDWIDTH1 = 'P'; /* 256-2000 KBps */
  const char CAPS_FLAG_EXTRA_BANDWIDTH2 = 'X'; /*   > 2000 KBps */
  // congesion flags
  const char CAPS_FLAG_MEDIUM_CONGESTION = 'D';
  const char CAPS_FLAG_HIGH_CONGESTION = 'E';
  const char CAPS_FLAG_REJECT_ALL_CONGESTION = 'G';

  const char CAPS_FLAG_V4 = '4';
  const char CAPS_FLAG_V6 = '6';
  const char CAPS_FLAG_SSU2_TESTING = 'B';
  const char CAPS_FLAG_SSU2_INTRODUCER = 'C';
Spring https://www.youtube.com/playlist?list=PLF-q-IGQQb1uK7fYuaQiRpcORDSmfsY2n
supperman
Posts: 8
Joined: 22 Mar 2023 16:42

Re: PRE router flag, what is the E?

Post by supperman »

Thanks, just what I was looking for. Anything I should do to prevent congestion?
User avatar
lgillis
Posts: 144
Joined: 20 Oct 2018 12:52

Re: PRE router flag, what is the E?

Post by lgillis »

Actually, such a router should regulate itself, i.e. remember in which situation the overload occurs and take appropriate measures to avoid future overloads. This function at least shows that the router will not accept any new connections until the next check in 15 (?) minutes.

The issue of congestion is not described in the documentation. As it looks, it is a feature that was added only in March. So you would have to figure out the necessary info from the source code.

I can only tell you what I would try if it bothered me. The number of "transittunnels" seems to be very high for my network card, I would reduce it to a tolerable number in a serious step. Just try it and then get back to me with your experiences.
Spring https://www.youtube.com/playlist?list=PLF-q-IGQQb1uK7fYuaQiRpcORDSmfsY2n
kelare
Posts: 2
Joined: 14 Apr 2023 20:52

Re: PRE router flag, what is the E?

Post by kelare »

I might be wrong but I believe I2Pd just sets the E flag when the max_tunnels parameter in the config is reached. I believe its just for other routers to know that this router likely won't accept new connections, no?
supperman
Posts: 8
Joined: 22 Mar 2023 16:42

Re: PRE router flag, what is the E?

Post by supperman »

The E showed up around 3200 participants and lowering, then slowly picking back up(this is with default 5000). So I think it is what lgillis described. I'm going to set the participants lower than when I saw the E by 500 or so. Curiously, I've gotten 4000 KBps transit when I tested running as an X router, so maybe it's butting heads with connections, but not bandwidth.
supperman
Posts: 8
Joined: 22 Mar 2023 16:42

Re: PRE router flag, what is the E?

Post by supperman »

I lowered the transit tunnels to 3000 and its PRE again with all 3000 used. I don't have any issues with using it, and it's hitting my bandwidth share limit, so I think it's good unless you want me to test something else.
User avatar
lgillis
Posts: 144
Joined: 20 Oct 2018 12:52

Re: PRE router flag, what is the E?

Post by lgillis »

As far as I can see, the built-in limiter works relatively simply. When the set limit of transit tunnels is reached, the router does not accept any further connections. The same applies as soon as the released bandwidth is exhausted. If and how this is related to the "E" is as already said in the source code.

If your router is now running smoothly, we should give the development a little more time to work out and describe the function.
Spring https://www.youtube.com/playlist?list=PLF-q-IGQQb1uK7fYuaQiRpcORDSmfsY2n
Post Reply