Mailinglist Archive: yast-devel (73 mails)

< Previous Next >
Re: [yast-devel] sle12 network config in linuxrc
On Mon, 14 Jul 2014 11:31:37 +0200 (CEST)
Steffen Winterfeldt <snwint@xxxxxxx> wrote:

As the latest linuxrc with the new network code mostly active
accidentally slipped into rc1, I better describe the changes now. :-)


== network config before sle12 ==

** These options are still available in sle12. **

If the repo location is a network url you either get a dhcp config or
can supply a static config, e.g.

hostip=10.0.1.1/24 gateway=10.0.1.254 nameserver=10.0.1.2
domain=suse.de

This config is tried on every network interface in turn until it
works.

If you don't have a network repo you can still get a network config by

netsetup=1

Also, if you do an ssh or vnc installation, linuxrc knows you'll need
a network config.

The major drawback here is that you can only configure a single
interface.


== network config in sle12 ==

That's why there is now the new 'ifcfg' option. The example above
would look like

static: ifcfg=*=10.0.1.1/24,10.0.1.254,10.0.1.2,suse.de
dhcp: ifcfg=*=dhcp

The general syntax is


ifcfg=interface_name_or_pattern[.vlanid]=ip_addr_list,gateway,namserver_list,ns_search_list[,any_ifcfg_option=foo,...]
ifcfg=interface_name_or_pattern[.vlanid]=dhcp[46]

It will create ifcfg/ifroute files for all matching interfaces (dhcp)
resp. the first matching interface (static setup), then run 'wicked
ifup all' and if wicked managed to bring up at least one interface,
assume that tings worked.

ip_addr_list and namserver_list are space-separated lists, so don't
forget to quote the 'ifcfg' option value.

If you use a wildcard pattern, it is matched against all existing
interfaces and mac addresses; if you use just an interface name, a
config is created regardless whether the interface exists.

A wildcard pattern will never match 'lo'.

You can have several 'ifcfg' options, of course.

Advantages:

- more than one interface can be configured
- supports vlan setup (e.g. ifcfg=eth0.55=dhcp)
- can set arbitray ifcfg options
(ifcfg=eth3=dhcp,STARTMODE=nfsroot)
- no trial-and-error on all interfaces


Note: the transition to the new code is WIP. You may find
occasionally that linuxrc thinks the network is not configured even
though it really is.


Steffen

Can you please update also http://en.opensuse.org/SDB:Linuxrc as it is
I think the most used source for linuxrc documentation.

Josef
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References