Bug ID 1205247
Summary eth0 may not get a default route when eth1 is configured for same subnet
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.4
Hardware x86-64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Network
Assignee screening-team-bugs@suse.de
Reporter kruse@pre-sense.de
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

If I configure a system with 2 NIC's in the same subnet, the default route will
not be set reliantly.

How to reproduce:

Install openSUSE Leap 15.4 via netinstaller
(openSUSE-Leap-15.4-NET-x86_64-Build243.2-Media.iso) in a VM with 2 NIC's:

When prompted for a system role choose "Server".
When partitioning screen shows up, make sure btrfs is used (should be the
default).
In the final screen, make sure "wicked" is used as the networking service,
click "Network Configuration" and configure eth0:
In Address tab set a static IP (e.g. 192.168.200.44) with subnet mask "/24" and
configure eth1 to use a static IP in the same subnet (e.g. 192.168.200.34/24).
Set device activation to "On Cable Connection" for both interfaces.
Add a generic (not bound to a specific NIC) default route (gateway), that is in
the same subnet (e.g. 192.168.200.1)

Go on with the installation ...

In the booted system, check if you got a route on eth0 (e.g. with `ip route`).
List the contents of /etc/sysconfig/network with `ls -Ul` (-U means
"unsorted").
If you have a route on eth0, ifcfg-eth0 will be listed before ifcfg-eth1, if
eth0 has no route, ifcfg-eth1 will be listed first instead.

The listing order can be changed by creating a NEW directory and create the
desired config FIRST, like so:
--
systemctl stop wicked
cd /etc/sysconfig/
mkdir network_new
cp network/ifcfg-eth0 network_new/
cp -r network/* network_new/
mv network network_old
cp -r network_new network
systemctl start wicked
--

`ls -U1 network_*` will give output similar to

/etc/sysconfig/network_old:
if-down.d
if-up.d
providers
scripts
ifcfg-lo
ifcfg.template
config
dhcp
routes
ifcfg-eth0
ifcfg-eth1

/etc/sysconfig/network_new:
ifcfg-eth1
config
dhcp
ifcfg-eth0
ifcfg-lo
ifcfg.template
if-down.d
if-up.d
providers
routes
scripts
--
contents of ifcfg-eth0:

IPADDR='192.168.200.44/24'
BOOTPROTO='static'
STARTMODE='ifplugd'
ZONE=public
----

1. Why don't I get a route on eth0 in the original scenario, even if eth1 has
no carrier or does not exist at all?
2. Wouldn't it be better for wicked to read the config files in a predictable
(alphanumerical) order?


You are receiving this mail because: