Creating a routing or bridge between 2 NICs

Interested in our products? Post your questions here. Let us answer before you buy.
Post Reply
User avatar
MichaelSee
Starting out
Posts: 32
Joined: Sat May 17, 2014 3:56 pm

Creating a routing or bridge between 2 NICs

Post by MichaelSee »

I have 2 10G NICs in my new QNAP and each of the 10G NIC is connecting to a PC each (note 2 PCs in total) using direct RJ45 without a switch and I have used static IP addresses for both the 10G NICs on the QNAP and also the NICs on the PCs. I am trying to use the 10G NICs on the QNAP to behave like a router or bridge so that I can pass traffic between the 2 PCs. (Hope this makes sense so far....)

Basic design:
QNAP NIC1: 1.1.1.1 mask 255.255.255.0 (connecting directly to PC1)
QNAP NIC2: 2.2.2.2 mask 255.255.255.0 (connecting directly to PC2)
PC1: 1.1.1.10 mask 255.255.255.0 (connecting directly to QNAP NIC1)
PC2: 2.2.2.20 mask 255.255.255.0 (connecting directly to QNAP NIC2)

Say my PC2 is running a web server, how to get PC1 to access the web server on PC2?

I have tried configuring static routes on QNAP and also VLANs, but none seems to work...

Thanks much!
User avatar
philippe.mande
Getting the hang of things
Posts: 94
Joined: Sun Dec 23, 2018 6:15 pm
Location: Saint-Mandé France
Contact:

Re: Creating a routing or bridge between 2 NICs

Post by philippe.mande »

Hi,

Please provide result of "ip route show" command and "ip link show" etc. to have a "real" view of the NAS configuration.

Be sure forwarding is set to 1 in your NAS network (normally it's default)

verify that any Iptables rules don't block routing

Be sure that network is correctly defined in each PC with a route to the other network

Use always basic tools to verify that new route works as well (traceroute, etc.)

Last : workaround by moving to use iptables and masquerade to avoid to define route & network in other PC

Philippe.
New pseudo for Father_Mande (now closed) ...
QNAP TS-x53 Pro, TVS-x73, TS-x31+, TS-x28A DEAD ... and some oldest under Debian ... etc.
Asustor AS5002T ; AS1002T ... etc.
User avatar
MichaelSee
Starting out
Posts: 32
Joined: Sat May 17, 2014 3:56 pm

Re: Creating a routing or bridge between 2 NICs

Post by MichaelSee »

philippe.mande wrote: Sat Nov 30, 2019 3:58 pm Hi,

Please provide result of "ip route show" command and "ip link show" etc. to have a "real" view of the NAS configuration.

Be sure forwarding is set to 1 in your NAS network (normally it's default)

verify that any Iptables rules don't block routing

Be sure that network is correctly defined in each PC with a route to the other network

Use always basic tools to verify that new route works as well (traceroute, etc.)

Last : workaround by moving to use iptables and masquerade to avoid to define route & network in other PC

Philippe.
Thanks Philippe, please see below:

[~] # ip route show
default via 20.2.2.20 dev eth2 proto static metric 100
10.1.1.0/24 dev eth1 proto kernel scope link src 10.1.1.1
20.2.2.0/24 dev eth2 proto kernel scope link src 20.2.2.2
1.1.1.0/24 dev eth0 proto kernel scope link src 1.1.1.1
2.2.2.0/24 dev eth3 proto kernel scope link src 2.2.2.2

[~] # ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 24:5e:be:43:yy:xx brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 24:5e:be:43:yy:xx brd ff:ff:ff:ff:ff:ff
4: eth4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 24:5e:be:42:yy:xx brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 24:5e:be:42:yy:xx brd ff:ff:ff:ff:ff:ff
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 24:5e:be:43:yy:xx brd ff:ff:ff:ff:ff:ff
7: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master tbtbr0 state DOWN mode DEFAULT group default qlen 1000
link/ether 02:70:04:c5:yy:xx brd ff:ff:ff:ff:ff:ff
8: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether aa:00:9d:ca:yy:xx brd ff:ff:ff:ff:ff:ff
9: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 06:67:eb:91:yy:xx brd ff:ff:ff:ff:ff:ff
10: bond2: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 16:1e:1e:3b:yy:xx brd ff:ff:ff:ff:ff:ff
11: bond3: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether e6:8c:6e:26:yy:xx brd ff:ff:ff:ff:ff:ff
12: bond4: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 7a:4f:b4:b3:yy:xx brd ff:ff:ff:ff:ff:ff
13: tbtbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether 02:70:04:c5:yy:xx brd ff:ff:ff:ff:ff:ff

I masked the MAC addresses of the NICs in this posting for security, if any.... :)

"Be sure forwarding is set to 1 in your NAS network (normally it's default)" I did not change anything in the QNAP on this, don't even know where to find this...

"verify that any Iptables rules don't block routing" Where is this in QNAP? How to verify that?

The routing of the 2 Windows PCs are already done, standard "route add 1.1.1.1 etc.....", I am familiar with that.
User avatar
philippe.mande
Getting the hang of things
Posts: 94
Joined: Sun Dec 23, 2018 6:15 pm
Location: Saint-Mandé France
Contact:

Re: Creating a routing or bridge between 2 NICs

Post by philippe.mande »

Hi,

Nothing strange (except you don't have loopback ... )

forwarding do :
if ipv4 : cat /proc/sys/net/ipv4/ip_forward
if ipv6 : cat /proc/sys/net/ipv6/conf/all/forwarding
the two must be = 1 if not set it echo 1 > ..... (temporary set)

iptables :
iptables -L
iptables -t nat -L


Please also do : tracert IP_of_SECOND_PC on first PC in command as administator

can you provide the result of route print on the 2 PC ...

Philippe.
New pseudo for Father_Mande (now closed) ...
QNAP TS-x53 Pro, TVS-x73, TS-x31+, TS-x28A DEAD ... and some oldest under Debian ... etc.
Asustor AS5002T ; AS1002T ... etc.
Bob Zelin
Experience counts
Posts: 1377
Joined: Mon Nov 21, 2016 12:55 am
Location: Orlando, FL.
Contact:

Re: Creating a routing or bridge between 2 NICs

Post by Bob Zelin »

buy a 10G switch.
Problem solved.
Bob Zelin
Bob Zelin / Rescue 1, Inc.
http://www.bobzelin.com
User avatar
MichaelSee
Starting out
Posts: 32
Joined: Sat May 17, 2014 3:56 pm

Re: Creating a routing or bridge between 2 NICs

Post by MichaelSee »

Bob Zelin wrote: Sun Dec 01, 2019 1:44 am buy a 10G switch.
Problem solved.
Bob Zelin
I don't want to sound sarcastic, but I do not need obvious answers which no one else here is suggesting as they must have known that this is AN OBVIOUS ANSWER that I MUST HAVE ALREADY CONSIDERED earlier. If you want to help, please give good suggestions and I will really appreciate, like I truly appreciate what Philippe has replied. We come to this forum to ask for help and share experiences, so I apologize if I have sounded rude but I believe you should get my point.

On the note of why I am not getting a 10G switch, there are few reasons but mainly is because of space constraints at my working area, and also all the 10G switch is too big (and I need at least 3 10G ports if you can calculate), the only small 10G switch is the Microtik CRS305, but the SFP modules will run extremely hot and they still have not solved the 10G->1G speed issues. So yes, I have considered ALL options, and if you can recommend me a small 3 to 4 port 10G switch with RJ45 that runs reasonably cool, I will buy it. I have reviewed the Asus (which is crazily hot!) and the Netgear (too big), and the QNAP option, all are not feasible.

Sorry for sounding rude, but I can never understand why there are people here that always gives weird alternative answers and not answering directly to the poster's questions....
Bob Zelin
Experience counts
Posts: 1377
Joined: Mon Nov 21, 2016 12:55 am
Location: Orlando, FL.
Contact:

Re: Creating a routing or bridge between 2 NICs

Post by Bob Zelin »

https://www.amazon.com/QNAP-QSW-1208-8C ... 117&sr=8-1

QNAP QSW-1208-8C
$525.00 US.
12 SFP+, 8 10Gbase-T
runs silent. Does not get hot. Weighs 4.74 pounds. It's 11" wide and 9" deep. This is not to big. This can fit on top of your QNAP.
You want rude - FOLLOW MY INSTRUCTIONS. Problem solved, with plenty of room for expansion in the future.

Bob Zelin
Bob Zelin / Rescue 1, Inc.
http://www.bobzelin.com
Post Reply

Return to “Presales”