Fedora 36 workstation. impossible to get ip address from dhcp server when using ethernet interface

I have a dual boot laptop running windows 10 pro and fedora 36 workstation.
for some reason when I connect the ethernet cable to a gateway the wired interface is not able to reach the dhcp server.
I sniffed the packages using tcpdump and wireshark and I see that the dhcp requests packets do not reach the dhcp server (openwrt router).
the laptop is connected to a netgear router running in wireless AP mode.
But if I boot on windows or if i conntec to this router other devices like a raspberry pi I am able to obtain an ip address.
why is linux not even able to get the ip address?
I also use wifi so switchiting to system-networkd is not an option

here is the output of nmcli conn show of the Wired connection:

onnection.id:                          Wired connection 1
connection.uuid:                        1e95b633-9af1-3485-ac8e-309fce13d32d
connection.stable-id:                   --
connection.type:                        802-3-ethernet
connection.interface-name:              enp62s0u1
connection.autoconnect:                 yes
connection.autoconnect-priority:        -999
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1678560116
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
connection.dns-over-tls:                -1 (default)
connection.wait-device-timeout:         -1
802-3-ethernet.port:                    --
802-3-ethernet.speed:                   0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          no
802-3-ethernet.mac-address:             --
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.mac-address-blacklist:   --
802-3-ethernet.mtu:                     auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:             default
802-3-ethernet.wake-on-lan-password:    --
802-3-ethernet.accept-all-mac-addresses:-1 (default)
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       --
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.routing-rules:                     --
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-iaid:                         --
ipv4.dhcp-timeout:                      2147483647 (infinity)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.dhcp-hostname-flags:               0x0 (none)
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.required-timeout:                  -1 (default)
ipv4.dad-timeout:                       -1 (default)
ipv4.dhcp-vendor-class-identifier:      --
ipv4.dhcp-reject-servers:               --
ipv6.method:                            auto
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       --
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.routing-rules:                     --
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.required-timeout:                  -1 (default)
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.ra-timeout:                        0 (default)
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
ipv6.dhcp-timeout:                      0 (default)
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.dhcp-hostname-flags:               0x0 (none)
ipv6.token:                             --
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
GENERAL.NAME:                           Wired connection 1
GENERAL.UUID:                           1e95b633-9af1-3485-ac8e-309fce13d32d
GENERAL.DEVICES:                        enp62s0u1
GENERAL.IP-IFACE:                       --
GENERAL.STATE:                          activating
GENERAL.DEFAULT:                        no
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/5
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --

I am however able to obtain an ip address using wifi.
the question is why linux and only linux is not able to obtain an ip address while hardwired?

I tried to troubleshoot with wireshark and with nmap scripts but nothing works… the dhcp packet do not reach the dhcp server when on linux and using the wired connection.
I tested with fedora 37 live cd and with kali linux and its the same issue. no ip on wired connection.
something related to hops and network manager perhaps?

You said that other devices are able to connect. I assume that means they also connect with the ethernet port and not wifi.

If so then it seems specific to that laptop and may be a cable, the ethernet adapter on the laptop, or some config within the laptop.

This implies you have 2 routers. One is the netgear that you are directly connecting to and the other is the actual gateway that is acting as the dhcp server.

What mode is the netgear using. Is it an actual independent AP or is it acting as a wifi repeater (range extender)? and simply relaying connections through to the gateway.

Where did you sniff the packets? At the gateway router, at the port on the netgear (both sides), on the port at the laptop?

It is critical to know exactly where the break in communications is occurring to know what the cause is. If the connection request is reaching the gateway (dhcp server) but the reply is not returning that is different than the request never reaching the gateway router (for whatever reason).

]If it were the cable of network adapter it would not work when i boot said laptop in windows.

other devices also connect with ethernet and get an IP

the netgear is a router running in AP mode. and it is simply relaying connection through. the main router which is connected to the internet does not have wifi.

I sniffed the packet both in the dhcp server and in the laptop.
the request is clearly not reaching the dhcp server when running linux.
If i connect directly the laptop to the dhcp server i get the ip.
One could assume that dhcp passthrough is disabled in the lan interfaces of the netgear but then why other devices and operating systems different than linux can reach the dhcp server?

I don’t know how to sniff packet on both sides of the netgear port.

If possible, let’s rule out (or confirm) DHCP as the problem. Does it work if you provide a static IP?

Do you know what the hardware is? (What does inxi -n show?)

yes static ip works.

here is the output of the command:

  Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
    driver: ath10k_pci
  IF: wlp2s0 state: down mac: 92:40:0b:09:78:c5
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152
  IF: enp62s0u1 state: up speed: 1000 Mbps duplex: full
    mac: c0:56:27:f2:e3:93

i cannot emphazise enough… it works on windows with the same hardware cables. etc.


Huh — this is a weird one!

What is the value of dhcp in the Main section of the Network Manager config? It defaults to ‘internal’ but can be one of dhclient, dhcpcd, or internal.

I’m curious if a different client has different behavior. (You may need to install the corresponding package.)

there is nothing in the main section:


That means it is using the default — try adding dhcp=dhclient. Make sure the dhclient package is installed, and reload NetworkManager.

This isn’t guaranteed to work, but it it’ll be interesting at least. The internal client isn’t as full-featured and maybe there is some situation here it can’t handle…

it did work.
i am able to get the IP address!!!

thank you.
now should I put this dhcp line in a conf.d directory to prevent being overwritten by future upgrades of Network Manager.

doesn’t wifi uses this NetworkManager setting?

Some network devices don’t get a “clean” configuration in linux if they were previously initialized by Windows or maybe BIOS netboot support.

Have you tried booting into linux from power off condition?

Is Windows using “fastboot”?

1 Like

the issue has been solved by adding a configuration file.

I did shutdown the computer and restart. tried different linux distributions from a live boot usb. impossible to get a ip from ethernet.

the issue seems to be related to the netgear router in wireless AP mode? perhaps id added a hop that the internal dhcp could not handle.

what baffles me is that wifi was not affected.

Yeah — it’s a “global” NetworkManager option, so it will change them both.

Yeah, definitely strange. I’m not sure what’s going on… we could try to diagnose further if you want. As I understand it, your network looks like this:

     x x x xxxxxxxxxxxx
    x    xx            xx
 xxxx                   x
xx     Internet          x
x                      xx
  x  x                 xx
   xxxx             xxxx x
   +-------+-------+        +------------+
   |               |        |            |
   |    OpenWRT    +--------+   NetGear  |
   |    Router     |        |    AP      |
   |               |        |            |
   +---------------+        +-+----------+
                              |         .
                              |         .
                              |         .
                            wired        wifi
                          |                  |
                          |    Laptop        |
                          |                  |
                          |                  |

That is: you’re connecting through the Netgear AP either way. Correct?