Configure LAN NIC to allow direct connect from server one to another

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
I have TWO FreeNAS installations on two servers. One has a dual nic 10gbe card. I would like to connect that to my network, and then connect the second server to the 2nd port on the nic. How would I configure to do this? I do not have a 10gbe switch, and I only have one network cable to this location. I'd like to save some money here and just connect them together. Can do?

Thank you.
 

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
I'm not a sh wizard at all. I found this. I understand that nic1 and nic2 will be the device names on my specific nic. However, I dont really know where this goes. Nor, is it what I need at all.

#!/bin/sh
ifconfig bridge create
sleep 1
ifconfig bridge0 addm nic1 addm nic2 up
ifconfig nic1 up
ifconfig nic2 up
ifconfig bridge0 inet ipaddress/cidr
ifconfig nic1 mtu 9000
ifconfig nic2 mtu 9000
ifconfig bridge0 mtu 9000
sleep 5
service ctld stop
sleep 1
service ctld reload
sleep 1
service ctld start
 

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
Oh, I figured that I can type this in manually in the console. However, I'm not sure how to get this in the startup script. I'll do a search for this, and report back.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Oh, I figured that I can type this in manually in the console. However, I'm not sure how to get this in the startup script. I'll do a search for this, and report back.
Once upon a time I configured a direct link like you're proposing: I had 2 FreeNAS servers, each with a dual-port 10Ge NIC. So I connected one of the two ports from both servers to my switch, and connected the two FreeNAS systems directly via the second port.

There's no need to set up a bridge, and you can set this up from the GUI. You will need to configure the second port on a different subnet, and make sure you only have one gateway ('Default route'), making sure to configure it on the port connected to the switch. The direct connections between the two servers doesn't need a gateway.

This will let you put the SMB and SSH services, for example, on the subnet connected to your switch, and use the directly connected subnet to do replication and other behind-the-scenes tasks privately between the two FreeNAS servers.
network-example1.jpg

network-example2.jpg
 

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
@Spearfoot

I see what you are saying. Thats not exactly what I'm proposing. But, close.

I need both NAS to be available on the same subnet.

So, the assumption made here that I failed to mention, is the second FreeNAS does not show on the network when I do nothing with configuration. Just plugging into the second port on the first FreeNAS does not do it. I assumed further configuration would be necessary, hence bridging.

Idk, I guess tell me what I'm doing wrong here. It seems rather simple, but no methods are working.
 

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
you need two switch ports if you want them to both be visible on the network..AFAIK you cnnaot chain the servers together like you are trying to do and have them be one giant nas. You could add a jbod shelf to one of them..that would take care of it.
 

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
Noooo, That is not what I'm trying to do. Think simple.

I have one 10gbe wire. I do not have a 10gbe switch, because they are exceedingly expensive. I have two servers. Both with dual 10gbe nics. I simply want them both connected at 10gbe. Thats it! Nothing complex. They are two independent install's of FreeNAS. I have no intentions of any weird linkups other than an SMB Share.

Does this change things at all?

I dont know if this is the right termonology, but I think its called "passthrough". The second port on the nic I want to pass through for the second server. The second server just needs to get an IP on the same subnet. Idk, maybe that made it sound more complex. But again. I have two 10gbe servers, one 10gbe wire. No 10gbe switch.
 

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
if you want both servers visible to the network you need two 10GB ports. If you want one to backup the other you CAN connect one port directly to each other..with their own independent subnet that is NOT the same as the network that has the rest of your devices.
 

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
I dont know what I'm missing in my description. I do have two 10gbe ports. On both servers. I do not care about independent backup on its own subnet. Thats not what I have been asking.

Its simple.

I have two servers. BOTH have dual port 10gbe nics. I have ONE network connection, which is 10gbe. I want both to be connected to the same subnet as the rest of my network. If I had a 10gbe switch, I would just use that. However, I dont have $500 to blow. Can I do this?

If you are saying "...you need two 10gbe ports." by that saying that I need a switch with two available ports, then that is what I am getting at. I only have one. The room this is in only has one wire run. There is no running a second. It would take hours.

Forget stuff from other posts suggesting other things. This is the question.
 
Last edited:

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
as i said..if you want both machines visible on the network you need two switch ports......if you have one cable then by a small 10 gig switch and then hook the one cable to the switch and the two nas units to the switch..otherwise it won't work without running a second cable....which may be cheaper than the switch.
 
Last edited:

Rod Martin

Dabbler
Joined
May 16, 2019
Messages
30
Well, that is indeed the issue. Hence the question. Anywho. Thanks anyway.

This is a temporary installation. I will just have to use a 1gbe switch and suffer the performance hit until my NAS returns from repair.

It still seems like something that you should be able to do. It just doesnt seem that difficult technically.
 
Last edited:
Top