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

tapsetup: add more features #14928

Merged
merged 6 commits into from
Sep 8, 2020
Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Sep 2, 2020

Contribution description

This is a first step towards fixing by adding new functionalities to the tapsetup script (which I plan to use late for the common approach or at least some parts of it):

  • add capability to list the bridge and all interfaces that belong to it (hopefully to replace the various get_bridge python implementation throughout the tests)
  • add capability to activates forwarding on the bridge
  • add capability to add addresses to the bridge
  • add capability to add routes to the bridge

Testing procedure

I tested this on both Linux and FreeBSD (using the vagrant box provided at /dist/tools/vagrant/freebsd) but since the commands I used for FreeBSD are the same on OSX, it should also work there as well.

./dist/tools/tapsetup/tapsetup -c
./dist/tools/tapsetup/tapsetup -l tap0
./dist/tools/tapsetup/tapsetup -d

should list the bridge tap0 belongs to and its interfaces. If you use the name of the bridge, tapbr0 on Linux, bridge0 on FreeBSD, it should work as well.

./dist/tools/tapsetup/tapsetup -f

should create a bridge with forwarding enabled

./dist/tools/tapsetup/tapsetup -f -d

will revert that.

./dist/tools/tapsetup/tapsetup -a 2001:db8::1/48 -a fe80::1

should add the addresses 2001:db8::1/48 and fe80::1/128 to the bridge when it is created

./dist/tools/tapsetup/tapsetup -a 2001:db8::1/48 -a fe80::1 -d

should revert it.

./dist/tools/tapsetup/tapsetup -r 2001:db8::/48 fe80::2

should add a route to 2001:db8::/48 via fe80::2 and the bridge and

./dist/tools/tapsetup/tapsetup -r 2001:db8::/48 fe80::2 -d

should revert it again.

You may also try different combinations of the command.

Issues/PRs references

#14618

Distinguish bridge creation from tap creation.
@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Area: tools Area: Supplementary tools labels Sep 2, 2020
@miri64 miri64 requested a review from benpicco September 2, 2020 09:55
@benpicco benpicco added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Sep 3, 2020
@benpicco
Copy link
Contributor

benpicco commented Sep 8, 2020

Looks good and works as expected. I'm trusting your testing on FreeBSD.

Please squash.

@miri64
Copy link
Member Author

miri64 commented Sep 8, 2020

Squashed

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 8, 2020
@miri64 miri64 merged commit 9184339 into RIOT-OS:master Sep 8, 2020
@miri64 miri64 deleted the tools/enh/tapsetup-more branch September 8, 2020 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants