astroroxy Posted November 1, 2014 Report Posted November 1, 2014 Hey guys! Quick question. I have 2 subnets. I have 2 devices, one on each subnet. One of these devices backup to the other, thus creating a lot of bandwidth. Now the problem is that I have them connected to a switch, and I guess because its layer 2 it sends the traffic up to the router and then back down. Now the problem is that my provider is the one who has the router. The data never leaves the router to the outside world, but they are still trying to charge me for it. What is the best way to let the 2 subnets communicate? My switch is a layer 3 if that helps. Do I really need to get a router myself? Just a PITA because all my devices use public IP addresses. Quote
Blesta Addons Posted November 1, 2014 Report Posted November 1, 2014 Add second ethernet for each device and make a private connection . Quote
astroroxy Posted November 1, 2014 Author Report Posted November 1, 2014 Thanks for the reply Any other options? The problem is my NAS is on a different subnet then my devices that need to be backed up. It is not feasible to do that. I also can not add the nas to the same subnet Quote
AshleyUk Posted November 6, 2014 Report Posted November 6, 2014 What OS is being used each end? Is it a "real" NAS or a PC/Server acting as one? Quote
Paul Posted November 6, 2014 Report Posted November 6, 2014 What layer 3 switch do you have? I'm guessing you'd want a separate VLAN for each subnet, and then configure InterVLAN routing.. but I'm no expert. I would set up a private network or VLAN and use a separate NIC for backups though. Quote
Max Posted November 7, 2014 Report Posted November 7, 2014 My switch is a layer 3 if that helps. Do I really need to get a router myself? L3 switch = router. That said, you do not have to use it as such. If you prefer not to mess with your switch, and do not have any VLANs configured, you can also just configure device 1 and device 2 to use static routing and talk to each other directly, instead of letting communication go through the default gateway IP-address provided by your provider which is happening right now. Assuming device runs Linux: "ip route add 1.2.3.0/24 dev eth0" where 1.2.3.0/24 is the subnet of the other device. Quote
astroroxy Posted November 8, 2014 Author Report Posted November 8, 2014 L3 switch = router. That said, you do not have to use it as such. If you prefer not to mess with your switch, and do not have any VLANs configured, you can also just configure device 1 and device 2 to use static routing and talk to each other directly, instead of letting communication go through the default gateway IP-address provided by your provider which is happening right now. Assuming device runs Linux: "ip route add 1.2.3.0/24 dev eth0" where 1.2.3.0/24 is the subnet of the other device. I may sound stupid, but wouldn't that just cause it to go over eth0, when it already is? Quote
Max Posted November 10, 2014 Report Posted November 10, 2014 I may sound stupid, but wouldn't that just cause it to go over eth0, when it already is? It indicates that servers in the foreign 1.2.3.0/24 subnet are attached directly to the eth0 network. So that it knows that if it wants to speak to say 1.2.3.10, it can send an ARP request for the IP 1.2.3.10 to get the MAC address of the server, and then send traffic directly to the MAC address of the server. If you do not tell it that, it will indeed also send it through eth0, but it will then be covered by a slightly different route rule among the lines of "ip route add default via 4.5.6.1 dev eth0" which will address all foreign traffic to the MAC-address of the default gateway 4.5.6.1 to be routed. So the traffic flows through eth0, through your switch, to the uplink switch port to your provider, to their the router, back to your switch, to the other server. Depending on the accounting method used by your provider this may indeed cause it to be charged, and probably even twice, as both upload and download traffic. So you either need to setup static routes to give a hint to your servers that the servers in the other subnet are local and there is no need to send the traffic to the address of the gateway. Or you need to let your L3 switch do the routing. In that case you would need to configure your switch properly, and change the network configuration of all your servers, so that the default gateway IP in the server's configuration would be of your own L3 switch, instead of your provider's. Quote
astroroxy Posted November 10, 2014 Author Report Posted November 10, 2014 Ahh, thanks. Now I get it. I never would have thought to do this client side. I also would never have thought to use my l3 switch as a gateway. Now only if I can get my switch to cooperate with me. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.