Bug 1577670

Summary: Router does not detect correct MAC address from Fedora 28 OS
Product: [Fedora] Fedora Reporter: Gabriel Ostrolucký <gadelat>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 28CC: alexl, bgalvani, code, dcbw, dwmw2, fgiudici, john.j5live, lkundrak, mclasen, nmavrogi, rdieter, rhughes, rstrode, sandmann, thaller
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-21 07:40:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
router web gui
none
Fedora 28 wireshark
none
Ubuntu 18.04 wireshark
none
tshark fedora
none
ubuntu tshark
none
fedora tshark cold boot none

Description Gabriel Ostrolucký 2018-05-13 21:31:33 UTC
Created attachment 1435922 [details]
router web gui

I migrated from Ubuntu 17.10 to Fedora 28 KDE spin and now my router does not detect correct MAC address of my PC, which makes it impossible for me to set up static DHCP rules

Comment 1 Gabriel Ostrolucký 2018-05-16 23:21:33 UTC
Created attachment 1437689 [details]
Fedora 28 wireshark

Comment 2 Gabriel Ostrolucký 2018-05-16 23:22:07 UTC
Created attachment 1437690 [details]
Ubuntu 18.04 wireshark

Comment 3 Gabriel Ostrolucký 2018-05-16 23:37:20 UTC
So, I've run wireshark in Fedora 28 live USB and in Ubuntu 18.04 live USB. It works correctly in Ubuntu, works wrong in Fedora 28. Diff is basically this

16,17c16,17
<     Transaction ID: 0x454aa16f
<     Seconds elapsed: 0
---
>     Transaction ID: 0xa9c15853
>     Seconds elapsed: 3
32d31
<     Option: (61) Client identifier
33a33
>     Padding: 000000000000000000000000000000000000000000000000




network-manager in ubuntu: 1.10.6-2ubuntu1
NetworkManager in fedora: 1.10.6

dhcp-client in fedora: 4.3.6
isc-dhcp-client in ubuntu: 4.3.5-3ubuntu7

Comment 4 Beniamino Galvani 2018-05-17 06:34:15 UTC
The only relevant difference is the client-identifier. Can you please check how it looks like on the wire running again tshark with the "-x -V" options?

Comment 5 Gabriel Ostrolucký 2018-05-17 20:28:00 UTC
Created attachment 1438117 [details]
tshark fedora

Comment 6 Gabriel Ostrolucký 2018-05-17 20:34:49 UTC
Created attachment 1438119 [details]
ubuntu tshark

Comment 7 Gabriel Ostrolucký 2018-05-17 20:41:15 UTC
Created attachment 1438124 [details]
fedora tshark cold boot

Comment 8 Beniamino Galvani 2018-05-18 07:50:12 UTC
The DHCP client on Fedora sends a RFC4361 client-identifier, which your router wrongly consider as a MAC address. You could try to change the client identifier on the connection to look like a hardware address one, using this command:

nmcli con modify <connection-name> ipv4.dhcp-client-id 01:9c:eb:e8:07:d4:3f

where the last argument is '01:' followed by the interface MAC address. After this, try again to connect.

Comment 9 Gabriel Ostrolucký 2018-05-20 18:21:50 UTC
That solved it. After I rebooted. Until I rebooted, network stopped working.

Should we report this issue to upstream?

Comment 10 Beniamino Galvani 2018-05-21 07:40:45 UTC
(In reply to Gabriel Ostrolucký from comment #9)
> That solved it. After I rebooted. Until I rebooted, network stopped working.
> 
> Should we report this issue to upstream?

I don't think this is a bug. dhclient sends by default a client-identifier as specified by standards (RFC 4361). Apparently for some reason your router extracts the MAC from the client-id instead of looking at the actual MAC address.

In the upcoming version of NM (1.12, not released yet), it will be possible to globally set a mac-based client-id by adding the following:

[connection]
ipv4.dhcp-client-id=mac

to NM configuration, or to set it for each connection. See this:

https://bugzilla.gnome.org/show_bug.cgi?id=790660