Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink and overhaul Local IPv4 and IPv6 display #10

Open
1 of 3 tasks
olmari opened this issue May 26, 2019 · 7 comments
Open
1 of 3 tasks

Rethink and overhaul Local IPv4 and IPv6 display #10

olmari opened this issue May 26, 2019 · 7 comments
Assignees

Comments

@olmari
Copy link

olmari commented May 26, 2019

We need to determine what we exactly mean by "local" in local IP-addresses, as even mine laptop has 2 "local" IPv4-addresses, one for wireless and one from virtual-machine host adapter.

With IPv6-addresses there can easily be 3-6 per adapter, link-local fe80:, local routable fd:, one gotten from DHCPv6 (statefull), one gotten from router-advertisment (stateless), and one from router-advertisment but randomly created... Not every address is allways there depending from configuration and avaibility, but even minimally there is usually 3 addresses, all considered "local"... and multiply by number of adapters you get quite an list quite fast...

So:

  • Determine what we actually wanna show/signal with "local" IP numbers, especially IPv6, and
  • Implement proper display for those then.
  • Make as fast as possible (and add timeout) to minimize terminal load-up time.
@olmari
Copy link
Author

olmari commented May 26, 2019

With IPv4 One option would be indeed to try figuring out an way to look up the IP-address that belongs to adapter and/or subnet that has default route pointing in it, but that doesn't make other possible IP-numbers not any less "local" nor unusable.

With IPv6 it is then even more "impossible" determination as every adapter can get trough its own "fe80:/0", and all variations of stateless and stateful are also equally usable, thus there is even less clear idea what we want to display as "local"

@andresgongora
Copy link
Owner

Feedback: for whatever reason the new version after the last update to develop, feels much faster

@andresgongora
Copy link
Owner

I found this snippet curl -sSL http://ipecho.net/plain | xargs echo

@andresgongora
Copy link
Owner

andresgongora commented Jun 6, 2019

Determine what we actually wanna show/signal with "local" IP numbers, especially IPv6
How about we make it configurable to choose:

  1. First and last IPv6 segments in the local and external IP fields External IP 56.123.23.41, 45ef:::9f8a

  2. Print IPv6 in a separate line below the log, that way we have all the width of the terminal.

  3. Add a separate entry next to the logo for IPv6 local and external only, but only display part of it (imagine you have several machines on a big network, usually you, as a sysadmin, can identify them with only part of the IP, that that's more than enough). This will be easier once Separate logo drawing and status-lines drawing synth-shell#52 is in place.

@olmari
Copy link
Author

olmari commented Jun 6, 2019

Well... cutting half away fom ipv6 is same as not showing it at all... Also external ipv6 is easy in itself, there is ever only one reported at one time.. "only" local is the thing that is a mess...

I'm not against having all those and even more as an option, but from these option 2 is.at least.most sane default :)

Also for point 3, sure we could show only latter part of ipv6, but again we don't know how much.. we could try to calculate suffix length from reported subnet length but even that doesn't always tell dies upstream router have bigger subnet and thus part of wanted portion.. so not easy to figure out that at least behalf of anyone...

@andresgongora
Copy link
Owner

I agree, option 2 should be default

@andresgongora
Copy link
Owner

Look at this screenshot from @fikoborizqy . As soon as you have more than one IP, it becomes very ugly

@andresgongora andresgongora transferred this issue from andresgongora/synth-shell Apr 13, 2020
@andresgongora andresgongora removed their assignment Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants