Monday, July 21, 2008

AutoYaST, network device names

Everybody probably knows YaST. You should use it, at least for installation. And what about AutoYaST? AutoYaST is a great tool for automatic installation and configuration. I did some work regarding automatic installation & network setup during installation. Documented here
I did 4 tests:

1 - When installation starts, udev will create configuration file for persistent naming (based on MAC address). At the end of 1st stage (before first reboot) YaST will copy this file into installed system, so after reboot all network devices will have same device names.

2 - Same as 1, but during AutoYaST installation. That means when no rule in AutoYaST profile about this file, keep it, not replace by empty file.

3 - Use AutoYaST profile. When there is defined some rule about this file, use it and replace the original one. This example from networking section creates corresponded udev rule to keep eth0 name for interface with 08:00:27:07:a2:2d MAC address (and replaces udev rule file from 1):

part of AY.xml

<networking>
...
<net-udev type=list>
<rule>
<rule>ATTR{address}</rule>
<value>08:00:27:07:a2:2d</value>
<name>eth0</name>
</rule>
</net-udev>
...
</networking>


/etc/udev/rules.d/70-persistent-net.rules file as a result:

# Generated by autoyast
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:07:a2:2d", NAME="eth0"


4 - Migration from SLES10-style syntax. When you use your old profile (from <=SLES10x), it's something like:

<networking>
...
<interfaces config:type=list>
<interface>
<bootproto>dhcp</bootproto>
<device>eth-id-08:00:27:07:a2:2d</device>
<name>79c970 [PCnet32 LANCE]</name>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
...
</networking>


YaST will convert device name eth-id-08:00:27:07:a2:2d into rule for udev:

# Generated by autoyast
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:07:a2:2d", NAME="eth0"


and rename configuration name into eth0

And that's all for now ...
... have a lot of fun
Bye,
Michal

Wednesday, July 9, 2008

Network Documentation

I started to document some exceptions or special cases of network during installation. But this is I already know (I don't know what users don't know or wants to know ;-)) so if anybody wants to some parts be more detailed or something is missing there, your feedback is welcome.

Thursday, July 3, 2008

IPv6 - network, applications, ...

As I already wrote, there is support in YaST network module to configure IPv6 addresses (one or more), possibly mixed with IPv4:





But what is really new - support to configure apache2 server for IPv6 environment:

Setup on which addresses apache listen


Detail of virtual host (based on IP)


And test that it works:


This is in version yast2-http-server-2.17.2