-
Notifications
You must be signed in to change notification settings - Fork 129
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
networking: Document how to customize NIC names #146
Conversation
Should this be under the "network.adoc" page? |
6537d79
to
5859906
Compare
5859906
to
8b30dd9
Compare
mode: 0644 | ||
contents: | ||
inline: | | ||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="12:34:56:78:9a:bc", ATTR{type}=="1", NAME="infra"' |
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.
off topic: is ATTR{type}=="1"
a way to match based on the type of networking interface?
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.
😮
I believe it is. This would help a lot with supporting custom names in networking devices in console-login-helper-messages!
7e68ca2
to
684a69c
Compare
---- | ||
|
||
== Networking in the Initramfs via Kernel Arguments | ||
If networking in the initramfs is required, the Dracut argument `ifname=` dynamically creates a udev rule to change the name of a NIC. |
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.
It feels like we might need to give the user some more background information. Maybe something like:
If networking in the initramfs is required, the Dracut argument `ifname=` dynamically creates a udev rule to change the name of a NIC. | |
If networking in the initramfs is required, the kernel argument `ifname=` will dynamically create a udev rule to change the name of a NIC in the initramfs. If the custom name needs to be applied to the real root then a systemd .link file or udev rule, as discussed earlier on this page, will need to get created via Ignition. See [this issue](https://github.com/coreos/fedora-coreos-tracker/issues/553) for more details. |
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.
ahh. I see this information is in the last paragraph. Maye we can add some of this down there and add a link to the issue down there so people can get more context on why they need to do both.
684a69c
to
6aff023
Compare
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.
LGTM one final suggestion.
Thanks @kelvinfan001
|
||
Currently, unlike other parts of the networking config from the initramfs (e.g. static IPs, hostnames, etc.), these udev rules are not persisted into the real root. If the custom name needs to be applied to the real root, either a link file or udev rule must be created, as shown above. See xref:https://github.com/coreos/fedora-coreos-tracker/issues/553[this issue] for more details. | ||
|
||
For example, to name NIC with the MAC `12:34:56:78:9a:bc` to "infra", provide the argument `ifname=infra:12:34:56:78:9a:bc`. A udev rule like the following would be created in the initramfs: |
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.
For example, to name NIC with the MAC `12:34:56:78:9a:bc` to "infra", provide the argument `ifname=infra:12:34:56:78:9a:bc`. A udev rule like the following would be created in the initramfs: | |
For example, to give the NIC with the MAC `12:34:56:78:9a:bc` a name of "infra", provide a `ifname=infra:12:34:56:78:9a:bc` kernel argument. A udev rule would be created in the initramfs like: |
6aff023
to
7d039c6
Compare
Document how to customize NIC names using link files, udev rules, and kernel arguments.