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

dist/tools/{ethos,zep_dispatch,dose,sliptty,usb-cdc-ecm}: allow setting host ip #20192

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mguetschow
Copy link
Contributor

@mguetschow mguetschow commented Dec 19, 2023

Contribution description

This adds an optional cmd option to start_network.sh for both ethos and zep_dispatch which allows to set the IP address automatically added on the host device (usually the development PC) when creating the tap interface. Additionally, the host address set now defaults to the same fd00:dead:beef::1.

examples/gnrc_border_router is adapted to showcase the usage.

Testing procedure

  1. make -C examples/gnrc_border_router all term and ip a l tap0 in a separate shell to see the (new) default host address fd00:dead:beef::1.
  2. same commands with IPV6_HOST_ADDR=2001:db8:1::1 to see the given host ip address is used. ping 2001:db8:1::1 in the RIOT shell to see it is reachable.
  3. same commands with an actual board (tested with BOARD=nrf52840dk) to test ethos.

Issues/PRs references

This has been discussed with @miri64 previously.

@github-actions github-actions bot added Area: tools Area: Supplementary tools Area: examples Area: Example Applications labels Dec 19, 2023
@mguetschow mguetschow marked this pull request as draft December 19, 2023 11:22
@mguetschow
Copy link
Contributor Author

Revisiting the README of the gnrc_border_router example, it turns out a ULA address is already automatically added by the respective scripts, although not the same one. I will have a look again and probably change the PR to make those addresses consistent per default and configurable.

@github-actions github-actions bot added the Area: doc Area: Documentation label Dec 21, 2023
@mguetschow mguetschow marked this pull request as ready for review December 21, 2023 14:55
@mguetschow
Copy link
Contributor Author

I've changed the PR to allow setting the host IP address consistently for ethos and zep_dispatch. Now ready for review.

@benpicco benpicco requested a review from miri64 December 21, 2023 22:47
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But maybe the other integrations could benefit from this treatment as well:

  • dist/tools/dose/start_network.sh
  • dist/tools/sliptty/start_network.sh
  • dist/tools/usb-cdc-ecm/start_network.sh

@mguetschow
Copy link
Contributor Author

But maybe the other integrations could benefit from this treatment as well:

Added similar changes to the other integrations now. Successfully tested sliptty with examples/gnrc_border_router, but couldn't find information on how to test the others. Maybe someone could give me a hint?

@mguetschow mguetschow changed the title dist/tools/{ethos,zep_dispatch}: allow setting host ip dist/tools/{ethos,zep_dispatch,dose,sliptty,usb-cdc-ecm}: allow setting host ip Jan 25, 2024
@mguetschow
Copy link
Contributor Author

Now this has been updated to support all five integrations, and I've successfully tested ethos, zep_dispatch, sliptty and usb-cdc-ecm with the gnrc_border_router example.

@mguetschow mguetschow requested review from benpicco and miri64 and removed request for miri64 May 16, 2024 11:42
For both `ethos` and `zep_dispatch`, this adds an optional cmd option to `start_network.sh` which allows to automatically set an IP address for the host device (usually the development PC) when creating the tap interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: examples Area: Example Applications Area: tools Area: Supplementary tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants