1

I know that this is pretty ambiguous because many factors contribute to how traffic is routed but is it expected behavior that when clients on a NATed network try to send a packet to an address outside of their subnet but on the router's wan subnet, the router will try to communicate directly with that address? Or will packets get sent to the gateway and then back to the switch and finally to the destination?

I have a setup like this:

The gateway for the router is set to 10.1.1.1

The NATed clients (there are a few) are sending traffic to 10.1.1.X, how are they getting there?

                all devices have a netmask 255.255.255.0

                    |modem internal address:10.1.1.1|
                               |
                               |
                           |switch|
                               |
                              / \
                             /   \
                            /     \
  |server address: 10.1.1.x|       |router external address: 10.1.1.Y|
                                   |    internal address: 10.1.2.1   |
                                                    |
                                                    |
                                         |client address 10.1.2.X|


background:

I'm experiencing some speed issues (dsl/to the world) when I'm generating a lot of traffic internally on the 10.1.1.0 network and I suspect that the modem (which isn't equipped for this kind of traffic) could be the source of my bottleneck if all of the internal traffic is being sent through it. I haven't had much hands on experience with networking and so don't know if it's expected for a router to behave that way.

2

1 Answer 1

2

NAT or not, you have different subnets and the way traffic routes from within a subnet and outside of a subnet works the same with IPv4. If you're on 10.1.2.0/24 and you send to anything else on 10.1.2.0/24, your traffic is not processed by the router. The device sees that the destination is on the same network and will use ARP to get the hardware address of the destination and the switch portion of the router will route the packets based on its ARP table to the correct device.

If you're on 10.1.2.0/24 and you want to go to anything on 10.1.1.0/24, the client will see that the destination is not on the same network and will send it off to the appropriate gateway (in most cases the default unless you have a more complex routing scheme, but either way, a gateway). The gateway will look at the destination and see if it is on its own network, or needs to be transferred on. If it is on the same network it consults its ARP table and ARPs if necessary to send the packets to the correct device on its network. Since your router has an external address of 10.1.1.Y, something on 10.1.1.0/24 will be on its network, so it will just send the packet to the hardware address. In this case, the modem will never see the traffic.

If it needs to go elsewhere, (eg an address on the other side of the modem), off it goes to the appropriate gateway - which will be 10.1.1.1, and that gateway will do the same, and pass it along to the most appropriate gateway it has for the destination and that pattern continues until it reaches its destination.

How much traffic are you talking about here? What type of switch is that underneath the modem? Look at the backbone specs on that and make sure it can handle the traffic you're putting through it. That device sounds like it is the most plausible bottleneck in your described scenario.

2
  • It's a gigabit switch, I'm starting to think that the router is just incapable of handling all of the traffic in whole. Jan 26, 2015 at 23:30
  • Thank you for your help in narrowing it down. It's a temporary solution until I build a pfsense box with an ac card. Jan 26, 2015 at 23:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .