Jump to content

Networking Advice


astroroxy

Recommended Posts

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.

Link to comment
Share on other sites

 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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...