开发者

specific interface name for an interface in linux

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 brea开发者_JS百科king from default linux way(dynamically assigning name) is ok.


You may not need to do that; you could instead just fiddle with the dynamic assignment mechanism. udev has 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.


You can rename network devices which are not up using the "ifconfig" command or the ioctl it uses. I strongly recommend that you don't :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜