-
Notifications
You must be signed in to change notification settings - Fork 15
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
initial UTD baseline commit #3
Open
zub74
wants to merge
1
commit into
TexasInstruments:release
Choose a base branch
from
AChannui:feature-external-dhcp-server
base: release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Requirements | ||
1. Docker Engine | ||
2. Docker Compose | ||
|
||
# How to Run DNSMasq as a DHCPv6 Server | ||
0. Navigate to this folder | ||
1. Build the docker image with `docker compose build` | ||
2. Make sure wfantund is running and the interface and stack are up. | ||
3. Start the container with `docker compose run --rm dnsmasq` | ||
- This will start the server with a sane default configuration; it will listen on interface wfan0 and give addresses out between 2020:abcd::1,2020:abcd::ffff. | ||
4. If you want to run with a non-standard configuration, pass your command line options in as desired. This will overwrite the default interface and address range. | ||
- Start the container with `docker compose run --rm dnsmasq -i wfan1 --dhcp-range 2020:abcd::1,2020:abcd::10,64,336h` to only give out 10 different addresses on interface wfan1, for example | ||
- Refer to https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html for more options related to dhcp-range if needed | ||
|
||
|
||
# How to figure out which device has a given IPv6 lease | ||
1. Since IPv6 addresses given out by Dnsmasq are not based on MAC address, it can be hard to tell just by looking at the IPv6 address which device it refers to. To do so, simply take a look at `/var/lib/misc/dnsmasq.leases` on the DHCPv6 Server to view the leases given to a given DUID. Find the IP address you're curious about, and then refer to the DUID. The DUID is based on the link local address, so the last 48 bits (check this caden) refer to the last 48 bits of the devices MAC address! https://datatracker.ietf.org/doc/html/rfc8415#section-11.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This could be a lighter image, but for development use ubuntu 22.04 | ||
FROM ubuntu:22.04 | ||
# Install some utilities | ||
RUN sudo apt update && sudo apt install -y nano iproute2 curl systemctl | ||
# Install dnsmasq | ||
RUN sudo apt update && sudo apt install -y dnsmasq=2.86-1.1 | ||
# Start dnsmasq and don't use dns, only DHCP | ||
ENTRYPOINT ["dnsmasq", "-d", "-C", "/dev/null", "-p", "0"] | ||
# By default assume interface is wfan0 and assign any address from subnet::1 to subnet::ffff | ||
CMD ["-i", "wfan0", "--dhcp-range", "2020:abcd::1,2020:abcd::ffff,64,336h"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
dnsmasq: | ||
build: ./dnsmasq | ||
privileged: true | ||
environment: | ||
- TERM=xterm-256color | ||
volumes: | ||
- ./test_packets:/test_packets | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This volume isn't required, but if you want to pass persistent data back and forth between dnsmasq for debugging you can |
||
network_mode: host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I haven't tested this specific image as we can't use Docker Hub images directly at TI, but this should work.