From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8B6481381F3 for ; Fri, 26 Jul 2013 09:27:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 191E4E09A9; Fri, 26 Jul 2013 09:26:58 +0000 (UTC) Received: from postler.lichtfels.com (postler.lichtfels.com [78.46.92.195]) by pigeon.gentoo.org (Postfix) with ESMTP id 0C22CE0964 for ; Fri, 26 Jul 2013 09:26:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by postler.lichtfels.com (Postfix) with ESMTP id 8C002164BC for ; Fri, 26 Jul 2013 11:26:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xunil.at; s=mailout; t=1374830815; bh=96CQQz5V/57UvovWBVmwUcqlH7xXApV05TJ3EhjQJ10=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=d1IgIkEpp7uTZMnEq9th/x1szuE1kj3WcFzBYTpAEuPwq9Z2zIEQRLtFVnpGX1ePG CqlLU4qtfuAaxoJxP022KGRGgyiF1aA1k8a0Qz4yl7TcdgWeAxX8oPTfr+S4jh/qn2 YfKnxFbJC54AOKtjfa4fkiUrgo6Wg8Zl6SS3vbT4= Received: from postler.lichtfels.com ([127.0.0.1]) by localhost (postler.lichtfels.com [127.0.0.1]) (amavisd-maia, port 10024) with LMTP id 05202-09 for ; Fri, 26 Jul 2013 11:26:53 +0200 (CEST) Received: from hiro.oops.intern (unknown [IPv6:2001:15c0:65ff:8742:dc61:11a:ec2a:4d94]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by postler.lichtfels.com (Postfix) with ESMTPSA id 779C3164BB for ; Fri, 26 Jul 2013 11:26:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xunil.at; s=mailout; t=1374830813; bh=96CQQz5V/57UvovWBVmwUcqlH7xXApV05TJ3EhjQJ10=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=DliY26mFq8bDQwMrTXwO63dx5JfntZa5qnLiriq1uWrFjMVridWZiclymgL7v8sed 5GK5Z8moAPjN/RumayW3V0RH718Wbcm0EbOSMxvEcNqJ55yQv671mbSZW891Ctt0GA V52t61gzfGbWt43tTOF4zvd73wPkxpVC8VCFfl+E= Message-ID: <51F240DC.4080907@xunil.at> Date: Fri, 26 Jul 2013 11:26:52 +0200 From: "Stefan G. Weichinger" Organization: oops! User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130709 Thunderbird/17.0.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Systemd and static network References: <51F10221.1080807@hadt.biz> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.2c X-Archives-Salt: 5f1a1775-ea6b-4ff1-b8f8-09ac75cf7b14 X-Archives-Hash: bdc4cc9d06d8101e16ad4e8b8d83b06a Am 25.07.2013 17:42, schrieb Canek Peláez Valdés: >> What do you use - and what are the benefits of your method? > > I use the following unit in one of my servers: > > # ------------------------------------------------------------------------------------------- > [Unit] My current version, using "ip" : # cat network.service [Unit] Description=Network Connectivity [Service] Type=oneshot RemainAfterExit=yes EnvironmentFile=/etc/conf.d/network_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} ExecStop=/bin/ip addr flush dev ${interface} ExecStop=/bin/ip link set dev ${interface} down [Install] WantedBy=network.target ----- so that unitfile does not have to be touched again and you only edit /etc/conf.d/network_systemd -> # cat /etc/conf.d/network_systemd PATH=/sbin:/usr/sbin interface=p4p1 address=192.x.y.z netmask=255.255.255.0 broadcast=192.x.y.zz gateway=192.x.y.zzz ----- I have a second unitfile with a more complicated setup for bridging (with KVM). Stefan