Re: Network interface configuration and systemd's predictable network interface names

Robert Klein <[email protected]>
Newsgroups gmane.linux.suse.autoinstall
Message-ID <[email protected]>
Hi,

On 01/24/2014 05:57 AM, David Huffman wrote:
> Hi, thanks to systemd's predictable network interface names (http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames), I have no way to tell what my eth0 interface is actually going to be called ahead of time as it varies amongst different computers. Is there anyway to affect all available network interfaces with autoyast?
> 
>     <networking>
>         <interfaces config:type="list">
>             <interface>
>                 <bootproto>dhcp</bootproto>
>                 <device>How do I make it affect all devices? Or at least  systemd's equivalent to eth0.</device>
>                 <startmode>onboot</startmode>
>             </interface>
>         </interfaces>
>     </networking> 		 	   		  --


I put only localhost in the interfaces section:


    <interfaces config:type="list">
      <!-- leave out the systemd/udev named active device -->
      <interface>
        <broadcast>127.255.255.255</broadcast>
        <device>lo</device>
        <ipaddr>127.0.0.1</ipaddr>
        <netmask>255.0.0.0</netmask>
        <network>127.0.0.0</network>
        <prefixlen>8</prefixlen>
        <startmode>auto</startmode>
        <usercontrol>no</usercontrol>
      </interface>
    </interfaces>


This works out of the box.


For some servers I have an autoyast init script to give the interface a
static IP address.

I use the following line to get the device name:

act_iface=$(/sbin/ip link | grep '[1-9]*: en' | grep 'state UP' | awk
'{print $2}' | sed 's/://')


Best regards
Robert


-- 
Robert Klein
UNIX Operations, Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.