Is there a possibility that I can hardcode interface name(say eth1) to a specific interface in the linux driver code?
This is in a controlled environemnt only, so breaking from default linux way(dynamically assigning name) is ok.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may not need to do that; you could instead just fiddle with the dynamic assignment mechanism.
udevhas configuration files that control how names are assigned to devices, and if I remember it will also allow you to create links with handy names for given device names… so you can probably achieve your effect by re-configuring rather than re-coding.Check out the man page and docs for
udev.