freebsd freezes completely when using two network interfaces

I am using freebsd 13-2-release. I am new to freebsd so i dont know much about what i could do wrong. I set this OS on my server and connected one of the network interfaces (name igb0) to a network with DCHP and a connection with internet. All i did was download midnight commander and nothing else. So i didnt install any other drivers since i dont know what is necessary.
Then i connected the second network interface (name igb1) to a local network with only one pc. I did it to check if ssh and ping work in the local network.
The problem is freebsd freezes completely when using two of those interfaces at the same time. It just does not respond to my commands. it might unfreeze in about 10-20 minutes, but if i enter another command the same happens again. If i use either igb0 or igb1 network interfaces alone everything is fine and nothing bad happens. What i noticed is if i connect two network interfaces nothing bad happens until i try to ping something or to connect to something over the network. As if some kind of conflict happens between two network interfaces.

My knowlegde of netwroks is quite lame, maybe a litle lower than a midle level. Maybe i did something wrong but i dont understand what. I already spend a few weeks of trying to solve this somehow. So maybe someone can help me to find the problem or to show a right direction to solve this. Mybe there is some log file where can be seen what happens when is freezes and what causes it.
Server has 4 terabytes of ROM and 16 gigabytes of RAM. The processor is some kind of intel but i dont know exactly the series. Didnt find any specification on my server over the internet. Maybe there is some cmd that shows the processor type. But still i dont know if it matters in this case.

Here is /etc/rc.conf content
turning off/on firewall changes nothing, the problem stayes.
defaultrouter is the address of a router in igb0 network. Changing defaultrouter influenses nothing. I even tried to set it to 0.0.0.0


Code:
hostname="SOMSP"
ifconfig_igb0="DHCP"
ifconfig_igb1="inet 192.168.36.96 netmask 255.255.255.128"
defaultrouter="95.131.228.145"
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="NO"
dumpdev="AUTO"
zfs_enable="YES"
firewall_enable="YES"
firewall_type="open"

Here is the respond to ifconfig command

настройки_сети (1).png


This is what happens when freebsd freezes. I entered mc command to start midnignt commander and nothing happens. None of other commands work either.
затуп2 (1).png


This is the response to netstat -nr command

netstat(1).png
 
Please don't post pictures of text. I can't really tell what it says. Please just copy/paste the text.

The only picture I can read a bit is the last one. And it looks like igb0 is attached to 10.10.30(?).0/25 and igb1 to 192.168.36.0/25? Your gateway address doesn't make sense, it needs to be an address in one of those two ranges. You don't need to set it anyway as it will receive a gateway address through DHCP.

CTRL-Z stops a process and puts it in the background. It doesn't end the process, you can exit mc with F10.
 
You can use CTRL-T to see where it is stuck too, your network is classless (/25) so you need to be more careful to see which ip are in the same network.
 
Please don't post pictures of text. I can't really tell what it says. Please just copy/paste the text.

The only picture I can read a bit is the last one. And it looks like igb0 is attached to 10.10.30(?).0/25 and igb1 to 192.168.36.0/25? Your gateway address doesn't make sense, it needs to be an address in one of those two ranges. You don't need to set it anyway as it will receive a gateway address through DHCP.

CTRL-Z stops a process and puts it in the background. It doesn't end the process, you can exit mc with F10.
I am sorry for causing inconveniece. I posted pictures instead of text since i cannot just copy text from the terminal on my server because it is a physical server with only keyboard and a monitor. Only i just thought that i could open my server through ssh on my pc with windows and copy it right there. I will do it as soon as i get to it. What about default router i see it is a mistake. I should put it away but still it does not change much since the problem stays even if i dont set default router at all.
 
You can use CTRL-T to see where it is stuck too, your network is classless (/25) so you need to be more careful to see which ip are in the same network.
Thanks for a useful reply. I didnt know about CTRL-T feature. Gonna try it as soon as possible
 
My problem still has not been solved. I have been struggling to find the problem for over a month already. I reinstalled Freebsd on my machine to start from the very beginning. The only file i set was rc.conf and resolve.conf(was set during installation). Here is rc.conf

Code:
hostname="SOMSP"
ifconfig_igb0="inet 95.131.228.149 netmask 255.255.255.240"
defaultrouter="95.131.228.145"
ifconfig_igb1="inet 192.168.36.96 netmask 255.255.255.128"
sshd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"

First, there was only ifconfig_igb0. Everything was fine, the internet was working and no freezes. As soon as i set ifconfig_igb0 and plugged connector to physical igb1 port everything fell apart again. I ping 8.8.8.8 or some local machines once or twice and the next ping does not go or ends with no reply. After that FreeBSD does not work correctly. If i try to enter some command, it does not get accomplished or done very slowly (a few minutes). There are cases when the machine does not reply for a long time and i have to turn off the power by pressing the power button on the front panel. The problen is i cannot see what causes the problem since i cannot enter any command after i turn on the second network interface. 255.255.255.240 and 255.255.255.128 networks can see each other through the router and it may cause the problem i thought but i tried to connect a single PC (with network matching 255.255.255.128) to igb1 interface and problem does not go.

Here is resolve.conf file
Code:
search emsd.ru
nameserver 95.131.228.145
nameserver 8.8.8.8

Here is hosts file (i left as default)
Code:
::1   localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain

my processor
Code:
machine: i386
model: Intel(R) Xeon(R) Bronze 3106 CPU @ 1.70GHz
ncpu: 8
macine_arch: i386

here are some pictures of the results of some commands. I am sorry for attaching pictures instead of text but I don't know how to copy the text from the machine.
IMG20230728134649.jpg




IMG20230728135107.jpg


IMG20230728142621.jpg





IMG20230728140516.jpg


IMG20230728140546.jpg


I don't even know where to find a problem. Is FreeBSD supposed to freeze when you set something wrong with network settings? can it be some hardware problem with the server itself? I think it is abnormal. I could use only one network interface but i neen local 255.255.255.128 network to send some files from other machines connected to the network.
 
Is FreeBSD supposed to freeze when you set something wrong with network settings?
No. Not even if you completely mess up the network configuration.

can it be some hardware problem with the server itself?
That's certainly a possibility.

You CPU0:timer seems to be hit quite a lot more (several orders of magnitude) compared to everything else. It could be nothing, but it could also be an indication something's wrong with the hardware. All those cpu#:timers should have somewhat similar values.

This is my VM server, it has several active network interfaces:
Code:
dice@hosaka:~ % vmstat -i
interrupt                          total       rate
irq18: ehci0 uhci5+                    2          0
irq19: uhci2 uhci4                    27          0
cpu0:timer                     221195598        293
cpu1:timer                     194836615        258
cpu2:timer                     191443452        253
cpu3:timer                     195298341        258
cpu4:timer                     199440678        264
cpu5:timer                     191314963        253
cpu6:timer                     192221650        254
cpu7:timer                     197735782        262
cpu8:timer                     189550766        251
cpu9:timer                     194933336        258
cpu10:timer                    190351155        252
cpu11:timer                    195949233        259
cpu12:timer                    191387197        253
cpu13:timer                    196569076        260
cpu14:timer                    191601162        253
cpu15:timer                    198019630        262
irq48: igb0:rxq0                 4442535          6
irq49: igb0:rxq1                 2605003          3
irq50: igb0:rxq2                 2602780          3
irq51: igb0:rxq3                 2786259          4
irq52: igb0:rxq4                 2597868          3
irq53: igb0:rxq5                 2754521          4
irq54: igb0:rxq6                 2754160          4
irq55: igb0:rxq7                 2602548          3
irq56: igb0:aq                         3          0
irq57: igb1:rxq0               156113428        207
irq58: igb1:rxq1                12308863         16
irq59: igb1:rxq2                10653469         14
irq60: igb1:rxq3                 7114707          9
irq61: igb1:rxq4                 8713957         12
irq62: igb1:rxq5                14237442         19
irq63: igb1:rxq6                15878256         21
irq64: igb1:rxq7                20324849         27
irq65: igb1:aq                         9          0
irq66: igb2:rxq0               170429576        225
irq67: igb2:rxq1                14197747         19
irq68: igb2:rxq2                12486248         17
irq69: igb2:rxq3                31923762         42
irq70: igb2:rxq4                20280166         27
irq71: igb2:rxq5                18471510         24
irq72: igb2:rxq6                14639718         19
irq73: igb2:rxq7                18928977         25
irq74: igb2:aq                        10          0
irq84: mpt0                     98024474        130
irq86: ahci0:ch0               117536100        155
irq87: ahci0:ch1               117545771        156
irq110: ppt1                    19761237         26
irq125: ppt0                     4446337          6
Total                         4059010953       5370

What can you tell us about the hardware? What brand/model/type mainboard for example?
 
Thanks for the reply. I also think this is a hardware problem. It is too strange to work that way. A also tried to set my two network cards to polling mode (thought it is interrupts from the cards that overloaded Freebsd) but it turned out it does not work with SMP processors or something like that. Now i either use only one network card (no garantee it will work stable) or change the hardware.
 
wait a second - are you running an i386 installation of FreeBSD on that machine? why?
There are a few serious reasons for that.
First and most important - i want to use some prepared software on this machine. The software was made for FreeBSD only and software is quite complicated to rewrite it for other OS quickly on my own. Some guys lent the software to me.
Second and a little less important - The company i work at is quite small and does not have much money to buy licence for windows or some other OS,but it is legal to use Freebsdm so no other options for now.
Third - This machine was just laying in basement with no use so i decided to give it a new life by using it. I was sure no problem would appear with this machine.

But maybe i misunderstood you, did you mean that i cannot use Freebsd on that machine or did install the wrong version of Freebsd on this machine?
 
This is an amd64 machine, don't use the i386 build on that. i386 has been demoted to Tier-2, so they are not supported by releng or security (i.e. security fixes may be delayed) and ports may or may not build properly (i.e. they might also fall out of the package repository). Most importantly and maybe exactly what you are hitting: there *may* be issues with newer hardware, especially if used on the 'wrong' architecture. i386 also has some known issues/limitations e.g. with ZFS.

In short: use the correct build for that hardware (amd64).
This might already be the fix to your problems, as using multiple NICs is pretty much an absolute default scenario for FreeBSD.
 
  • Like
Reactions: mer
I think you should be able to run 32 bit freebsd executables on the amd64 architecture. You may need to install some 32bit compatibility packages.
 
Contrary to what you might think when seeing "amd64", it's not only for AMD CPUs. The architecture is called AMD64 because AMD was the first to add the 64 bit extensions to the 32 bit x86 (IA-32) instruction set. Later on Intel copied this as Intel 64 (not to be confused with IA-64 which is something else entirely). AMD64 simply refers to the 64 bit x86 architecture.

 
  • Like
Reactions: mer
This is an amd64 machine, don't use the i386 build on that. i386 has been demoted to Tier-2, so they are not supported by releng or security (i.e. security fixes may be delayed) and ports may or may not build properly (i.e. they might also fall out of the package repository). Most importantly and maybe exactly what you are hitting: there *may* be issues with newer hardware, especially if used on the 'wrong' architecture. i386 also has some known issues/limitations e.g. with ZFS.

In short: use the correct build for that hardware (amd64).
This might already be the fix to your problems, as using multiple NICs is pretty much an absolute default scenario for FreeBSD.
I might look very stupid to spend two months trying to solve software problems when i just had the wrong version of Freebsd on my hardware. I didnt even think that. I thought the wrong version of Freebsd would not even let me install it on the wrong architecture. If it got installed OK then it fit but it is a bad way of thinking. I am new to Freebsd and stumbled on such a simple case. I am very grateful for the help.
 
I think you should be able to run 32 bit freebsd executables on the amd64 architecture. You may need to install some 32bit compatibility packages.
I think i will go with installing the right version of Freebsd as soon as possible to check if it works. I think it will work. Thank you a lot.
 
  • Like
Reactions: mer
Back
Top