You are not logged in.
Pages: 1
This new networkd is giving me a headache.
Apparently all the examples that allow the old naming convention disable networkd completely and i dont want that.
I'd like to configure networkd to name the first found wired connection with a specific name (I dont care about the names of the other connections, just the first one).
On reboot this name is assigned to the new first connection which might not be the same as the previous one.
Is this possible?
I configure the system in a different pc than the one we deploy with. Since I need to assign a static ip to the wired connection found in the other pc I need to know how it will be named in advance.
Offline
Just follow the wiki [1] using a wildcard for the device name, something like...
[Match]
Name=en*
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
[1] https://wiki.archlinux.org/index.php/Ne … d-networkd
Edit - This may only work if the machine only has one NIC, I'm not sure what happens if there are multiple matches.
Last edited by Slithery (2014-03-11 12:50:02)
Offline
Thanks for the example+link.
I dont know what happens if more than one NIC is available but I guess that they will all be assigned the same ip.
Since I have a single interface that shouldnt affect me right now but I'd rather have the rest not get assigned anything but that's for later.
The thing is that I need to know the exact name. A service that runs on systemd needs to read the mac address of the available interface
(I didn't mention this in the original post, sorry). Since the mac is in /sys/class/net/<interface name>/address whithout the exact name I'd
need to search the folder for any en* directories, etc. I can build a script for that but I was just reading the new udev naming rules.
Can't I create a link rule for udev so that the names for wired connections are really predictable? maybe en0, en1, en2, etc in the order they are discovered?
I've failed at finding an example that names acording to a rule, they all use static names like:
[Match]
Type=wlan
[Link]
Name=wireless0
This is for wireless but the name seems static, if two are found I dont know what would happen.
I'll keep digging.
Offline
You are mixing up the "Name=" declaration for the interface (in Match) and the link-name.
An interface name like "enp0s25" is persistent, no matter how many cards you add. Have a look again up and down the wiki link slithery posted. All you want to ensure is described there.
Offline
I configure the system in a different pc than the one we deploy with. Since I need to assign a static ip to the wired connection found in the other pc I need to know how it will be named in advance.
You know the target pc in advance, so simply clone your network configuration and modify the device name. current versions of systemd-udev derive the name from the hardware path which will never change as long as the network card stays in the same hardware slot. (except for usb devices).
Last edited by progandy (2014-03-13 12:53:28)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Pages: 1