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

Instructions compiling on raspberry #158

Closed
Namsep opened this issue Jun 24, 2015 · 15 comments
Closed

Instructions compiling on raspberry #158

Namsep opened this issue Jun 24, 2015 · 15 comments

Comments

@Namsep
Copy link

Namsep commented Jun 24, 2015

Not realy an issue but more of a feature request, instructions for installing NAT64/DNS64 on a raspberry pi. Currently trying to get it running with debian wheezy no errors but it's not working either.

I think there are issues with the kernel headers which on a raspberry can be somewhat different.

Would love to see a simple solution (read SD card image) to have a home NAT64/DNS64 so that IPv6 only be tested.

/edit
I have no idea if there is any intereset for this type of setup. I do have some installation instructions that i can share though.

@ydahhrk
Copy link
Member

ydahhrk commented Jun 25, 2015

Sorry for the lack of responses so far. I'm currently trying to hook up Raspbian on an emulator so I can debug it.

@ydahhrk
Copy link
Member

ydahhrk commented Jul 2, 2015

I'm really sorry it took so freaking long; I did it.

I'm thinking what happened is you compiled your own headers using rpi-source or by yourself. From what I can tell, this stopped working at some point. The headers it spew for me are different from the actual running kernel, as you saw.

But it turns out there's another way: http://stackoverflow.com/a/22882969

I would advice not doing this in an emulator first. I used to think I didn't have acces to a Pi, so I tried hooking up QEMU, but all that did was slow me down three days. As soon as I flashed Raspbian into an actual Raspberry Pi, I stopped getting errors in every step.

Just to be clear, this is what I did:

(1) Boot up Raspbian on a pi.

(2) View my installed kernels:

$ ls /lib/modules
3.18.11+/   3.18.11-v7+/

None of them have headers:

$ cd /lib/modules/3.18.11+/build
-bash: cd: /lib/modules/3.18.11+/build: No such file or directory
$ cd /lib/modules/3.18.11-v7+/build
-bash: cd: /lib/modules/3.18.11-v7+/build: No such file or directory

None of them seem to have downloadable headers either:

$ apt-cache search linux-headers-3.18.11+
$ apt-cache search linux-headers-3.18.11-v7+

But there are others that do:

$ apt-cache search linux-headers
linux-headers-3.10-3-all - All header files for Linux 3.10 (meta-package)
linux-headers-3.10-3-all-armhf - All header files for Linux 3.10 (meta-package)
linux-headers-3.10-3-common - Common header files for Linux 3.10-3
...
linux-headers-rpi-rpfv - This metapackage will pull in the headers for the raspbian kernel for the
linux-headers-rpi2-rpfv - This metapackage will pull in the headers for the raspbian kernel for the

rpfv seems to be a convenient default recommended so we don't have to decide (not really sure what it's all about. It works, though). Note, I'm using the one for Raspberry Pi 1, because that's what I have:

$ # This installs the kernel (image), then also its headers.
$ sudo apt-get install linux-image-rpi-rpfv linux-headers-rpi-rpfv

That ends in an error, but installs kernel 3.18.0-trunk-rpi anyway (which seems like a good choice, given it's pretty close to the one I already have):

$ ls /lib/modules
3.18.0-trunk-rpi    3.18.11+/   3.18.11-v7+/

(3) Tell the Pi I want to boot from that kernel. Add this to /boot/config.txt:

    # Parameters to boot on raspbian kernel (linux-image-rpi-rpfv package)
    kernel=vmlinuz-3.18.0-trunk-rpi
    initramfs initrd.img-3.18.0-trunk-rpi followkernel

(4) Reboot (sudo shutdown -r now).
(5) Install Jool:

$ wget https://www.jool.mx/download/Jool-3.3.2.zip
$ unzip Jool-3.3.2.zip
$ cd Jool-3.3.2/mod
$ make
$ sudo make modules_install # This also complains some; no effects
$ sudo depmod

(6) Configure the network, modprobe Jool, ping.
(7) Profit.

Does it work?

Still thinking about the simple SD image card solution.

@Namsep
Copy link
Author

Namsep commented Jul 2, 2015

Still working on it, kinda stuck at step 6.

I think a basic working SD image for a raspberry would be great and from that when required a simple instruction to update to newer version if required. It would make it possible for people to buy just an SD card and fire-up a IPv6 only setup when needed. With regards to distribution, i think that parties like RIPE could helpout.

@ydahhrk
Copy link
Member

ydahhrk commented Jul 2, 2015

Still working on it, kinda stuck at step 6.

Any specifics why?
V would be your IPv4 gateway.
A would be one of your home computers.

The tutorial doesn't deal with DNS, but that can be added as an afterthought, preferably after the pings work.

If you want, we can also discuss via mail.

@Namsep
Copy link
Author

Namsep commented Jul 2, 2015

I just made some progress.

The https://www.jool.mx/mod-run-alternate.html does not talk about routes like as the https://www.jool.mx/mod-run-stateful.html does and Fedora22 was giving me a hard time with the network manager, so that is disabled now. Using the raspberry as default gateway works but gives issues with native IPv6 > not pingable anymore.

Therefore i reverted to my default gateway and made a specific route.
sudo ip -6 route add 64:ff9b::/96 via 2001:db8::1 dev p37p1

Now native IPv6 works (pingable) and translated IPv4 (ping6 64:ff9b::8.8.8.8)

I have writen a manual on this, not completed as i now will look into DNS64 and it's heavely subject to changes.

Another open issue is that the actions with ethtool are not clear, are they needed in the raspberry as home IPv6 only setup or not. If so, then i will put into the manual to install this tool and figure out how to get the commands working as they did not with mine.

@ydahhrk
Copy link
Member

ydahhrk commented Jul 2, 2015

The https://www.jool.mx/mod-run-alternate.html does not talk about routes like as the https://www.jool.mx/mod-run-stateful.html does

Oh yeah; it's because it really assumes no routing. (There are no gateways in the diagram.) I figured people would visit the stateful tutorial first, and then scale the alternate setup as needed.

Thanks for the feedback. I guess I can clarify the routing or link to your document :)

Another open issue is that the actions with ethtool are not clear, are they needed in the raspberry as home IPv6 only setup or not.

AFAIK, it depends on the NIC's features/bugs. Most of the time I find they are not needed, but because I can't predict this, I just ask they are always used.

This is the reasoning, in case you're interested and missed it: https://nicmx.github.io/jool-doc/en/offloads.html

@Namsep
Copy link
Author

Namsep commented Jul 3, 2015

I got it up and running, funny bit was that for me to check if it was working i was looking at my Google Chrome IPv6Foo indicator, showing IPv4. Some more testing showed :) that the indicator was wrong and shows 64:ff9b:: as IPv4 addresses.

I will double check my documentation and do a complete reinstall and if it all works i will send it over.

@Namsep
Copy link
Author

Namsep commented Jul 8, 2015

Very sorry to tell that due to lack of time testing and documenting have not been done yet. I do have published the draft.

http://namsep.blogspot.nl/2015/07/raspberry-pi-debian-nat64-dns64-joolmx.html

It's basically your instructions from above, with some info from jool.mx and some things that I came accros. It's adding information on step 6 and 7 and more.

@ydahhrk
Copy link
Member

ydahhrk commented Jul 8, 2015

Thanks!

Don't worry; you don't need to rush it.

@ydahhrk
Copy link
Member

ydahhrk commented Jul 30, 2015

Sorry for taking so long.

We do intend to provide an easy image solution for Raspberry, but we'd rather wait until #140 is done so we don't have to do it twice (because Jool 4 is expected to have a different, hopefully easier, installation procedure).

Adding to milestone 4.0.0.

@ydahhrk ydahhrk added this to the 4.0.0 milestone Jul 30, 2015
@ydahhrk ydahhrk added the Depends on #140 Cannot fix until issue #140 is addressed label Sep 18, 2015
@ydahhrk ydahhrk removed this from the 4.0.0 milestone Jan 9, 2019
@ydahhrk ydahhrk added the Status: Not Started Progress is 0% label Aug 28, 2019
@ydahhrk ydahhrk removed the Depends on #140 Cannot fix until issue #140 is addressed label Feb 18, 2021
@ydahhrk
Copy link
Member

ydahhrk commented Feb 18, 2021

Well,

I think it's time to accept that I don't have the time or resources to work on a Raspberry image. Raspberry is one of several supported distributions, and the effort required to maintain a dedicated SD card is disproportionate to that.

On the other hand, there was a bit of relevant work that went unmentioned in this thread: In early 2020, the process of installing Jool in Raspberry was tested and proved to be simpler (ie. identical to Debian's) than when this bug was originally reported. A big part of the reason is that the headers quirk turned out to be a bug, and they fixed it.

That settled, since the requirement "Instructions compiling on raspberry" is already addressed by the documentation, it seems this feature request has reached a conclusion.

(Also, once #273 is complete, Jool should ship in all distributions by default (on account of being part of Linux's official NAT/firewall), and this includes Raspberry. No dedicated image needed.)

I will therefore close this issue.

@ydahhrk ydahhrk closed this as completed Feb 18, 2021
@ydahhrk ydahhrk removed the Status: Not Started Progress is 0% label Feb 18, 2021
@cooperlees
Copy link
Contributor

FWIW I have jool working vía Ubuntu packages on a Pi 4 - didn’t build myself from source tho.

@ydahhrk
Copy link
Member

ydahhrk commented Feb 22, 2021

FWIW I have jool working vía Ubuntu packages on a Pi 4 - didn’t build myself from source tho.

Interesting. Are you using the Focal Fossa (20.04) or the Groovy Gorilla (20.10) Jool? Are you using SIIT?

Groovy Gorilla has Jool 4.1.2, whose SIIT is known to be busted. (Because of #338.) Did you have to deal with this? And if so, how?

I'm asking because I need to decide what to do about it. I understand that pushing new versions upstream is an arduous process, and I'm wondering if there are other solutions.

@cooperlees
Copy link
Contributor

Stateful NAT64 on Ubuntu 20.04: https://cooperlees.com/2020/12/nat64-using-jool-on-ubuntu-20-04/

@ydahhrk
Copy link
Member

ydahhrk commented Feb 22, 2021

Ah, ok. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants