Skip to main content [ Removed by moderator ] : r/rust

[ Removed by moderator ]

Sorry, this post has been removed by the moderators of r/rust.

Learn by doing - Cloud, Kubernetes, Python, and more. Get your teams up to speed faster with interactive labs and sandboxes to gain hands-on experience. No environment to set up, no software to install.
  • O'Reilly builds AI-ready teams
  • O'Reilly builds AI-ready teams
  • O'Reilly builds AI-ready teams
  • O'Reilly builds AI-ready teams
  • O'Reilly builds AI-ready teams
  • O'Reilly builds AI-ready teams

  • And when you move to IPv6 and only get ::1?

    50

    Generate a random ULA prefix and assign it to lo. It'd be nicer if they had a allocated fixed block for this, but this works too.

    /etc/systemd/network/lo.network:

    [Match]
    Name=lo
    
    [Address]
    Address=fd<YOUR PREFIX HERE>::/48
    Scope=host
    AddPrefixRoute=false
    
    [Route]
    Destination=fd<YOUR PREFIX HERE>::/48
    Scope=host
    Table=local
    Type=local
    $ ping fda9:c604:724::3
    PING fda9:c604:724::3 (fda9:c604:724::3) 56 data bytes
    64 bytes from fda9:c604:724::3: icmp_seq=1 ttl=64 time=0.031 ms
    
    $ ping fda9:c604:724::9001
    PING fda9:c604:724::9001 (fda9:c604:724::9001) 56 data bytes
    64 bytes from fda9:c604:724::9001: icmp_seq=1 ttl=64 time=0.036 ms

    Also, ipv4 loopback will be with us for a while, it's probably the last v4 feature to die since it'll never suffer from NAT.

    16

    this is brilliant. but I can see browsers are gonna complain about this

    2
    Continue this thread
    Continue this thread

    IPv6-mapped IPv4?

    10

    Fun Fact: If you prefix ::fff to the start of a IPv4 address, it is a valid IPv6 address. That whole block is "reserved for private Internets". Permitting organizations can do cursed backward compatibility stuff on their NATs/WANs for legacy hardware. Effectively making IPv4 a subset of IPv6. That block is 280 addresses, but only 248 are 'well formed' IPv4 addresses.

    There are so much room for activities, there is a duplication of this within 2002::/16. Which is basically that, but externally route-able IPv6 to IPv4 mapping.

    Additionally the whole fc00::/7 of 2121 addresses is "reserved for local networks" (basically the new 10.0.0.0/8).

    fe80::/64 to fe80::/10 a block of 264 is reserved for link local addresses (the new 169.254.0.0/16 block)

    4

    yeah that's the limitation. It downgrades them to ipv4 `127.x.x.x`, so the bind will succeed but you lose ipv6 :\

    1
    Continue this thread

    I feel like there should have been something inbetween IPv4's 16million loopback addresses, and IPv6's 1.

    256 maybe?

    24

    ipv5 was supposed to have that /j

    19

    IPv6 has ULA addresses, which are in the [fc::0]/7 range, and also link-local addresses from the range fe80:: (forgot the netmask, but similarly large). You can add these to your localhost interface as you desire and in the case of ULA addresses you can even use them todo cool stuff like giving containers a sable IPv6 address on changing network conditions like a laptop with WiFi moving between networks.

    Kubernetes CNIs also use it extensively, albeit they should probably stop defaulting to do NAT since servers usually have dedicated IPv6 ranges like a /56. But alas, some cloud providers only give you a /64, a /112 (digital ocean I think) or even a /128 (oracle cloud, but can't complain since I'm on the free plan). So there are definitely upsides of this since it works on more networks but also kinda sucks because it is an artificial limitation and goes against what IPv6 tries to do.

    3
    Continue this thread

    Before AI crazy ideas were limited by the lack of skills of the engineer concocting such monstrosities. Now such barrier has been lifted and it feels like being at a zoo made of frankestein'd CS projects.

    "Your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should."

    Love this, please keep on being crazy!!!

    185

    Barrier to entry is a good thing. Now instead we have daily posts about a new impressive project, until you look inside and everything is actually impressive or new in the project is "TODO". Being forced to acquire skills to implement crazy ideas is a good thing actually.

    92
    [deleted]

    Comment deleted by user

    indeed it is. From Jurassic Park, if I am not mistaken!

    2
    Continue this thread
    The only notes app with a knowledge graph AND executable Python notebooks.

    Just wait until you hear about 0.0.0.0/8

    25

    don't give me more cursed ideas

    8
    Continue this thread

    Docker networks would have been less work, but hey still cool

    7

    disgustang!

    5

    More of this. God so many devs today don’t even understand basic networking. Every time I worry about the future because AI coding has become the new script kiddy, someone comes along and gives me hope for the future.

    Good job man.

    11

    What do you do in the rare case you have a collision?

    7

    U hope and pray

    9

    Thanks, I'm tripling my consulting rate starting tomorrow.

    7
    Continue this thread

    you hope and pray 😂 joking you'll just get errors and should override manually with --ip flag. I wanted this thing to be stateless so no collision detection is built in

    6
    Continue this thread
    Metal 3D Printing Service – Fast,Precise,Affordable.

    I'm doing this just editing /etc/hosts using a tiny she'll script

    2

    She'll script, but will she engineer?

    6
    Continue this thread

    Clever

    1

    I'd much rather address this problem the same kinda way that I would in production. Reverse proxy and DNS automated by CICD at its most basic, or, you know, containerized with docker or k8s.

    Hooking into syscalls gets you into all kinds of trouble eventually.

    1

    I feel you and there are things that are inherently unsolvable with this approach, but we always have containers to the rescue

    1
    Continue this thread
    Continue this thread

    Network engineers hate this one trick!

    Why not just use 10/8 it’s also big? And of course, you can also just NAT any unused IP space you want. Hell, I could find a /8 dedicated to Africa or something and just start using that internally and NAT it outbound to my public IP. I never communicate with those IPs anyway so it won’t matter. Though, consider the extent at which you went, I’m sure you know all of this.

    1

    Fucking crazy man, loved this

    1