Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The switch sees the IP, recognizes it's not part of your LAN (because you've set your network up as 192.168.168.0/24 and that IP's not part of that range) and forwards it to its gateway, the router.

This may be nitpicky, but assuming we’re talking about a switch in the strictest definition (a layer 2 switch), this is not correct. Your computer sees that the destination IP address is not in its local subnet, and addresses the packet to the MAC address of its default gateway (the router). The switch receives the packet and forwards it to the appropriate interface based on the destination MAC address.

Even if we are talking about a layer 3 switch, then we would be assuming that the gateway resides on the switch, and it is still the computer that makes the decision to send the packet to its default gateway.

Given the rest of your comment I’m assuming you already know this, and I’m not posting this as a correction to you, but rather for the benefit of others.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: