-
Notifications
You must be signed in to change notification settings - Fork 201
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
Support specifying a default route #2033
Conversation
New config option "ipv4_default_route", which sets a static default route. Support passing a CIDR as ip, e.g. ip = "192.168.1.2/24" the prefix defaults to 0 same as before. If ip mode is use dhcp, then get the default route from the DHCP config.
Need to set the prefix length of unspecified IP addresses to be 32 so that they don't appear to be in the same subnet as valid IPs
What about the default IPv6 route? |
IPv6 isn't completely analogous to IPv4 in this respect. In particular IPv6 includes router discovery natively in the protocol using router advertisement and router solicitation messages. It would be interesting to talk to someone using IPv6 to see what feature they actually want here. As someone who's not used IPv6 it's not obvious to me. |
While not an expert on it, I'm using IPv6 and use either static default route or router discovery depending on the situation. I don't think router discovery is very different from the DHCP-configured IPv4 routes, and just like DHCP it requires the routers to run specific application software (radvd, dnsmasq, etc.). For the device, router discovery is probably going to be fine in many situations, but does the firmware support it? If not, adding a static config option is probably easier, consistent with the v4 settings, and also applicable to situation where routers don't advertise. |
I tested this PR with dedicated subnet with port forwarding setuped for Kasli, and tried to access the coremgmt from outer network. On release-7 it works, on master and this PR - no. |
@thomasfire I've just commented some instructions to try and reproduce my test setup. I'm not sure what you mean by port forwarding that sounds a bit like you've mapped a specific port from a public IP to a private IP like static or reverse NAT. If so I think that's quite different from what's going on here although I don't know why that wouldn't work normally in NAT like scenarios the traffic appears to come from the local network. |
ARTIQ Pull Request
Description of Changes
Add support for setting the default route/gateway for core devices. If DHCP is enabled it uses the default route from the DHCP response if present. Or it can be set in the config file with the key "ipv4_default_route". Additionally the subnet mask can be specified by appending a prefix length to the ip address configuration in CIDR format.
Related Issue
Closes #1930
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
git commit --signoff
, see copyright).Code Changes
flake8
to check code style (follow PEP-8 style).flake8
has issues with parsing Migen/gateware code, ignore as necessary.Documentation Changes
cd doc/manual/; make html
) to ensure no errors.Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
). Format:Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.