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

doc: net: Update NAT options for Internet connectivity #69451

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Feb 26, 2024

The host NAT options for QEMU/native_sim Internet connectivity needs updating.

The host NAT options for QEMU/native_sim Internet connectivity
needs updating.

Signed-off-by: Jukka Rissanen <[email protected]>
@fabiobaltieri fabiobaltieri merged commit 4323bfe into zephyrproject-rtos:main Feb 28, 2024
19 checks passed
@jukkar jukkar deleted the devel/fix-qemu-to-internet-instructions branch February 29, 2024 08:08
@sense-Jo
Copy link

sense-Jo commented Mar 7, 2024

Hi @jukkar, thank you for this PR, which helped me to get a working internet connection in Qemu!
However, there was one thing I had to change: At least on my system, after following the guide on Networking with QEMU, the name of the network interface isn't zeth, but tap0.
Isn't the interface only named zeth when using the net-setup.sh script, while with the ./loop-socat.sh and ./loop-slip-tap.sh, which the guide for Qemu advises to use, the interface would usually be named tap0?

@jukkar
Copy link
Member Author

jukkar commented Mar 8, 2024

Isn't the interface only named zeth when using the net-setup.sh script, while with the ./loop-socat.sh and ./loop-slip-tap.sh, which the guide for Qemu advises to use, the interface would usually be named tap0?

Hi @sense-Jo, there are two guides for setting up qemu, one is with tap0 https://docs.zephyrproject.org/latest/connectivity/networking/qemu_setup.html#networking-with-qemu and the other is with zeth https://docs.zephyrproject.org/latest/connectivity/networking/qemu_eth_setup.html#networking-with-eth-qemu
So both zeth or tap0 are valid interfaces. We try to guide people to use zeth instead, as it is somewhat easier to setup in the host side.

@sense-Jo
Copy link

sense-Jo commented Mar 8, 2024

@jukkar I can see that there are multiple options of connecting a Zehpyr (Qemu) application to a network.
I just now understood that NAT/masquerading is required for both Qemu networking options, and apparently required as well when using the native_* targets.
Thus I wonder if it would make sense to move the instructions on NAT/masquerading to a separate page, maybe under Networking and titled something like "Internet access from hosted applications"?

@jukkar
Copy link
Member Author

jukkar commented Mar 8, 2024

Thus I wonder if it would make sense to move the instructions on NAT/masquerading to a separate page, maybe under Networking and titled something like "Internet access from hosted applications"

Could you propose a PR for that, we can then review and see what it looks like.

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

Successfully merging this pull request may close these issues.

6 participants