Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 11 install does not have default gateway route?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Jibun no Kage
Posts: 5
Joined: 2021-09-28 01:59

Debian 11 install does not have default gateway route?

#1 Post by Jibun no Kage »

A bit of context, I am a 30 year IT career support person, with over 15 years experience with VMware, not to mention Hyper-V, KVM, etc. And I just built a Debian 11 based VM using VMware Player 16 on Windows 10, and it has no default gateway configured, even though I am using a valid DHCP server that is sending the gateway information request back to the VM. The physical NIC is in bridged mode, not using NAT, I have built 100s if not 1000s of VMs over the years, with various OSes, and this issue is driving me nuts... It is not common but not exactly in frequent, that Linux OS based VMs have some odd quirks at times. But this issue is being really stubborn to resolve.

Here is the VM Network configuration:
Physical Network Adapter.png
Physical Network Adapter.png (23.5 KiB) Viewed 5909 times
Here is the bridging configuration applicable to the above illustrated configuration:
Bridged Network Adapter Bridging.png
Bridged Network Adapter Bridging.png (7.5 KiB) Viewed 5909 times
Linux OS, Debian 11, configuration of NIC:
# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.154 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:0c:29:f5:40:3a txqueuelen 1000 (Ethernet)
RX packets 52602 bytes 63536259 (60.5 MiB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 8465 bytes 616235 (601.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 46 bytes 3914 (3.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 3914 (3.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Root issue, no pun, if lack of a default route:

# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33

# ping www.google.com
ping: connect: Network is unreachable

Running Raspbian OS on Pi, which is an ARM variant of Debian Buster, using the same DHCP server that the above device/configuration is using, receives the correct DHCP configuration including the default (gateway) route. As shown below.

Pi...

# ifconfig
enxb827ebc5e65c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
ether b8:27:eb:c5:e6:5c txqueuelen 1000 (Ethernet)
RX packets 893849 bytes 78340061 (74.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 760326 bytes 74150969 (70.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 743133 bytes 39014627 (37.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 743133 bytes 39014627 (37.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 202 0 0 enxb827ebc5e65c
192.168.1.0 0.0.0.0 255.255.255.0 U 202 0 0 enxb827ebc5e65c

So the question remains... why Debian 11 in a VMware VM is not getting a default gateway. So, as a validation test, I installed Debian 11 on true hardware, not in a VM, and sure enough the default gateway route from the common DHCP server, is present. So the issue is VMware Player on Windows 10 and specific to Debian 11, at least for the VM above. Time to create another VM and see if the issue is consistent.

The question is, has anyone else seem this odd behavior, in VMware Player on Windows 10 and attempting to install Debian 11?

afiadi
Posts: 12
Joined: 2021-07-22 11:57
Been thanked: 1 time

Re: Debian 11 install does not have default gateway route?

#2 Post by afiadi »

I think windows is too many bug,maybe in this case you get random bug from windows 10.
I sugest you can use linux environment to run linux in VM more reliable and less trouble. I use VMware workstation to install Debian Bullseye and use Virtual Network Editor to assign my wifi internal laptop as bridge network for Guest OS. look at my SS.
In the first SS, My Debian 11 VM can connect internet and has automatically ip gateway, because my wifi router I set to dhcp.
Image

And this SS I set my network guest os as bridge mode with vmnet0 interface
Image

Jibun no Kage
Posts: 5
Joined: 2021-09-28 01:59

Re: Debian 11 install does not have default gateway route?

#3 Post by Jibun no Kage »

Thanks for the response, quite interesting, however if you are using vmnet* you are not using physical NIC bridging as I did in my initial VM configuration. I am mirroring the host system NIC, this gives the VM more direct route to the hardware. This is not always desired or preferred, all depends on how you want your virtual network to be implemented. So we are not comparing the same configuration.

Here is my VM configuration applicable to VM NIC:
Physical Network Adapter Again.png
Physical Network Adapter Again.png (24.62 KiB) Viewed 5850 times
I have DHCP working fine for everything else in my home. All systems but the Debian 11 systems are getting the default gateway as expected, from my existing believed correct ISC DHCP Server, automatically, by default when using DHCP. Also... I rebuilt again, Debian 11 on hardware, not in a VM, and the first time, the default route seemed present. I then changed the connection to a different NIC on the same hardware, removed all connection profiles (the original one built at installation) and then let DHCP own the new connection on the different NIC... and the route was not established.

So... in my case:

1) Debian 11 in VM (VMware Player 16, latest, on Windows 10 fully patched/updated), initial install, no default gateway on installed OS boot. But NetInst installation did work as expected, no issues with finding and using NIC and ethernet to do the OS install.

2) Debian 11 on hardware, using NIC 1, the default route was established via DHCP, NIC 1 selected as part of the OS install. After removing the connection profile via NIC 1 via GUI in Network Manager, and creating a new profile on different physical NIC, i.e. NIC 2, on same system, no default route exists.

This tells me 3 things at this time:

1) This issue is not dependent on Windows 10
2) This issue is not dependent on virtualization, i.e. VMware Player 16, the physical NIC bridging by default tries to bridge all NICs, the Windows 10 host has multiple NICs.
3) This issue seems to be related on use of multiple physical NICs, or when multiple NICs present, visible to the Debian 11 OS

Next steps:

1) I am going to create a new VM, and make sure that the new VM can only see 1 physical NIC in the hardware NIC to VM NIC bridge configuration.

2) I am going to rebuilt the Debian 11 OS install on hardware using a selected NIC then change the selected NIC post install, so see if the behavior is consistent.

Will update this thread with what I discover in queue course. But all help, suggestions, comments, welcome of course.

Jibun no Kage
Posts: 5
Joined: 2021-09-28 01:59

Re: Debian 11 install does not have default gateway route?

#4 Post by Jibun no Kage »

Update:

I confirmed that the install of Debian 11 in a VM as noted above, does not by default establish a default gateway route. This behavior is consistent. This is not the behavior I recall under Debian 10, Raspbian OS based on Debian 10, etc.

Here is what I did:

1) Only VM VMX file customization was to set the BIOS delay to 10 seconds, i.e. 10000 milliseconds
2) Confirmed, configured VM can only see a single NIC, via VM BIOS configuration, using physical NIC bridging, not NAT or any other abstracted NIC features as noted above.
3) Used Graphical Install from Debian 11 NetInst AMD64 Disc ISO

Here is the result:

root@test:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33

root@test:~# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.154 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fef5:403a prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:f5:40:3a txqueuelen 1000 (Ethernet)
RX packets 588 bytes 78730 (76.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71 bytes 7724 (7.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 50 bytes 3968 (3.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 50 bytes 3968 (3.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I am staring to think that because the installation media installer, on NetIst ISO image, for example, is illustrating the behavior as well since the following warning is appearing during the installation:


4) Installation, Configure the Network, Network Configuration was successful. But no default route was
set warning? Why is this happening? So the (new) installer does not by default see external networks.
If this lack of default route is carried to the installed OS, that is a real problem. Answered No,
Because using NetInst ISO Image

5) Why is the installation asking to retry network autoconfiguration? The previous screen configured the
network configuration was successful? No other warnings are display about the network from this point forward
and all internet downloads work as expected.

No setting a default route during OS installation should have no impact on the setting of a default route in the installed OS, IMHO, if this is root cause for no default route established OS installation, this makes no sense to me at all.

Still have installation on actual hardware pending. Updates to follow.

Jibun no Kage
Posts: 5
Joined: 2021-09-28 01:59

Re: Debian 11 install does not have default gateway route?

#5 Post by Jibun no Kage »

Well, for those that find this topic interesting if not helpful, after some extensive testing, have found one solution to the missing default gateway route, when Debian 11 is installed in a VM via VMware Player 16.

Black listing the SMBus support, via blacklisting the i2c-piix4 driver, seems to allow the default route to be established via DHCP as expected. This in the past, the lack of SMBus support, which is evidenced in the boot log of the Linux VM, visible via dmesg, in the past has been a passive issue, that could be ignored.

Apparently, there is something in Debian 11 or a significant change between it and Debian 10, that the lack of an SMBus on a virtual machine, trips something up with the network configuration, or such?

Once I added a conf file under /etc/modprobe.d as say /etc/modprobe.d/i2c-piix4.conf, which includes the just the line 'blacklist i2c-piix4' then rebooted the VM. The default gateway route appeared as expected, desired.

Maybe someone that has extensive knowledge applicable, can explain why or how this appears to at least one possible work-around if not a solution? And, or, why this is an issue for Debian 11, but the SMBus enabled error was benign in the past?

afiadi
Posts: 12
Joined: 2021-07-22 11:57
Been thanked: 1 time

Re: Debian 11 install does not have default gateway route?

#6 Post by afiadi »

Oke I follow what you setup NIC in your VM in windows 10, I don’t use vmnet0 interface anymore, so my Vmware choose random between my 2 network interface one is ethernet and the other is wifi card, I don’t know what my VM choice.

And after I full booting and login in my Debian 11 LXDE, there is still get IP address from my host OS. So this is confirm this not about host os or Virtual Machine software but I think this is about your host os maybe trully has too many bug. I sugest you must try Virtual Machine of Debian 11 in linux environment more better and more reliable.
Look at my SS, my VM has Ip address and also get default gateway ip address so my VM Guest can connected to the internet.
Image

I also have home server installed Debian Bullseye 11. I upgrade from Debian Buster 10.This Debian Builseye works normally with multi NIC, I have two NIC ethernet card. And always get ip address and default gateway from my wifi router, because this server connected directly to Modem Wifi router. So this is confirm Debian Bullseye doesn’t has problem when installed in real hardware or baremetal even with multi NIC.

But for note. If i restart or start this server, when it’s full booting actually only one NIC automatically get IP address but of course get too default gateway. The other NIC I must assing IP address and default gateway with this command:

sudo dhclient eno1

Look my SS below:
Image

Done.

Post Reply