Create link aggegation load balancing

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Hello,
I have two network interfaces on my motherboard. I have tried several times to create a load balancing link aggregation via the truenas web interface, but the interface never registers. When "testing the changes", the changes are never registered.
On the other hand I can create a load balancing via the console (ipmi). Even there, it is necessary to go over it several times, it is necessary to fiddle with the existing interfaces. When I finally manage to create this link aggregation, I never know how I managed to do it.
Do you have an explanation as to why I can't create this interface in the web gui?
And if not, do you have a reproducible method to do it on the console?

Regard
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Probably because 1 nic is still in use. Maybe try to set in gui load balancing with single nic. Move IP to BR0 or whatever this nic will be called and then add another nic to team
If you want to setup LAGG you have to have managed switch taht will have same configuration for that ports.
Of course keep in mind that it works only if many clients are trying to get to server at the same time :)
this is from Scale
1672198810883.png

1. create Link aggregation as load balancing
2. use name bond(number)
3. set IP for that bond either though dhcp or static
4. add at least one nic that is not setup
5. make sure that you can access gui using ip from bond interface
6. remove settings from old nic and add it to bond.
1672199180861.png
 
Last edited:

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Hello, and thank you for your answer.

Well I think my network configuration was completely bugged.
I don't know how it happened, but it was impossible to delete the lagg0 I had created, even via the console. I had no more access to my two interfaces igb0 and igb1. I had to do a total reset of truenas.
Finally, by doing this reset, I was able to set up a link aggregation in "load balance" mode via the web interface, and to delete it correctly.
At first I created the interface following your advice, integrating only igb1 (the interface I was not using to connect to the web interface), then I connected with the ip of the lagg0 interface and reintegrated igb0 into lagg0.
Then I made a new test, creating directly the lagg0 (load balance) by integrating directly igb0 and igb1, it worked.

On the other hand, I am systematically obliged to pass by the intermediary of DHCP.
If I want to put a fixed ip address (example: 192.168.1.50) from the beginning, I have each time the following error message :
The network 192.168.1.0/24 is already in use by another interface.
I need to check the DHCP box in order to register the interface


The IP address 192.168.1.0 is the address of my router.

Regards
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Hello, and thank you for your answer.

Well I think my network configuration was completely bugged.
I don't know how it happened, but it was impossible to delete the lagg0 I had created, even via the console. I had no more access to my two interfaces igb0 and igb1. I had to do a total reset of truenas.
Finally, by doing this reset, I was able to set up a link aggregation in "load balance" mode via the web interface, and to delete it correctly.
At first I created the interface following your advice, integrating only igb1 (the interface I was not using to connect to the web interface), then I connected with the ip of the lagg0 interface and reintegrated igb0 into lagg0.
Then I made a new test, creating directly the lagg0 (load balance) by integrating directly igb0 and igb1, it worked.

On the other hand, I am systematically obliged to pass by the intermediary of DHCP.
If I want to put a fixed ip address (example: 192.168.1.50) from the beginning, I have each time the following error message :

I need to check the DHCP box in order to register the interface


The IP address 192.168.1.0 is the address of my router.

Regards
Have you removed ip from original nic before you've added it to lagg?
You do screenshots of what you want by pressing Windows key+shift+S in windows of course :)
1672309581029.png

you can still see original nics so you have to remove settings from them.
By removing config i mean this:
1672309715640.png

no dhcp and no static IP for nic.
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
I am connected to the truenas interface on 192.168.1.22,

On igb0, I have a static IP (192.168.1.22).

1672312276957.png


igb0 parameter :
1672312388153.png

If I follow your reasoning : to create a link aggregation (load balance) lagg0 (with igb0 and igb1) and with a static IP directly, I must first remove the static IP of igb0.

When I delete the static ip of igb0 (so before creating lagg0) and I don't check the "DHCP" box, I get the following error message :

1672312496435.png

If I understand this message correctly, the interface must either be set to DHCP or ipv6 auto or with a static IP.

If I try to create lagg0 (with igb0 and igb0), when I register, the system forbids me:

1672313274501.png


If I try to create lagg0 (with only igb1 or igb0), at the time of registration, the system forbids me :

1672313487495.png



On the other hand, if I check DHCP and do not specify a static IP address :

1672313973057.png


The system disconnects me, I have to find the ip address given by the DHCP of my router, and I can connect to the web interface of truenas via lagg0 :
1672314089710.png


From here, I can assign a new static IP to lagg0 :
1672314279467.png

1672314245820.png


What do you think?
You don't have the same behavior?
 

Attachments

  • 1672313702675.png
    1672313702675.png
    25.5 KB · Views: 58
  • 1672313508678.png
    1672313508678.png
    46.6 KB · Views: 63
  • 1672313440246.png
    1672313440246.png
    46.6 KB · Views: 69
  • 1672313209041.png
    1672313209041.png
    45.1 KB · Views: 75

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Hm
It's like it still remembers old IP.
You could set DHCP Reservation for that lagg and leave it as is.

The only way that comes to my mind is reset whole network config from shell
and try to start with dhcp first

Generally you can't have 2 interfaces with the same static ip subnet
You can have 1 static and 1 dhcp. Not more.
I can assume that this is also in core. I havent used core for a long time but it shouldn't be much different.

maybe see what ifconfig says
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
The only way that comes to my mind is reset whole network config from shell
and try to start with dhcp first
As mentioned in my post #3, I had to reset all my configuration yesterday, I am currently working on a "blank" system.

Generally you can't have 2 interfaces with the same static ip subnet
You can have 1 static and 1 dhcp. Not more.
Indeed I had read in the documentation that only one interface could be defined on the DHCP. But I was surprised to see that I could define more than one interface.
If you look closely at my 7th image, just after creating the lagg0 interface via DHCP, igb0 and igb1 are no longer in DHCP.
So there is only one interface each time that is in DHCP.

But I can't set a static IP directly, I have to go through DHCP.
Personally I don't mind, I now have a reproducible "method" to set up or remove link aggregation via the web interface; which was not the case when I posted the message.
Do you think this is a bug, perhaps it should be reported?
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
As mentioned in my post #3, I had to reset all my configuration yesterday, I am currently working on a "blank" system.


Indeed I had read in the documentation that only one interface could be defined on the DHCP. But I was surprised to see that I could define more than one interface.
If you look closely at my 7th image, just after creating the lagg0 interface via DHCP, igb0 and igb1 are no longer in DHCP.
So there is only one interface each time that is in DHCP.

But I can't set a static IP directly, I have to go through DHCP.
Personally I don't mind, I now have a reproducible "method" to set up or remove link aggregation via the web interface; which was not the case when I posted the message.
Do you think this is a bug, perhaps it should be reported?
Gimme couple min i'll try to reproduce it in TrueNAS Core as VM
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
in my case it just worked
1672330800245.png


i've tested on core v13
1672330859076.png

1672330882900.png


1672330897075.png
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Hello,
As I'm going into production soon, I have completely reinstalled the TrueNAS 13.0-U3.1 system.
Here is what the interface tab gives me (just after installation) :
1672397444218.png


Both interfaces are in DHCP.
In this configuration, I was able to create a lagg0 link aggregation (load balance) with a static IP on the first try without problem.

I then removed the lagg0 interface, here is what it gives me after reconnection :
1672397733201.png
 
Last edited:

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Hello,
As I'm going into production soon, I have completely reinstalled the TrueNAS 13.0-U3.1 system.
Here is what the interface tab gives me (just after installation) :
View attachment 61696

Both interfaces are in DHCP.
In this configuration, I was able to create a lagg0 link aggregation (load balance) with a static IP on the first try without problem.

I then removed the lagg0 interface, ere is what it gives me after reconnection :
View attachment 61697
You shouldn't have 2 interfaces with dhcp.
On my screen shots none of nic had dhcp enabled after I had lagg active
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Here, I just assigned a static IP to igb0. after disconnection / reconnection, I have :
1672398059571.png

igb1 has lost DHCP, the box is no longer checked (without my intervention).
In this configuration, I tried to create again the lagg0 interface, I had the same problem than before :
1672398253705.png
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
You're keep doing it wrong :(
Only 1 nic can have static
And only 1 nic can have dhcp.
And you're trying to 2 nic to lagg with static IP.

I can show you how to do it on TeamViewer if you want.

Here, I just assigned a static IP to igb0. after disconnection / reconnection, I have :
View attachment 61698
igb1 has lost DHCP, the box is no longer checked (without my intervention).
In this configuration, I tried to create again the lagg0 interface, I had the same problem than before :
View attachment 61699
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
When I try to put my two interfaces in DHCP, the system forbids it. The behavior with DHCP is still weird :
1672398723241.png
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
You're keep doing it wrong :(
Only 1 nic can have static
And only 1 nic can have dhcp.
And you're trying to 2 nic to lagg with static IP.

I can show you how to do it on TeamViewer if you want.
Sorry, I didn't quite understand.
I understood that the system only allowed one interface in DHCP, but I didn't understand the subtlety that only one interface should also be in static IP.
As English is not my mother tongue, I think that there is some information that I did not understand well in the translations.
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Finally, my conclusion from the beginning was the right one. If I want a static IP on the lagg0 interface, one of the two interfaces (igb0 or igb1) must be in DHCP in order to be able to connect to the truenas web interface and make the changes
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Sorry, I didn't quite understand.
I understood that the system only allowed one interface in DHCP, but I didn't understand the subtlety that only one interface should also be in static IP.
As English is not my mother tongue, I think that there is some information that I did not understand well in the translations.
You were trying to add to lagg nic that still have static IP.
1. Add 1 nic to lagg that doesn't have any up static nor dhcp
2. If main nic has static then set lagg to dhcp.
3. Connect to truenas using lagg dhcp IP.
4. Remove up from main nic
5. Add it to lagg.
6. Profit :D
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Finally, my conclusion from the beginning was the right one. If I want a static IP on the lagg0 interface, one of the two interfaces (igb0 or igb1) must be in DHCP in order to be able to connect to the truenas web interface and make the changes
Exacly :)
 

Paul042020

Contributor
Joined
May 4, 2020
Messages
119
Thank you very much for your help.
It is indeed quite simple to set up.
In the documentation, it is explicitly written that there can be only one interface on DHCP (well, we have seen that both interfaces can be on DHCP in some cases).
On the other hand I did not find the information in the documentation that there should be only one interface in static IP. I think this is the element I was missing to understand.
 

sybreeder

Explorer
Joined
Aug 15, 2013
Messages
75
Thank you very much for your help.
It is indeed quite simple to set up.
In the documentation, it is explicitly written that there can be only one interface on DHCP (well, we have seen that both interfaces can be on DHCP in some cases).
On the other hand I did not find the information in the documentation that there should be only one interface in static IP. I think this is the element I was missing to understand.
You can have more DHCP and static IP only if those will be on separate subnet/vlan
 
Top