OpenComputers II

OpenComputers II

27.1k Downloads

Enable IPv6 (this allows to auto setup computer networks)

lucsoft opened this issue ยท 15 comments

commented

ipv6 brings SLAAC with this computers could auto setup there network. this would be nice to be a default option too

commented

Unfortunately Linux does not let you disable IPv4 at build time or at runtime without also disabling the entire TCP/IP stack. IPv4 IS the TCP/IP config option and it is a dependency of IPv6. On Linux it's either both, just v4, or neither :/. I very much wish that wasn't the case as I have no use for IPv4 on my personal systems but alas it is.

commented

Hey, I'm not sure what was happening when this was last tried but I enabled IPv6 in my kernel, then disabled SIT, as it's enabled by default and built it just fine, dropped the kernel into the jar and it works great. I did have to snatch an IPv6 enabled build of busybox but I'm not sure what issues were being hit with this before, it worked painlessly for me. Is it possible this could be looked into more?

commented

What are the effects on disk and RAM use? I.e. how does remaining free space on the root fs and free RAM right after boot change?

commented

Available memory without IPv6 is 13084K
Available disk space without IPv6 is 2.4M
Available memory with IPv6 is 12960K
Available disk space with IPv6 is still 2.4M, the difference must be less than 0.1M

The changes I made to the build were to enable IPv6 in the kernel, disable SIT in the kernel, enable IPv6 in busybox, and then set busybox NOT to prefer IPv4 for DNS.

commented

That sounds great! Will have another at this, then :)

commented

@asdfjkluiop is this without disabling ipv4? becuase when we have ipv6 we don't need ipv4 anymore

commented

I'm 99% certain this would blow up the rootfs by several MB, but give it a shot and let me know how it goes!

  • Grab https://github.com/fnuecke/buildroot (on Linux)
  • run make linux-menuconfig
  • enable ipv6
  • save and exit
  • run make
  • expect it failing at the very end complaining it cant copy something into the rootfs image
commented

I've just tried this and can confirm that it fails because the rootfs is too small!

An alternative might be to maintain IPv4 but include udhcpd in the busybox binary to allow players to set up their own DHCP servers.

commented

you mean to big right? when yes its okay it was just a dream but yea if its to big thats not good
https://github.com/lucsoft/oc2-scripts/tree/main/network
Setting up dhcp is not that hard its only some lines

commented

Yes, sorry, depending on how you look at it, the preset size for the rootfs is too small, or the resulting rootfs after building is too big.

commented

did you try replacing ipv4 with ipv6 @rschulman

commented

No, I left IPv4 in. I can try it without.

commented

FYI, the current configuration includes dnsmasq, which can also serve as a DHCP server.

commented

I don't know buildroot that well, but I honestly can't find any way to disable IPv4 but keep TCP/IP and IPv6...

commented

Yeah, I agree. Looks to me like that's not possible (IPv6 without IPv4).
I think adding some setup scripts to facilitate setting up networking (including setting up a DHCP server) will be a reasonable solution.
So yeah. No IPv6.