[systemd-devel] systemd-networkd different static ip and dhcp in different networks

Mantas Mikulėnas grawity at gmail.com
Wed Jun 21 08:15:47 UTC 2017


On Wed, Jun 21, 2017 at 10:55 AM, Jakob Schürz <wertstoffe at nurfuerspam.de>
wrote:

> Hi!
>
> I'm fiddeling around with network, to find out, how it works. I know,
> it's not made for use in Laptops moving in different networks.
>
> But there is a solution with wpa_supplicant to connect to different
> WLANs. I also found a Solution when i connect to my mobile phone, using
> usb-thetering for the network-connection. This also works.
>
> My question is - and i googled the half last night - how to configure
> networkd to set dhcp on on wireless-network (especially internet-cafe,
> wlan in trains...) and give a fixed ip-address at the home-wlan or the
> wlan at work (different ip then the home-fixed-ip)
>

You can't do this with networkd alone, as it cannot yet distinguish between
different Wi-Fi SSIDs. (Open a feature request on Github.) NetworkManager,
connman, or perhaps a recent dhcpcd (which AFAIK introduced wpa_supplicant
support recently) would work better in this case.

Is there also a possibility to set different fixed and dynamic
> ip-addresses when connection to different wired lans? Also the home-lan
> (static ip) and the lan at work (static) and the lan in university (dhcp).
>

Unfortunately, wired LANs don't even *have* anything like a SSID, so tools
can't distinguish between them at all. Really, just use DHCP at home...

But some of them (e.g. NetworkManager) allow manually switching between
connection profiles, e.g. you can have a "DHCP" profile and a "Work -
static" profile.

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170621/37ba3968/attachment.html>


More information about the systemd-devel mailing list