PDA

View Full Version : Bind IP IP address to MAC in autoyast



okiok
11-Sep-2014, 08:59
Is it possible to bind IP to physical address in autoyast config file? The following code doesn't so the trick:

...
<interfaces config:type="list">
<interface>
<bootproto>static</bootproto>
<device>eth0</device>
<ipaddr>ip_address_0</ipaddr>
<hwaddr>aa:bb:cc:dd:ee:ff</hwaddr>
<name>MY 1st NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth1</device>
<ipaddr>ip_address_1</ipaddr>
<hwaddr>ff:aa:bb:cc:dd:ee</hwaddr>
<name>MY 2nd NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth2</device>
<ipaddr>ip_address_2</ipaddr>
<hwaddr>ee:ff:aa:bb:cc:dd</hwaddr>
<name>MY 3rd NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth3</device>
<ipaddr>ip_address_3</ipaddr>
<hwaddr>dd:ee:ff:aa:bb:cc</hwaddr>
<name>MY 4th NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth4</device>
<ipaddr>ip_address_4</ipaddr>
<hwaddr>cc:dd:ee:ff:aa:bb</hwaddr>
<name>MY 5th NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
<interface>
<bootproto>static</bootproto>
<device>eth5</device>
<ipaddr>ip_address_5</ipaddr>
<hwaddr>bb:cc:dd:ee:ff:aa</hwaddr>
<name>MY 6th NETWORK</name>
<netmask>255.255.255.0</netmask>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
...

jmozdzen
15-Sep-2014, 13:45
Hi okiok,

> Is it possible to bind IP to physical address in autoyast config file?

I'm no autoyast expert, but if nothing else gets you where you want to go, try setting up some installation script within autoyast that creates the according entries in /etc/udev/rules.d/70-persistent-net.rules.

You didn't state which SLES you're working with, so YMMV... in SLES10 (out of support :D) you had the "by hardware characteristics" naming convention for the ifcfg-* files... but you shouldn't be at that software level no more.

Regards,
Jens