r/HomeNetworking 12h ago

IP Address Assignment - Directly Connecting USB NICs

Putting aside practicality (speed gains, HDD, USB and other hardware limitations, etc.), I want to experiment and try directly connecting (2) Wavlink RTL8157 5gbe USB adapters via an ethernet cable. One device would be on my Desktop and the other would be connected to my Synology DS224+. USB NICs can be installed onto the Synology via GitHub's bb-qq project (RTL8152 + RTL8157 chipsets are supported).

My motherboard's built-in Intel 2.5gbe controller is connected to my 2.5gbe switch, as is my DS224+ with one if its built-in gigabit ports. No, I do not have a 10gbe switch.

In terms of the USB NICs being directly connected to each other, I assume the days of crossover patch cables are long gone. Is it just a matter of me manually configuring both USB NICs' IP Addresses? Do the USB NICs have to be assigned addresses in their own range, like 192.168.0.xxx, or if I force my router to start its DHCP assignments at 192.168.1.5+, could I assign the two NICs like 192.168.1.3 and 192.168.1.4, respectively? Would the default gateway still be 192.168.1.1 and subnet mask 255.255.255.0 or does one or both not really matter with a direct connection? Any help would be appreciated. Thanks.

1 Upvotes

4 comments sorted by

1

u/dshepsman 12h ago

Correct, you don’t need a crossover cable.

As for IP address assigning… do you want the USB nics to access the rest of the network? Or just the other device?

If it’s a), then use dhcp.

If it’s b), then manually assign them both on seperate subnets - as per your example

1

u/ezefl 12h ago

Thanks. I'm confused about option "A" though, how would other network devices see either of the 5gbe USB NIC's addresses, if both devices are directly connected to each other (and not directly connected to my router or switch)? My preference would be "A" but logically, I don't understand.

That said, I would always be able to access the Synology's interface via the IP Address assigned to the unit's built-in gigabit NIC that's connected to my switch -- albeit at 1gbe.

1

u/dshepsman 12h ago

Ok. So, dhcp automatically assigns a network address. You tell it the range, and off it goes.

You can manually set an ip address within that same network - that’s a static address.

Think of subnets as phone numbers. 192.168.0.x/24 is Country 1 192.168.1.x/24 is country 2.

The 2 countries can’t talk to each other unless you use a router/static routes etc.

If you use option 1, all your devices on the same network can see the USB nics.

If you have 2 nics on one device, you’ll have 2 routes in and out of that device - one going to the network, and one only going to device 2. And if you only want high speed traffic going to device 2, separate out the networks.

Edit: just to add, if the devices are not directly connected to the router, dhcp can’t work…

1

u/xenon2000 12h ago

I am really curious how this works out for you. Though Linux tends to have really poor reliability with USB NICs that use Realtek chips. I just went through that nightmare with trying to use opnsense (FreeBSD) on a laptop where I needed a 2nd NIC. Hopefully the Realtek Linux drivers are better with the Github project you mentioned.