| Summary: | sys-apps/systemd Needs to provide service unit for static IP addressing | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Reuben Martin <reuben.m> |
| Component: | Current packages | Assignee: | Gentoo systemd Team <systemd> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | enhancement | CC: | 1i5t5.duncan, franz.trischberger |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
I don't think it makes any sense for us to invent yet another way to configure networking with systemd. Also, you think netctl is overkill, I think you haven't even looked at it. Seems like >systemd-208 will get a "networkd". Reading the commit message of the initial commit [*] this might be what you are looking for... [*] http://cgit.freedesktop.org/systemd/systemd/commit/src/network?id=f579559b3a14c1f1ef96c372e7626c4733e6ef7d (In reply to Franz Fellner from comment #2) > Seems like >systemd-208 will get a "networkd". With nothing below systemd-212 in-tree any longer, this bug should most likely be resolved/obsolete. Indeed. |
systemd currently does not provide an IP addressing (that I am aware of) and relies on service units provided by packages like networkmanager, netctl, dhcp client or something similar to manage network connections. There are many scenarios where services like this are overkill. I would like to propose that it would be prudent to provide a service file with the systemd package that would allow setting a static IP. It would depend on sys-apps/iproute2 I've been using the following based on quick googling: /usr/lib/systemd/system/static-ip.service: ============================================ [Unit] Description=Static Network Addressing Wants=network.target Before=network.target [Service] Type=oneshot RemainAfterExit=yes EnvironmentFile=/etc/conf.d/net.systemd ExecStart=/bin/ip link set dev ${interface} up ExecStart=/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface} ExecStart=/bin/ip route add default via ${gateway} dev ${interface} ExecStop=/bin/ip addr flush dev ${interface} ExecStop=/bin/ip link set dev ${interface} down [Install] WantedBy=multi-user.target ============================================ /etc/conf.d/net.systemd ============================================ interface=foobar address=w.x.y.z netmask=w.x.y.z broadcast=w.x.y.z gateway=w.x.y.z ============================================ Reproducible: Always