Discussion:
systemd-networkd bridge with DHCP not working
(too old to reply)
Henrik /KaarPoSoft
2014-03-17 16:01:19 UTC
Permalink
Dear all,

*SUMMARY*

I am trying to replace dhcpcd with systemd-networkd.
Using systemd-networkd on a single physical interface works fine.
However, trying to use DHCP on a bridge fails for me.
Any help would be most appreciated.



*WORKS*

The single physical interface scenario which works:

/etc/systemd/network/50-dhcp.network contains:
--------------------------------------------------
[Match]
Name=en*
[Network]
DHCP=yes
--------------------------------------------------

"ip addr" shows:
--------------------------------------------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.161/24 brd 192.168.99.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
3: enp11s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
pfifo_fast state DOWN group default qlen 1000
link/ether 10:bf:48:d7:64:aa brd ff:ff:ff:ff:ff:ff
4: sit0: <NOARP> mtu 1480 qdisc noop state DOWN group default
link/sit 0.0.0.0 brd 0.0.0.0
--------------------------------------------------

Note: I will remove lo, enp11s0, and sit0 output from further "ip addr"
output.

So, I got an IP address and I have connectivity.



*FAILS*


Now I try to set up a simple bridge, with just one physical interface
(eno1), trying to get the bridge to get its IP address from DHCP:

--------------------------------------------------
rm -f /etc/systemd/network/50-dhcp.network

cat > /etc/systemd/network/42-br0.netdev<<EOF
[NetDev]
Name=br0
Kind=bridge
EOF

cat > /etc/systemd/network/44-en.network<<EOF
[Match]
Name=eno1
[Network]
Bridge=br0
EOF

cat > /etc/systemd/network/46-br0.network<<EOF
[Match]
Name=br0
[Network]
DHCP=yes
EOF
--------------------------------------------------

"ip addr" shows:
--------------------------------------------------
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP group default
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::78e6:aff:feca:c0ac/64 scope link
valid_lft forever preferred_lft forever
--------------------------------------------------

I note here, that the inet6 address for eno1 matches the MAC, whereas
the inet6 address for br0 does NOT match the MAC for br0 (which is, by
the way, the same as the MAC for eno1).

"journalctl -b | grep DHCP" gives:
--------------------------------------------------
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: set MAC
address to 7a:e6:0a:ca:c0:ac
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: br0: acquiring
DHCPv4 lease
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STARTED
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STOPPED
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: br0: acquiring
DHCPv4 lease
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STARTED
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
--------------------------------------------------

followed by several combinations of:
--------------------------------------------------
Mar 17 16:28:42 komplett-21 systemd-networkd[2678]: DHCP CLIENT:
ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 17 16:28:42 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
Mar 17 16:29:16 komplett-21 systemd-networkd[2678]: DHCP CLIENT:
ignoring packet: to port 138, which is not the DHCP client port (68)
--------------------------------------------------

So, I do not get an IP address from DHCP, and I do NOT have
connectivity. But I DO receive broadcasts from the LAN (ports 9303, 138,
etc).

I note that the systemd-networkd DHCP CLIENT says it is setting the MAC
address to something else than what "ip addr" says the br0 IP address is
(but the DHCP CLIENT MAC address matches the last part of the inet6
address).

Question: Where did systemd-networkd DHCP CLIENT get this MAC address?



*SURPRISE*


Now if I run "tcpdump -i br0" or "wireshark", I see that that the DHCP
REQUEST comes from 7a:e6:0a:ca:c0:ac.

I presume, that the problem is, that the bridge thinks its MAC is
10:bf:48:d7:68:e1 which is the same as the MAC for eno1, but that is NOT
the same MAC address systemd-networkd DHCP is using.

tcpdump does something to the br0 interface, so after running "tcpdump
-i br0", I finally get an IP address for the bridge:

--------------------------------------------------
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP group default
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.175/24 brd 192.168.99.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::78e6:aff:feca:c0ac/64 scope link
valid_lft forever preferred_lft forever
--------------------------------------------------

I would have thought that "tcpdump -i br0" would bring the interface
into "Promiscuous mode", but neither the "ip addr" command, nor "netstat
-i" indicates that either eno1 or br0 are in "Promiscuous mode".



*HELP*


Any help on what to put into the systemd configuration files to make the
bridge DHCP work would be most appreciated.


FWIW: systemd is version 211 and the OS is:
http://kaarpux.kaarposoft.dk/


/Henrik
Tom Gundersen
2014-03-17 20:52:35 UTC
Permalink
Hi Henrik,

On Mon, Mar 17, 2014 at 5:01 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Dear all,
*SUMMARY*
I am trying to replace dhcpcd with systemd-networkd.
Using systemd-networkd on a single physical interface works fine.
However, trying to use DHCP on a bridge fails for me.
Any help would be most appreciated.
*WORKS*
--------------------------------------------------
[Match]
Name=en*
[Network]
DHCP=yes
--------------------------------------------------
--------------------------------------------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.161/24 brd 192.168.99.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
3: enp11s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN group default qlen 1000
link/ether 10:bf:48:d7:64:aa brd ff:ff:ff:ff:ff:ff
4: sit0: <NOARP> mtu 1480 qdisc noop state DOWN group default
link/sit 0.0.0.0 brd 0.0.0.0
--------------------------------------------------
Note: I will remove lo, enp11s0, and sit0 output from further "ip addr"
output.
So, I got an IP address and I have connectivity.
*FAILS*
Now I try to set up a simple bridge, with just one physical interface
--------------------------------------------------
rm -f /etc/systemd/network/50-dhcp.network
cat > /etc/systemd/network/42-br0.netdev<<EOF
[NetDev]
Name=br0
Kind=bridge
EOF
cat > /etc/systemd/network/44-en.network<<EOF
[Match]
Name=eno1
[Network]
Bridge=br0
EOF
cat > /etc/systemd/network/46-br0.network<<EOF
[Match]
Name=br0
[Network]
DHCP=yes
EOF
--------------------------------------------------
--------------------------------------------------
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master
br0 state UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
group default
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::78e6:aff:feca:c0ac/64 scope link
valid_lft forever preferred_lft forever
--------------------------------------------------
I note here, that the inet6 address for eno1 matches the MAC, whereas the
inet6 address for br0 does NOT match the MAC for br0 (which is, by the way,
the same as the MAC for eno1).
--------------------------------------------------
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: set MAC
address to 7a:e6:0a:ca:c0:ac
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: br0: acquiring DHCPv4
lease
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STARTED
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
Mar 17 16:28:37 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STOPPED
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: br0: acquiring DHCPv4
lease
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: DHCP CLIENT: STARTED
Mar 17 16:28:40 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
--------------------------------------------------
--------------------------------------------------
Mar 17 16:28:42 komplett-21 systemd-networkd[2678]: DHCP CLIENT: ignoring
packet: to port 9303, which is not the DHCP client port (68)
Mar 17 16:28:42 komplett-21 systemd-networkd[2678]: DHCP CLIENT: DISCOVER
Mar 17 16:29:16 komplett-21 systemd-networkd[2678]: DHCP CLIENT: ignoring
packet: to port 138, which is not the DHCP client port (68)
--------------------------------------------------
So, I do not get an IP address from DHCP, and I do NOT have connectivity.
But I DO receive broadcasts from the LAN (ports 9303, 138, etc).
I note that the systemd-networkd DHCP CLIENT says it is setting the MAC
address to something else than what "ip addr" says the br0 IP address is
(but the DHCP CLIENT MAC address matches the last part of the inet6
address).
Question: Where did systemd-networkd DHCP CLIENT get this MAC address?
*SURPRISE*
Now if I run "tcpdump -i br0" or "wireshark", I see that that the DHCP
REQUEST comes from 7a:e6:0a:ca:c0:ac.
I presume, that the problem is, that the bridge thinks its MAC is
10:bf:48:d7:68:e1 which is the same as the MAC for eno1, but that is NOT the
same MAC address systemd-networkd DHCP is using.
tcpdump does something to the br0 interface, so after running "tcpdump -i
--------------------------------------------------
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master
br0 state UP group default qlen 1000
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12bf:48ff:fed7:68e1/64 scope link
valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
group default
link/ether 10:bf:48:d7:68:e1 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.175/24 brd 192.168.99.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::78e6:aff:feca:c0ac/64 scope link
valid_lft forever preferred_lft forever
--------------------------------------------------
I would have thought that "tcpdump -i br0" would bring the interface into
"Promiscuous mode", but neither the "ip addr" command, nor "netstat -i"
indicates that either eno1 or br0 are in "Promiscuous mode".
*HELP*
Any help on what to put into the systemd configuration files to make the
bridge DHCP work would be most appreciated.
Your configuration seems correct, and your analysis too: we were not
picking up the bridge's changing MAC address.

This should have been fixed in git (for some time, but possibly not
before the last release). I can verify that the setup you pasted above
works for me with current git. If you are still experiencing problems,
please let me know.

Cheers,

Tom
Henrik /KaarPoSoft
2014-03-17 21:21:23 UTC
Permalink
Hi Tom,

Thanks for your feedback...

I was briefly looking through git commits after 211 without finding
anything related. But then again I did not look into too much detail.

Do you know which commit would solve this?

/Henrik
Post by Tom Gundersen
Hi Henrik,
On Mon, Mar 17, 2014 at 5:01 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Dear all,
*SUMMARY*
I am trying to replace dhcpcd with systemd-networkd.
Using systemd-networkd on a single physical interface works fine.
However, trying to use DHCP on a bridge fails for me.
Any help would be most appreciated.
[...]
Any help on what to put into the systemd configuration files to make the
bridge DHCP work would be most appreciated.
Your configuration seems correct, and your analysis too: we were not
picking up the bridge's changing MAC address.
This should have been fixed in git (for some time, but possibly not
before the last release). I can verify that the setup you pasted above
works for me with current git. If you are still experiencing problems,
please let me know.
Cheers,
Tom
Tom Gundersen
2014-03-17 21:32:28 UTC
Permalink
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).

Cheers,

Tom
poma
2014-03-18 02:05:51 UTC
Permalink
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
With a "Static Leases" - reserved IPs & MACs, mixed results have been
achieved. Sometimes works, sometimes doesn't.

- networkd-DHCP-ACK:
...
: bridge0: creating netdev
: enp3s0: found matching network '/etc/systemd/network/base0.network'
: enp3s0: requesting link status
: enp3s0: enslaving by 'bridge0'
: enp3s0: link (with ifindex 4) added
: bridge0: netdev ready
: bridge0: enslaving link 'enp3s0'
: received RTM_NEWLINK message for untracked ifindex 5
: bridge0: found matching network '/etc/systemd/network/bridge0dhcp.network'
: bridge0: requesting link status
: bridge0: bringing link up
: bridge0: link (with ifindex 5) added
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: link status updated: 00000000 -> 0x00001002
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 6e:c6:ba:32:2a:19
: bridge0: link status updated: 00000000 -> 0x00001002
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 00:12:34:56:78:30
: enp3s0: enslaved
: enp3s0: bringing link up
: enp3s0: link configured
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: link is up
: bridge0: link status updated: 0x00001002 -> 0x00001003
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: link is up
: enp3s0: link status updated: 0x00001002 -> 0x00001003
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: carrier on
: enp3s0: link status updated: 0x00001003 -> 0x00011043
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: carrier on
: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
: bridge0: acquiring DHCPv4 lease
: DHCP CLIENT: STARTED
: bridge0: link status updated: 0x00001003 -> 0x00011043
: DHCP CLIENT: DISCOVER
: DHCP CLIENT: OFFER
: DHCP CLIENT: REQUEST
: DHCP CLIENT: ACK
: bridge0: DHCPv4 address 192.168.2.35/24 via 192.168.2.1
: bridge0: setting addresses
: bridge0: addresses set
: bridge0: setting routes
: bridge0: routes set
: bridge0: link configured
: enp3s0: MAC address: 00:12:34:56:78:30

- networkd-DHCP-NAK:
...
: bridge0: creating netdev
: enp3s0: found matching network '/etc/systemd/network/base0.network'
: enp3s0: requesting link status
: enp3s0: enslaving by 'bridge0'
: enp3s0: link (with ifindex 4) added
: bridge0: found matching network '/etc/systemd/network/bridge0dhcp.network'
: bridge0: requesting link status
: bridge0: bringing link up
: bridge0: link (with ifindex 5) added
: bridge0: link already exists, ignoring
: bridge0: netdev ready
: bridge0: enslaving link 'enp3s0'
: bridge0: MAC address: d2:f6:61:7b:8f:d4
: bridge0: link status updated: 00000000 -> 0x00001002
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: link status updated: 00000000 -> 0x00001002
: bridge0: MAC address: d2:f6:61:7b:8f:d4
: bridge0: MAC address: d2:f6:61:7b:8f:d4
: bridge0: link is up
: bridge0: carrier on
: DHCP CLIENT: set MAC address to d2:f6:61:7b:8f:d4
: bridge0: acquiring DHCPv4 lease
: DHCP CLIENT: STARTED
: bridge0: link status updated: 0x00001002 -> 0x00011043
: DHCP CLIENT: DISCOVER
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: d2:f6:61:7b:8f:d4
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: carrier off
: DHCP CLIENT: STOPPED
: bridge0: link status updated: 0x00011043 -> 0x00001043
: enp3s0: enslaved
: enp3s0: bringing link up
: enp3s0: link configured
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: link status updated: 0x00001043 -> 0x00001003
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: link is up
: enp3s0: link status updated: 0x00001002 -> 0x00001003
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: carrier on
: enp3s0: link status updated: 0x00001003 -> 0x00011043
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: enp3s0: MAC address: 00:12:34:56:78:30
: bridge0: MAC address: 00:12:34:56:78:30
: bridge0: carrier on
: bridge0: acquiring DHCPv4 lease
: DHCP CLIENT: STARTED
: bridge0: link status updated: 0x00001003 -> 0x00011043
: DHCP CLIENT: DISCOVER
: DHCP CLIENT: DISCOVER
: DHCP CLIENT: OFFER
: DHCP CLIENT: REQUEST
: DHCP CLIENT: NAK
: bridge0: IP address in use.
: DHCP CLIENT: STOPPED
: enp3s0: MAC address: 00:12:34:56:78:30


poma
Henrik /KaarPoSoft
2014-03-18 08:18:19 UTC
Permalink
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
And the problem remains )))-:
/Henrik
Henrik /KaarPoSoft
2014-03-18 09:00:52 UTC
Permalink
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
/Henrik
As a quick hack, I tried this:

cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF

And now I get an IP address by DHCP, and I have connectivity.

But hard-coding the MAC is hardly a viable long-term solution...

/Henrik
Tom Gundersen
2014-03-18 09:10:16 UTC
Permalink
On Tue, Mar 18, 2014 at 10:00 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
/Henrik
cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF
And now I get an IP address by DHCP, and I have connectivity.
But hard-coding the MAC is hardly a viable long-term solution...
Yeah, that's not going to fly.

Could you attach the full debug output of a failing run? To get it,
you probably want to stop systemd-networkd, "ip link del" the bridge,
and start networkd from the commandline:

# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd

I think I understand what's going on, but I'd like to have it verified
before changing anything.

Cheers,

Tom
Henrik /KaarPoSoft
2014-03-18 09:38:47 UTC
Permalink
Post by Tom Gundersen
On Tue, Mar 18, 2014 at 10:00 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
/Henrik
cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF
And now I get an IP address by DHCP, and I have connectivity.
But hard-coding the MAC is hardly a viable long-term solution...
Yeah, that's not going to fly.
Could you attach the full debug output of a failing run? To get it,
you probably want to stop systemd-networkd, "ip link del" the bridge,
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
I think I understand what's going on, but I'd like to have it verified
before changing anything.
Cheers,
Tom
I guess running from the commandline should not be necessary since I have
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
in
/etc/systemd/system/systemd-networkd.service.d/debug.conf

Log attached.

/henrik
poma
2014-03-18 11:28:01 UTC
Permalink
...

- journalctl/systemd-networkd:
systemd-networkd[597]: timestamp of '/etc/systemd/network' changed
systemd-networkd[597]: timestamp of '/run/systemd/network' changed
systemd-networkd[597]: bridge0: creating netdev
systemd-networkd[597]: enp1s6: link (with ifindex 2) added
systemd-networkd[597]: enp1s9: link (with ifindex 3) added
systemd-networkd[597]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
systemd-networkd[597]: enp3s0: requesting link status
systemd-networkd[597]: enp3s0: enslaving by 'bridge0'
systemd-networkd[597]: enp3s0: link (with ifindex 4) added
systemd-networkd[597]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
systemd-networkd[597]: bridge0: requesting link status
systemd-networkd[597]: bridge0: bringing link up
systemd-networkd[597]: bridge0: link (with ifindex 5) added
systemd-networkd[597]: lo: link (with ifindex 1) added
systemd-networkd[597]: bridge0: link already exists, ignoring
systemd-networkd[597]: bridge0: netdev ready
systemd-networkd[597]: bridge0: enslaving link 'enp3s0'
systemd-networkd[597]: bridge0: MAC address: ba:d4:25:ca:79:58
systemd-networkd[597]: bridge0: link status updated: 00000000 -> 0x00001002
systemd-networkd[597]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: link status updated: 00000000 -> 0x00001002
systemd-networkd[597]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.6 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
systemd-networkd[597]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.6
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
systemd-networkd[597]: bridge0: MAC address: ba:d4:25:ca:79:58
systemd-networkd[597]: bridge0: MAC address: ba:d4:25:ca:79:58
systemd-networkd[597]: bridge0: link is up
systemd-networkd[597]: bridge0: carrier on
systemd-networkd[597]: DHCP CLIENT: set MAC address to ba:d4:25:ca:79:58
systemd-networkd[597]: bridge0: acquiring DHCPv4 lease
systemd-networkd[597]: DHCP CLIENT: STARTED
systemd-networkd[597]: bridge0: link status updated: 0x00001002 ->
0x00011043
systemd-networkd[597]: DHCP CLIENT: DISCOVER
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: MAC address: ba:d4:25:ca:79:58
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: carrier off
systemd-networkd[597]: DHCP CLIENT: STOPPED
systemd-networkd[597]: bridge0: link status updated: 0x00011043 ->
0x00001043
systemd-networkd[597]: enp3s0: enslaved
systemd-networkd[597]: enp3s0: bringing link up
systemd-networkd[597]: enp3s0: link configured
systemd-networkd[597]: bridge0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: link status updated: 0x00001043 ->
0x00001003
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: link is up
systemd-networkd[597]: enp3s0: link status updated: 0x00001002 -> 0x00001003
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: carrier on
systemd-networkd[597]: enp3s0: link status updated: 0x00001003 -> 0x00011043
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: MAC address: 00:12:34:56:78:30
systemd-networkd[597]: bridge0: carrier on
systemd-networkd[597]: bridge0: acquiring DHCPv4 lease
systemd-networkd[597]: DHCP CLIENT: STARTED
systemd-networkd[597]: bridge0: link status updated: 0x00001003 ->
0x00011043
systemd-networkd[597]: DHCP CLIENT: DISCOVER
systemd-networkd[597]: DHCP CLIENT: OFFER
systemd-networkd[597]: DHCP CLIENT: REQUEST
systemd-networkd[597]: DHCP CLIENT: NAK
systemd-networkd[597]: bridge0: IP address in use.
systemd-networkd[597]: DHCP CLIENT: STOPPED
systemd-networkd[597]: enp3s0: MAC address: 00:12:34:56:78:30

- ip addr show bridge0:
5: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP group default
link/ether 00:12:34:56:78:30 brd ff:ff:ff:ff:ff:ff
inet6 fe80::b8d4:25ff:feca:7958/64 scope link
valid_lft forever preferred_lft forever

- systemctl restart systemd-networkd

- journalctl/systemd-networkd:
systemd[1]: Stopping Network Service...
systemd[1]: Starting Network Service...
systemd-networkd[1382]: timestamp of '/etc/systemd/network' changed
systemd-networkd[1382]: timestamp of '/run/systemd/network' changed
systemd-networkd[1382]: bridge0: creating netdev
systemd-networkd[1382]: enp1s6: link (with ifindex 2) added
systemd-networkd[1382]: enp1s9: link (with ifindex 3) added
systemd-networkd[1382]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
systemd-networkd[1382]: enp3s0: requesting link status
systemd-networkd[1382]: enp3s0: enslaving by 'bridge0'
systemd-networkd[1382]: enp3s0: link (with ifindex 4) added
systemd-networkd[1382]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
systemd-networkd[1382]: bridge0: requesting link status
systemd-networkd[1382]: bridge0: bringing link up
systemd-networkd[1382]: bridge0: link (with ifindex 5) added
systemd-networkd[1382]: lo: link (with ifindex 1) added
systemd-networkd[1382]: bridge0: requesting netdev status
systemd[1]: Started Network Service.
systemd-networkd[1382]: enp3s0: MAC address: 00:12:34:56:78:30
systemd-networkd[1382]: enp3s0: link is up
systemd-networkd[1382]: enp3s0: carrier on
systemd-networkd[1382]: enp3s0: link status updated: 00000000 -> 0x00011043
systemd-networkd[1382]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
systemd-networkd[1382]: bridge0: MAC address: 00:12:34:56:78:30
systemd-networkd[1382]: bridge0: link is up
systemd-networkd[1382]: bridge0: carrier on
systemd-networkd[1382]: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
systemd-networkd[1382]: bridge0: acquiring DHCPv4 lease
systemd-networkd[1382]: DHCP CLIENT: STARTED
systemd-networkd[1382]: bridge0: link status updated: 00000000 -> 0x00011043
systemd-networkd[1382]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.33 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
systemd-networkd[1382]: DHCP CLIENT: DISCOVER
systemd-networkd[1382]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.33
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
systemd-networkd[1382]: bridge0: netdev ready
systemd-networkd[1382]: bridge0: enslaving link 'enp3s0'
systemd-networkd[1382]: enp3s0: enslaved
systemd-networkd[1382]: enp3s0: bringing link up
systemd-networkd[1382]: enp3s0: link configured
systemd-networkd[1382]: DHCP CLIENT: OFFER
systemd-networkd[1382]: DHCP CLIENT: REQUEST
systemd-networkd[1382]: DHCP CLIENT: ACK
systemd-networkd[1382]: bridge0: DHCPv4 address 192.168.2.35/24 via
192.168.2.1
systemd-networkd[1382]: bridge0: setting addresses
systemd-networkd[1382]: bridge0: addresses set
systemd-networkd[1382]: bridge0: setting routes
systemd-networkd[1382]: bridge0: routes set
systemd-networkd[1382]: bridge0: link configured

- ip addr show bridge0:
5: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP group default
link/ether 00:12:34:56:78:30 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.35/24 brd 192.168.2.255 scope global bridge0
valid_lft forever preferred_lft forever
inet6 fe80::b8d4:25ff:feca:7958/64 scope link
valid_lft forever preferred_lft forever


poma
poma
2014-03-19 12:25:26 UTC
Permalink
Still the same issue, DHCPC starts too early, before the correct MAC
address is set for the bridge.

git 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14

journalctl -b -u systemd-networkd
...
12:51:55 networkd[579]: timestamp of '/etc/systemd/network' changed
12:51:55 networkd[579]: timestamp of '/run/systemd/network' changed
12:51:55 networkd[579]: bridge0: creating netdev
12:51:55 networkd[579]: enp1s6: link (with ifindex 2) added
12:51:55 networkd[579]: enp1s9: link (with ifindex 3) added
12:51:55 networkd[579]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:51:55 networkd[579]: enp3s0: requesting link status
12:51:55 networkd[579]: enp3s0: enslaving by 'bridge0'
12:51:55 networkd[579]: enp3s0: link (with ifindex 4) added
12:51:55 networkd[579]: lo: link (with ifindex 1) added
12:51:55 networkd[579]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:51:55 networkd[579]: bridge0: requesting link status
12:51:55 networkd[579]: bridge0: bringing link up
12:51:55 networkd[579]: bridge0: link (with ifindex 5) added
12:51:55 networkd[579]: bridge0: netdev ready
12:51:55 networkd[579]: bridge0: enslaving link 'enp3s0'
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: enp3s0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link is up
12:51:55 networkd[579]: bridge0: carrier on
12:51:55 networkd[579]: DHCP CLIENT: set MAC address to 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:55 networkd[579]: DHCP CLIENT: STARTED
12:51:55 networkd[579]: bridge0: link status updated: 0x00001002 ->
0x00011043
12:51:55 networkd[579]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.6 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:51:55 networkd[579]: DHCP CLIENT: DISCOVER
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.6
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: carrier off
12:51:55 networkd[579]: DHCP CLIENT: STOPPED
12:51:56 networkd[579]: bridge0: link status updated: 0x00011043 ->
0x00001043
12:51:56 networkd[579]: enp3s0: enslaved
12:51:56 networkd[579]: enp3s0: bringing link up
12:51:56 networkd[579]: enp3s0: link configured
12:51:56 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: bridge0: link status updated: 0x00001043 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: enp3s0: link is up
12:51:56 networkd[579]: enp3s0: link status updated: 0x00001002 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: carrier on
12:51:57 networkd[579]: enp3s0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: carrier on
12:51:57 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:57 networkd[579]: DHCP CLIENT: STARTED
12:51:57 networkd[579]: bridge0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: DHCP CLIENT: DISCOVER
12:51:59 networkd[579]: DHCP CLIENT: DISCOVER
12:52:02 networkd[579]: DHCP CLIENT: DISCOVER
12:52:07 networkd[579]: DHCP CLIENT: DISCOVER
12:52:12 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:52:16 networkd[579]: DHCP CLIENT: DISCOVER
12:52:32 networkd[579]: DHCP CLIENT: DISCOVER
12:52:55 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:52:56 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: DISCOVER
12:54:08 networkd[579]: DHCP CLIENT: DISCOVER
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:55:13 networkd[579]: DHCP CLIENT: DISCOVER
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:18 networkd[579]: DHCP CLIENT: DISCOVER
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:57:08 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:57:13 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:57:22 networkd[579]: DHCP CLIENT: DISCOVER
...
systemctl restart systemd-networkd
...
12:57:40 systemd[1]: Stopping Network Service...
12:57:40 networkd[579]: Received SIGTERM from PID 1 (systemd).
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: DHCP CLIENT: STOPPED
12:57:40 systemd[1]: Starting Network Service...
12:57:40 networkd[1449]: timestamp of '/etc/systemd/network' changed
12:57:40 networkd[1449]: timestamp of '/run/systemd/network' changed
12:57:40 networkd[1449]: bridge0: creating netdev
12:57:40 networkd[1449]: enp1s6: link (with ifindex 2) added
12:57:40 networkd[1449]: enp1s9: link (with ifindex 3) added
12:57:40 networkd[1449]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:57:40 networkd[1449]: enp3s0: requesting link status
12:57:40 networkd[1449]: enp3s0: enslaving by 'bridge0'
12:57:40 networkd[1449]: enp3s0: link (with ifindex 4) added
12:57:40 networkd[1449]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:57:40 networkd[1449]: bridge0: requesting link status
12:57:40 networkd[1449]: bridge0: bringing link up
12:57:40 networkd[1449]: bridge0: link (with ifindex 5) added
12:57:40 networkd[1449]: lo: link (with ifindex 1) added
12:57:40 networkd[1449]: bridge0: requesting netdev status
12:57:40 networkd[1449]: enp3s0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: enp3s0: link is up
12:57:40 networkd[1449]: enp3s0: carrier on
12:57:40 systemd[1]: Started Network Service.
12:57:40 networkd[1449]: enp3s0: link status updated: 00000000 -> 0x00011043
12:57:40 networkd[1449]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:57:40 networkd[1449]: bridge0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: link is up
12:57:40 networkd[1449]: bridge0: carrier on
12:57:40 networkd[1449]: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: acquiring DHCPv4 lease
12:57:40 networkd[1449]: DHCP CLIENT: STARTED
12:57:40 networkd[1449]: bridge0: link status updated: 00000000 ->
0x00011043
12:57:40 networkd[1449]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.34 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:57:40 networkd[1449]: DHCP CLIENT: DISCOVER
12:57:40 networkd[1449]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.34
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:57:40 networkd[1449]: bridge0: netdev ready
12:57:40 networkd[1449]: bridge0: enslaving link 'enp3s0'
12:57:40 networkd[1449]: enp3s0: enslaved
12:57:40 networkd[1449]: enp3s0: bringing link up
12:57:40 networkd[1449]: enp3s0: link configured
12:57:40 networkd[1449]: DHCP CLIENT: OFFER
12:57:40 networkd[1449]: DHCP CLIENT: REQUEST
12:57:40 networkd[1449]: DHCP CLIENT: ACK
12:57:40 networkd[1449]: bridge0: DHCPv4 address 192.168.2.35/24 via
192.168.2.1
12:57:40 networkd[1449]: bridge0: setting addresses
12:57:40 networkd[1449]: bridge0: addresses set
12:57:40 networkd[1449]: bridge0: setting routes
12:57:40 networkd[1449]: bridge0: routes set
12:57:40 networkd[1449]: bridge0: link configured


poma
Tom Gundersen
2014-03-19 13:09:22 UTC
Permalink
Post by poma
Still the same issue, DHCPC starts too early, before the correct MAC
address is set for the bridge.
git 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14
I haven't yet gotten around to this. We probably should just restart
the dhcp client if the mac address changes, for whatever reason.
Unless anyone else has a better idea.

Cheers,

Tom
Post by poma
journalctl -b -u systemd-networkd
...
12:51:55 networkd[579]: timestamp of '/etc/systemd/network' changed
12:51:55 networkd[579]: timestamp of '/run/systemd/network' changed
12:51:55 networkd[579]: bridge0: creating netdev
12:51:55 networkd[579]: enp1s6: link (with ifindex 2) added
12:51:55 networkd[579]: enp1s9: link (with ifindex 3) added
12:51:55 networkd[579]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:51:55 networkd[579]: enp3s0: requesting link status
12:51:55 networkd[579]: enp3s0: enslaving by 'bridge0'
12:51:55 networkd[579]: enp3s0: link (with ifindex 4) added
12:51:55 networkd[579]: lo: link (with ifindex 1) added
12:51:55 networkd[579]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:51:55 networkd[579]: bridge0: requesting link status
12:51:55 networkd[579]: bridge0: bringing link up
12:51:55 networkd[579]: bridge0: link (with ifindex 5) added
12:51:55 networkd[579]: bridge0: netdev ready
12:51:55 networkd[579]: bridge0: enslaving link 'enp3s0'
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: enp3s0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link is up
12:51:55 networkd[579]: bridge0: carrier on
12:51:55 networkd[579]: DHCP CLIENT: set MAC address to 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:55 networkd[579]: DHCP CLIENT: STARTED
12:51:55 networkd[579]: bridge0: link status updated: 0x00001002 ->
0x00011043
12:51:55 networkd[579]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.6 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:51:55 networkd[579]: DHCP CLIENT: DISCOVER
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.6
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: carrier off
12:51:55 networkd[579]: DHCP CLIENT: STOPPED
12:51:56 networkd[579]: bridge0: link status updated: 0x00011043 ->
0x00001043
12:51:56 networkd[579]: enp3s0: enslaved
12:51:56 networkd[579]: enp3s0: bringing link up
12:51:56 networkd[579]: enp3s0: link configured
12:51:56 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: bridge0: link status updated: 0x00001043 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: enp3s0: link is up
12:51:56 networkd[579]: enp3s0: link status updated: 0x00001002 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: carrier on
12:51:57 networkd[579]: enp3s0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: carrier on
12:51:57 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:57 networkd[579]: DHCP CLIENT: STARTED
12:51:57 networkd[579]: bridge0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: DHCP CLIENT: DISCOVER
12:51:59 networkd[579]: DHCP CLIENT: DISCOVER
12:52:02 networkd[579]: DHCP CLIENT: DISCOVER
12:52:07 networkd[579]: DHCP CLIENT: DISCOVER
12:52:12 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:52:16 networkd[579]: DHCP CLIENT: DISCOVER
12:52:32 networkd[579]: DHCP CLIENT: DISCOVER
12:52:55 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:52:56 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: DISCOVER
12:54:08 networkd[579]: DHCP CLIENT: DISCOVER
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:55:13 networkd[579]: DHCP CLIENT: DISCOVER
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:18 networkd[579]: DHCP CLIENT: DISCOVER
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:57:08 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:57:13 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:57:22 networkd[579]: DHCP CLIENT: DISCOVER
...
systemctl restart systemd-networkd
...
12:57:40 systemd[1]: Stopping Network Service...
12:57:40 networkd[579]: Received SIGTERM from PID 1 (systemd).
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: DHCP CLIENT: STOPPED
12:57:40 systemd[1]: Starting Network Service...
12:57:40 networkd[1449]: timestamp of '/etc/systemd/network' changed
12:57:40 networkd[1449]: timestamp of '/run/systemd/network' changed
12:57:40 networkd[1449]: bridge0: creating netdev
12:57:40 networkd[1449]: enp1s6: link (with ifindex 2) added
12:57:40 networkd[1449]: enp1s9: link (with ifindex 3) added
12:57:40 networkd[1449]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:57:40 networkd[1449]: enp3s0: requesting link status
12:57:40 networkd[1449]: enp3s0: enslaving by 'bridge0'
12:57:40 networkd[1449]: enp3s0: link (with ifindex 4) added
12:57:40 networkd[1449]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:57:40 networkd[1449]: bridge0: requesting link status
12:57:40 networkd[1449]: bridge0: bringing link up
12:57:40 networkd[1449]: bridge0: link (with ifindex 5) added
12:57:40 networkd[1449]: lo: link (with ifindex 1) added
12:57:40 networkd[1449]: bridge0: requesting netdev status
12:57:40 networkd[1449]: enp3s0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: enp3s0: link is up
12:57:40 networkd[1449]: enp3s0: carrier on
12:57:40 systemd[1]: Started Network Service.
12:57:40 networkd[1449]: enp3s0: link status updated: 00000000 -> 0x00011043
12:57:40 networkd[1449]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:57:40 networkd[1449]: bridge0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: link is up
12:57:40 networkd[1449]: bridge0: carrier on
12:57:40 networkd[1449]: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: acquiring DHCPv4 lease
12:57:40 networkd[1449]: DHCP CLIENT: STARTED
12:57:40 networkd[1449]: bridge0: link status updated: 00000000 ->
0x00011043
12:57:40 networkd[1449]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.34 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:57:40 networkd[1449]: DHCP CLIENT: DISCOVER
12:57:40 networkd[1449]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.34
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:57:40 networkd[1449]: bridge0: netdev ready
12:57:40 networkd[1449]: bridge0: enslaving link 'enp3s0'
12:57:40 networkd[1449]: enp3s0: enslaved
12:57:40 networkd[1449]: enp3s0: bringing link up
12:57:40 networkd[1449]: enp3s0: link configured
12:57:40 networkd[1449]: DHCP CLIENT: OFFER
12:57:40 networkd[1449]: DHCP CLIENT: REQUEST
12:57:40 networkd[1449]: DHCP CLIENT: ACK
12:57:40 networkd[1449]: bridge0: DHCPv4 address 192.168.2.35/24 via
192.168.2.1
12:57:40 networkd[1449]: bridge0: setting addresses
12:57:40 networkd[1449]: bridge0: addresses set
12:57:40 networkd[1449]: bridge0: setting routes
12:57:40 networkd[1449]: bridge0: routes set
12:57:40 networkd[1449]: bridge0: link configured
poma
Tom Gundersen
2014-03-20 19:29:22 UTC
Permalink
Post by Tom Gundersen
Post by poma
Still the same issue, DHCPC starts too early, before the correct MAC
address is set for the bridge.
git 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14
I haven't yet gotten around to this. We probably should just restart
the dhcp client if the mac address changes, for whatever reason.
Unless anyone else has a better idea.
Adding Umut as well as this problem is the same in sd-ipv4ll.

I have now shuffled the code around a bit in git to give a clearer
error message when this problem is encountered. The underlying problem
remains though.

My proposal is:

Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.

Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).

Umut, Patrik, what do you think?

Cheers,

Tom
Post by Tom Gundersen
Post by poma
journalctl -b -u systemd-networkd
...
12:51:55 networkd[579]: timestamp of '/etc/systemd/network' changed
12:51:55 networkd[579]: timestamp of '/run/systemd/network' changed
12:51:55 networkd[579]: bridge0: creating netdev
12:51:55 networkd[579]: enp1s6: link (with ifindex 2) added
12:51:55 networkd[579]: enp1s9: link (with ifindex 3) added
12:51:55 networkd[579]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:51:55 networkd[579]: enp3s0: requesting link status
12:51:55 networkd[579]: enp3s0: enslaving by 'bridge0'
12:51:55 networkd[579]: enp3s0: link (with ifindex 4) added
12:51:55 networkd[579]: lo: link (with ifindex 1) added
12:51:55 networkd[579]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:51:55 networkd[579]: bridge0: requesting link status
12:51:55 networkd[579]: bridge0: bringing link up
12:51:55 networkd[579]: bridge0: link (with ifindex 5) added
12:51:55 networkd[579]: bridge0: netdev ready
12:51:55 networkd[579]: bridge0: enslaving link 'enp3s0'
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: enp3s0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link is up
12:51:55 networkd[579]: bridge0: carrier on
12:51:55 networkd[579]: DHCP CLIENT: set MAC address to 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:55 networkd[579]: DHCP CLIENT: STARTED
12:51:55 networkd[579]: bridge0: link status updated: 0x00001002 ->
0x00011043
12:51:55 networkd[579]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.6 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:51:55 networkd[579]: DHCP CLIENT: DISCOVER
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.6
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: carrier off
12:51:55 networkd[579]: DHCP CLIENT: STOPPED
12:51:56 networkd[579]: bridge0: link status updated: 0x00011043 ->
0x00001043
12:51:56 networkd[579]: enp3s0: enslaved
12:51:56 networkd[579]: enp3s0: bringing link up
12:51:56 networkd[579]: enp3s0: link configured
12:51:56 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: bridge0: link status updated: 0x00001043 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: enp3s0: link is up
12:51:56 networkd[579]: enp3s0: link status updated: 0x00001002 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: carrier on
12:51:57 networkd[579]: enp3s0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: carrier on
12:51:57 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:57 networkd[579]: DHCP CLIENT: STARTED
12:51:57 networkd[579]: bridge0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: DHCP CLIENT: DISCOVER
12:51:59 networkd[579]: DHCP CLIENT: DISCOVER
12:52:02 networkd[579]: DHCP CLIENT: DISCOVER
12:52:07 networkd[579]: DHCP CLIENT: DISCOVER
12:52:12 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:52:16 networkd[579]: DHCP CLIENT: DISCOVER
12:52:32 networkd[579]: DHCP CLIENT: DISCOVER
12:52:55 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:52:56 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: DISCOVER
12:54:08 networkd[579]: DHCP CLIENT: DISCOVER
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:55:13 networkd[579]: DHCP CLIENT: DISCOVER
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:18 networkd[579]: DHCP CLIENT: DISCOVER
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:57:08 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:57:13 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:57:22 networkd[579]: DHCP CLIENT: DISCOVER
...
systemctl restart systemd-networkd
...
12:57:40 systemd[1]: Stopping Network Service...
12:57:40 networkd[579]: Received SIGTERM from PID 1 (systemd).
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: DHCP CLIENT: STOPPED
12:57:40 systemd[1]: Starting Network Service...
12:57:40 networkd[1449]: timestamp of '/etc/systemd/network' changed
12:57:40 networkd[1449]: timestamp of '/run/systemd/network' changed
12:57:40 networkd[1449]: bridge0: creating netdev
12:57:40 networkd[1449]: enp1s6: link (with ifindex 2) added
12:57:40 networkd[1449]: enp1s9: link (with ifindex 3) added
12:57:40 networkd[1449]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:57:40 networkd[1449]: enp3s0: requesting link status
12:57:40 networkd[1449]: enp3s0: enslaving by 'bridge0'
12:57:40 networkd[1449]: enp3s0: link (with ifindex 4) added
12:57:40 networkd[1449]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:57:40 networkd[1449]: bridge0: requesting link status
12:57:40 networkd[1449]: bridge0: bringing link up
12:57:40 networkd[1449]: bridge0: link (with ifindex 5) added
12:57:40 networkd[1449]: lo: link (with ifindex 1) added
12:57:40 networkd[1449]: bridge0: requesting netdev status
12:57:40 networkd[1449]: enp3s0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: enp3s0: link is up
12:57:40 networkd[1449]: enp3s0: carrier on
12:57:40 systemd[1]: Started Network Service.
12:57:40 networkd[1449]: enp3s0: link status updated: 00000000 -> 0x00011043
12:57:40 networkd[1449]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:57:40 networkd[1449]: bridge0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: link is up
12:57:40 networkd[1449]: bridge0: carrier on
12:57:40 networkd[1449]: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: acquiring DHCPv4 lease
12:57:40 networkd[1449]: DHCP CLIENT: STARTED
12:57:40 networkd[1449]: bridge0: link status updated: 00000000 ->
0x00011043
12:57:40 networkd[1449]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.34 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:57:40 networkd[1449]: DHCP CLIENT: DISCOVER
12:57:40 networkd[1449]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.34
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:57:40 networkd[1449]: bridge0: netdev ready
12:57:40 networkd[1449]: bridge0: enslaving link 'enp3s0'
12:57:40 networkd[1449]: enp3s0: enslaved
12:57:40 networkd[1449]: enp3s0: bringing link up
12:57:40 networkd[1449]: enp3s0: link configured
12:57:40 networkd[1449]: DHCP CLIENT: OFFER
12:57:40 networkd[1449]: DHCP CLIENT: REQUEST
12:57:40 networkd[1449]: DHCP CLIENT: ACK
12:57:40 networkd[1449]: bridge0: DHCPv4 address 192.168.2.35/24 via
192.168.2.1
12:57:40 networkd[1449]: bridge0: setting addresses
12:57:40 networkd[1449]: bridge0: addresses set
12:57:40 networkd[1449]: bridge0: setting routes
12:57:40 networkd[1449]: bridge0: routes set
12:57:40 networkd[1449]: bridge0: link configured
poma
Umut Tezduyar Lindskog
2014-03-21 07:51:43 UTC
Permalink
Post by Tom Gundersen
Post by Tom Gundersen
Post by poma
Still the same issue, DHCPC starts too early, before the correct MAC
address is set for the bridge.
git 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14
I haven't yet gotten around to this. We probably should just restart
the dhcp client if the mac address changes, for whatever reason.
Unless anyone else has a better idea.
Adding Umut as well as this problem is the same in sd-ipv4ll.
I have now shuffled the code around a bit in git to give a clearer
error message when this problem is encountered. The underlying problem
remains though.
Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.
Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).
Umut, Patrik, what do you think?
I think it is absolutely necessary to restart ipv4ll because ipv4ll
checks for address collisions based on the link's mac address.

Is there a specific reason why you don't prefer using the APIs in
manager instead of library making decisions.

ex: stop_ipv4ll, set_mac, start_ipv4ll.

Thanks,
Umut
Post by Tom Gundersen
Cheers,
Tom
Post by Tom Gundersen
Post by poma
journalctl -b -u systemd-networkd
...
12:51:55 networkd[579]: timestamp of '/etc/systemd/network' changed
12:51:55 networkd[579]: timestamp of '/run/systemd/network' changed
12:51:55 networkd[579]: bridge0: creating netdev
12:51:55 networkd[579]: enp1s6: link (with ifindex 2) added
12:51:55 networkd[579]: enp1s9: link (with ifindex 3) added
12:51:55 networkd[579]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:51:55 networkd[579]: enp3s0: requesting link status
12:51:55 networkd[579]: enp3s0: enslaving by 'bridge0'
12:51:55 networkd[579]: enp3s0: link (with ifindex 4) added
12:51:55 networkd[579]: lo: link (with ifindex 1) added
12:51:55 networkd[579]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:51:55 networkd[579]: bridge0: requesting link status
12:51:55 networkd[579]: bridge0: bringing link up
12:51:55 networkd[579]: bridge0: link (with ifindex 5) added
12:51:55 networkd[579]: bridge0: netdev ready
12:51:55 networkd[579]: bridge0: enslaving link 'enp3s0'
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: enp3s0: link status updated: 00000000 -> 0x00001002
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: link is up
12:51:55 networkd[579]: bridge0: carrier on
12:51:55 networkd[579]: DHCP CLIENT: set MAC address to 96:c0:ae:06:29:ce
12:51:55 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:55 networkd[579]: DHCP CLIENT: STARTED
12:51:55 networkd[579]: bridge0: link status updated: 0x00001002 ->
0x00011043
12:51:55 networkd[579]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.6 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:51:55 networkd[579]: DHCP CLIENT: DISCOVER
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.6
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 96:c0:ae:06:29:ce
12:51:55 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:55 networkd[579]: bridge0: carrier off
12:51:55 networkd[579]: DHCP CLIENT: STOPPED
12:51:56 networkd[579]: bridge0: link status updated: 0x00011043 ->
0x00001043
12:51:56 networkd[579]: enp3s0: enslaved
12:51:56 networkd[579]: enp3s0: bringing link up
12:51:56 networkd[579]: enp3s0: link configured
12:51:56 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: bridge0: link status updated: 0x00001043 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:56 networkd[579]: enp3s0: link is up
12:51:56 networkd[579]: enp3s0: link status updated: 0x00001002 ->
0x00001003
12:51:56 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: carrier on
12:51:57 networkd[579]: enp3s0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: MAC address: 00:12:34:56:78:30
12:51:57 networkd[579]: bridge0: carrier on
12:51:57 networkd[579]: bridge0: acquiring DHCPv4 lease
12:51:57 networkd[579]: DHCP CLIENT: STARTED
12:51:57 networkd[579]: bridge0: link status updated: 0x00001003 ->
0x00011043
12:51:57 networkd[579]: DHCP CLIENT: DISCOVER
12:51:59 networkd[579]: DHCP CLIENT: DISCOVER
12:52:02 networkd[579]: DHCP CLIENT: DISCOVER
12:52:07 networkd[579]: DHCP CLIENT: DISCOVER
12:52:12 networkd[579]: enp3s0: MAC address: 00:12:34:56:78:30
12:52:16 networkd[579]: DHCP CLIENT: DISCOVER
12:52:32 networkd[579]: DHCP CLIENT: DISCOVER
12:52:55 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:52:56 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:53:03 networkd[579]: DHCP CLIENT: DISCOVER
12:54:08 networkd[579]: DHCP CLIENT: DISCOVER
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:55:02 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:55:10 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:55:13 networkd[579]: DHCP CLIENT: DISCOVER
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:55:18 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:18 networkd[579]: DHCP CLIENT: DISCOVER
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:47 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:56:48 networkd[579]: DHCP CLIENT: ignoring packet: to port 1900,
which is not the DHCP client port (68)
12:57:08 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (4476) by UDP header
12:57:13 networkd[579]: DHCP CLIENT: ignoring packet: packet (32 bytes)
smaller than expected (5656) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (61459) by UDP header
12:57:15 networkd[579]: DHCP CLIENT: ignoring packet: packet (28 bytes)
smaller than expected (57364) by UDP header
12:57:22 networkd[579]: DHCP CLIENT: DISCOVER
...
systemctl restart systemd-networkd
...
12:57:40 systemd[1]: Stopping Network Service...
12:57:40 networkd[579]: Received SIGTERM from PID 1 (systemd).
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: Assertion 's->event->state != SD_EVENT_FINISHED'
failed at ../src/libsystemd/sd-event/sd-event.c:1229, function
sd_event_source_set_enabled(). Ignoring.
12:57:40 networkd[579]: DHCP CLIENT: STOPPED
12:57:40 systemd[1]: Starting Network Service...
12:57:40 networkd[1449]: timestamp of '/etc/systemd/network' changed
12:57:40 networkd[1449]: timestamp of '/run/systemd/network' changed
12:57:40 networkd[1449]: bridge0: creating netdev
12:57:40 networkd[1449]: enp1s6: link (with ifindex 2) added
12:57:40 networkd[1449]: enp1s9: link (with ifindex 3) added
12:57:40 networkd[1449]: enp3s0: found matching network
'/etc/systemd/network/base0.network'
12:57:40 networkd[1449]: enp3s0: requesting link status
12:57:40 networkd[1449]: enp3s0: enslaving by 'bridge0'
12:57:40 networkd[1449]: enp3s0: link (with ifindex 4) added
12:57:40 networkd[1449]: bridge0: found matching network
'/etc/systemd/network/bridge0dhcp.network'
12:57:40 networkd[1449]: bridge0: requesting link status
12:57:40 networkd[1449]: bridge0: bringing link up
12:57:40 networkd[1449]: bridge0: link (with ifindex 5) added
12:57:40 networkd[1449]: lo: link (with ifindex 1) added
12:57:40 networkd[1449]: bridge0: requesting netdev status
12:57:40 networkd[1449]: enp3s0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: enp3s0: link is up
12:57:40 networkd[1449]: enp3s0: carrier on
12:57:40 systemd[1]: Started Network Service.
12:57:40 networkd[1449]: enp3s0: link status updated: 00000000 -> 0x00011043
12:57:40 networkd[1449]: Sent message type=method_call sender=n/a
destination=org.freedesktop.DBus object=/org/freedesktop/DBus
interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0
error=n/a
12:57:40 networkd[1449]: bridge0: MAC address: 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: link is up
12:57:40 networkd[1449]: bridge0: carrier on
12:57:40 networkd[1449]: DHCP CLIENT: set MAC address to 00:12:34:56:78:30
12:57:40 networkd[1449]: bridge0: acquiring DHCPv4 lease
12:57:40 networkd[1449]: DHCP CLIENT: STARTED
12:57:40 networkd[1449]: bridge0: link status updated: 00000000 ->
0x00011043
12:57:40 networkd[1449]: Got message type=method_return
sender=org.freedesktop.DBus destination=:1.34 object=n/a interface=n/a
member=n/a cookie=1 reply_cookie=1 error=n/a
12:57:40 networkd[1449]: DHCP CLIENT: DISCOVER
12:57:40 networkd[1449]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.34
object=/org/freedesktop/DBus interface=org.freedesktop.DBus
member=NameAcquired cookie=2 reply_cookie=0 error=n/a
12:57:40 networkd[1449]: bridge0: netdev ready
12:57:40 networkd[1449]: bridge0: enslaving link 'enp3s0'
12:57:40 networkd[1449]: enp3s0: enslaved
12:57:40 networkd[1449]: enp3s0: bringing link up
12:57:40 networkd[1449]: enp3s0: link configured
12:57:40 networkd[1449]: DHCP CLIENT: OFFER
12:57:40 networkd[1449]: DHCP CLIENT: REQUEST
12:57:40 networkd[1449]: DHCP CLIENT: ACK
12:57:40 networkd[1449]: bridge0: DHCPv4 address 192.168.2.35/24 via
192.168.2.1
12:57:40 networkd[1449]: bridge0: setting addresses
12:57:40 networkd[1449]: bridge0: addresses set
12:57:40 networkd[1449]: bridge0: setting routes
12:57:40 networkd[1449]: bridge0: routes set
12:57:40 networkd[1449]: bridge0: link configured
poma
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Tom Gundersen
2014-03-21 10:41:06 UTC
Permalink
On Fri, Mar 21, 2014 at 8:51 AM, Umut Tezduyar Lindskog
Post by Umut Tezduyar Lindskog
Post by Tom Gundersen
Post by Tom Gundersen
Post by poma
Still the same issue, DHCPC starts too early, before the correct MAC
address is set for the bridge.
git 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14
I haven't yet gotten around to this. We probably should just restart
the dhcp client if the mac address changes, for whatever reason.
Unless anyone else has a better idea.
Adding Umut as well as this problem is the same in sd-ipv4ll.
I have now shuffled the code around a bit in git to give a clearer
error message when this problem is encountered. The underlying problem
remains though.
Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.
Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).
Umut, Patrik, what do you think?
I think it is absolutely necessary to restart ipv4ll because ipv4ll
checks for address collisions based on the link's mac address.
Is there a specific reason why you don't prefer using the APIs in
manager instead of library making decisions.
We could do either, but I thought it would be nicer to keep the magic
hidden in the library if possible.

-t
Patrik Flykt
2014-03-21 08:57:16 UTC
Permalink
Post by Tom Gundersen
Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.
Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).
Umut, Patrik, what do you think?
Yes, let's fix the library to take care of a changing MAC address.

Cheers,

Patrik
Tom Gundersen
2014-03-21 18:02:40 UTC
Permalink
On Fri, Mar 21, 2014 at 9:57 AM, Patrik Flykt
Post by Patrik Flykt
Post by Tom Gundersen
Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.
Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).
Umut, Patrik, what do you think?
Yes, let's fix the library to take care of a changing MAC address.
I now made this change in git for both libraries.

It seems to me that the kernel could behave better when enslaving
devices to a bridge (i.e., bring down the bridge before changing its
mac address, rather than first changing the mac address and then bring
the bridge down/up), but this should be fairly robust from our side,
regardless of what the kernel does.

Cheers,

Tom
Umut Tezduyar Lindskog
2014-03-21 18:41:57 UTC
Permalink
Post by Tom Gundersen
On Fri, Mar 21, 2014 at 9:57 AM, Patrik Flykt
Post by Patrik Flykt
Post by Tom Gundersen
Whenever the MAC address changes under us networkd calls
sd_{dhcp_client,ipv4ll}_set_mac(), and it is the libs' responsibility
to then do the right thing.
Currently the libs don't support this and will fail with EBUSY, so I
suggest we change that into letting them restart themselves
internally, and send out notifications that the lease has been lost
(so networkd will drop the addresses correctly, if it has any
assigned).
Umut, Patrik, what do you think?
Yes, let's fix the library to take care of a changing MAC address.
I now made this change in git for both libraries.
Thanks for making the change.
Post by Tom Gundersen
It seems to me that the kernel could behave better when enslaving
devices to a bridge (i.e., bring down the bridge before changing its
mac address, rather than first changing the mac address and then bring
the bridge down/up), but this should be fairly robust from our side,
regardless of what the kernel does.
Cheers,
Tom
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
poma
2014-03-20 21:04:46 UTC
Permalink
Post by Tom Gundersen
I haven't yet gotten around to this. We probably should just restart
the dhcp client if the mac address changes, for whatever reason.
Unless anyone else has a better idea.
Cheers,
Tom
Nobody's perfect.
- NetworkManager - bridge dhcp
http://goo.gl/Zm5Rts
- systemd-networkd - bridge dhcp
http://goo.gl/iodPmA
Good luck with dhcpc circus.


poma
poma
2014-03-22 04:06:49 UTC
Permalink
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526


poma
Tom Gundersen
2014-03-22 09:41:04 UTC
Permalink
Post by poma
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526
Thanks for reporting back.

Cheers,

Tom
Henrik /KaarPoSoft
2014-04-13 22:12:44 UTC
Permalink
Post by Tom Gundersen
Post by poma
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526
Thanks for reporting back.
Cheers,
Tom
Dear all,

I started this thread about a month ago,
having some trouble with DHCP on a bridge.

Tom Gundersen worked his magic, and on
Fri Mar 21 21:53:15 2014
I reported that everything worked fine out of
the (then) current git.
Sorry, but I did not note the exact commit sha )-:

I have been using this git version since then without problems.

Now I have upgraded to 212,
and systemd-networkd bridge with DHCP is *NOT* working for me.

See attached config and log.

Any help and hints would be most appreciated.

/Henrik
Tom Gundersen
2014-04-13 22:34:29 UTC
Permalink
On Mon, Apr 14, 2014 at 12:12 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
Post by poma
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526
Thanks for reporting back.
Cheers,
Tom
Dear all,
I started this thread about a month ago,
having some trouble with DHCP on a bridge.
Tom Gundersen worked his magic, and on
Fri Mar 21 21:53:15 2014
I reported that everything worked fine out of
the (then) current git.
I have been using this git version since then without problems.
Now I have upgraded to 212,
and systemd-networkd bridge with DHCP is *NOT* working for me.
See attached config and log.
Any help and hints would be most appreciated.
I'm pretty sure this problem was caused by d39ed and fixed by 20861.

If the problem persists in current git (should not, but I have had a
hard time reproducing this, so even though my tests pass it may),
could you paste the same logs with an up-to-date checkout? (You can
recompile and just pick out the systemd-networkd binary, shouldn't
need to upgrade all of systemd if you don't want to).

Thanks for reporting and sorry for the inconvenience.

Cheers,

Tom
Tom Gundersen
2014-04-14 07:12:05 UTC
Permalink
On Mon, Apr 14, 2014 at 1:17 AM, Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Apr 14, 2014 at 12:12 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
Post by poma
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526
Thanks for reporting back.
Cheers,
Tom
Dear all,
I started this thread about a month ago,
having some trouble with DHCP on a bridge.
Tom Gundersen worked his magic, and on
Fri Mar 21 21:53:15 2014
I reported that everything worked fine out of
the (then) current git.
I have been using this git version since then without problems.
Now I have upgraded to 212,
and systemd-networkd bridge with DHCP is *NOT* working for me.
See attached config and log.
Any help and hints would be most appreciated.
I'm pretty sure this problem was caused by d39ed and fixed by 20861.
If the problem persists in current git (should not, but I have had a
hard time reproducing this, so even though my tests pass it may),
could you paste the same logs with an up-to-date checkout? (You can
recompile and just pick out the systemd-networkd binary, shouldn't
need to upgrade all of systemd if you don't want to).
Thanks for reporting and sorry for the inconvenience.
Cheers,
Tom
git a163b64c4b08e8a4ad39a9a295acf3d1634024a3
works like a charm, thank you!
log attached
Great. Thanks!

Cheers,

Tom
Henrik /KaarPoSoft
2014-06-02 16:39:23 UTC
Permalink
Post by Tom Gundersen
On Mon, Apr 14, 2014 at 1:17 AM, Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Apr 14, 2014 at 12:12 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
Post by poma
systemd-networkd bridge dhcp OK
https://bugzilla.redhat.com/attachment.cgi?id=877526
Thanks for reporting back.
Cheers,
Tom
Dear all,
I started this thread about a month ago,
having some trouble with DHCP on a bridge.
Tom Gundersen worked his magic, and on
Fri Mar 21 21:53:15 2014
I reported that everything worked fine out of
the (then) current git.
I have been using this git version since then without problems.
Now I have upgraded to 212,
and systemd-networkd bridge with DHCP is *NOT* working for me.
See attached config and log.
Any help and hints would be most appreciated.
I'm pretty sure this problem was caused by d39ed and fixed by 20861.
If the problem persists in current git (should not, but I have had a
hard time reproducing this, so even though my tests pass it may),
could you paste the same logs with an up-to-date checkout? (You can
recompile and just pick out the systemd-networkd binary, shouldn't
need to upgrade all of systemd if you don't want to).
Thanks for reporting and sorry for the inconvenience.
Cheers,
Tom
git a163b64c4b08e8a4ad39a9a295acf3d1634024a3
works like a charm, thank you!
log attached
Great. Thanks!
Cheers,
Tom
I am happy to note, that this now works in v 213.

For reference, my script:
http://sourceforge.net/p/kaarpux/code/ci/v4.3.1/tree/master/expert/create_bridge.sh

Thank you very much !!!!

/Henrik

Tom Gundersen
2014-03-21 18:03:23 UTC
Permalink
On Tue, Mar 18, 2014 at 10:38 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Tue, Mar 18, 2014 at 10:00 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
/Henrik
cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF
And now I get an IP address by DHCP, and I have connectivity.
But hard-coding the MAC is hardly a viable long-term solution...
Yeah, that's not going to fly.
Could you attach the full debug output of a failing run? To get it,
you probably want to stop systemd-networkd, "ip link del" the bridge,
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
I think I understand what's going on, but I'd like to have it verified
before changing anything.
Cheers,
Tom
I guess running from the commandline should not be necessary since I have
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
in
/etc/systemd/system/systemd-networkd.service.d/debug.conf
Hi Henrik,

Thanks for the bug report. Could you try again with current git to see
if the problem is now solved for you?

Cheers,

Tom
Henrik /KaarPoSoft
2014-03-21 20:47:44 UTC
Permalink
Post by Tom Gundersen
On Tue, Mar 18, 2014 at 10:38 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Tue, Mar 18, 2014 at 10:00 AM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Post by Tom Gundersen
On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
Hi Tom,
Thanks for your feedback...
I was briefly looking through git commits after 211 without finding anything
related. But then again I did not look into too much detail.
Do you know which commit would solve this?
Ah, this was not obvious at all. This was almost certainly fixed as a
side-effect of refactoring the rtnl_message_read_*() code, so if you
pull in 9842de0d93d and the commits it relies on that should do it (I
haven't verified that that's the culprit, but it seems likely from
looking at it).
Cheers,
Tom
Tom,
As far as I can see, 9842de0d93d was already included in 211.
I have rebuild my systemd from the head of git 4dd5da7f.
/Henrik
cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF
And now I get an IP address by DHCP, and I have connectivity.
But hard-coding the MAC is hardly a viable long-term solution...
Yeah, that's not going to fly.
Could you attach the full debug output of a failing run? To get it,
you probably want to stop systemd-networkd, "ip link del" the bridge,
# SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
I think I understand what's going on, but I'd like to have it verified
before changing anything.
Cheers,
Tom
I guess running from the commandline should not be necessary since I have
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
in
/etc/systemd/system/systemd-networkd.service.d/debug.conf
Hi Henrik,
Thanks for the bug report. Could you try again with current git to see
if the problem is now solved for you?
Cheers,
Tom
Tom,

THANK YOU VERY MUCH!

Yes, it works now for me.

Logs attached.

I was busy with something else, so only watched the list and git with
half an eye.
However, I find it disturbing that DHCP is attempted first on the
"wrong" MAC, only to be killed and restarted on the "right" MAC.
Is this really the best way of solving this ???

/Henrik
Tom Gundersen
2014-03-21 21:15:04 UTC
Permalink
On Fri, Mar 21, 2014 at 9:47 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
THANK YOU VERY MUCH!
Yes, it works now for me.
Logs attached.
Awesome, thank's for testing!
Post by Henrik /KaarPoSoft
I was busy with something else, so only watched the list and git with half
an eye.
However, I find it disturbing that DHCP is attempted first on the "wrong"
MAC, only to be killed and restarted on the "right" MAC.
Is this really the best way of solving this ???
Well, I couldn't come up with anything better at the moment. But
suggestions welcome of course.

What we should keep in mind here though is that we never know when all
the device that should be enslaved by a bridge have appeared, so we
never know when the bridge has received its final mac address.
Moreover, if devices are removed from the bridge, the mac address may
change again, so we anyway need to be able to handle this case.

What we could do is to force the mac address when creating the bridge
to one we invent ourselves, which (if I read the kernel code
correctly) should then become permanent. However, we still need to
deal with the address changing if the bridge was not created by us.
And if people are actually relying on the kernel's logic of using one
of the slave macs as the bridge mac that would obviously break...

-t
Tom Gundersen
2014-04-21 16:45:12 UTC
Permalink
Post by Tom Gundersen
On Fri, Mar 21, 2014 at 9:47 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
However, I find it disturbing that DHCP is attempted first on the "wrong"
MAC, only to be killed and restarted on the "right" MAC.
Is this really the best way of solving this ???
[...]
Post by Tom Gundersen
What we could do is to force the mac address when creating the bridge
to one we invent ourselves, which (if I read the kernel code
correctly) should then become permanent.
I have now implemented this in git, so things should look much better
in the next release. At least when the bridges are wholly managed by
us.

Cheers,

Tom
Tom Gundersen
2014-04-21 20:16:22 UTC
Permalink
Post by Tom Gundersen
Post by Tom Gundersen
On Fri, Mar 21, 2014 at 9:47 PM, Henrik /KaarPoSoft
Post by Henrik /KaarPoSoft
However, I find it disturbing that DHCP is attempted first on the "wrong"
MAC, only to be killed and restarted on the "right" MAC.
Is this really the best way of solving this ???
[...]
Post by Tom Gundersen
What we could do is to force the mac address when creating the bridge
to one we invent ourselves, which (if I read the kernel code
correctly) should then become permanent.
I have now implemented this in git, so things should look much better
in the next release. At least when the bridges are wholly managed by
us.
I spoke too soon. Had to revert that again due to kernel bug... We'll
try again when that gets sorted :)

Cheers,

Tom
Continue reading on narkive:
Loading...