Linux Network Interface Naming: Difference between revisions
From Leo's Notes
This page was last edited on 12 September 2019, at 05:48.
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux" |
m formatting |
||
| Line 2: | Line 2: | ||
== Edit udev Rules == | == Edit udev Rules == | ||
To renumber the interfaces, you can edit the udev rules at: | To renumber the interfaces, you can edit the udev rules at: | ||
{{highlight|lang=text|code= | |||
/etc/udev/rules.d/70-persistent-net.rules | |||
}} | |||
Remove lines defining the extraneous interfaces that you don't want. Once done, ensure that your network configs are correct ( | Remove lines defining the extraneous interfaces that you don't want. Once done, ensure that your network configs are correct (Red Hat based only) | ||
{{highlight|lang=text|code= | |||
# cd /etc/sysconfig/network-scripts/ | |||
# ls ifcfg* | |||
}} | |||
Ensure the scripts matches up to the interfaces you defined in the udev rules. Once completed, reboot the machine. | Ensure the scripts matches up to the interfaces you defined in the udev rules. Once completed, reboot the machine. | ||
Revision as of 05:48, 12 September 2019
Do you have network interfaces that no longer start at 0 (eg: eth0, em1, etc...)?
Edit udev Rules
To renumber the interfaces, you can edit the udev rules at:
/etc/udev/rules.d/70-persistent-net.rules
Remove lines defining the extraneous interfaces that you don't want. Once done, ensure that your network configs are correct (Red Hat based only)
# cd /etc/sysconfig/network-scripts/
# ls ifcfg*
Ensure the scripts matches up to the interfaces you defined in the udev rules. Once completed, reboot the machine.