Quantcast
Channel: What is the point of a subnet mask on a local network? - Network Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Ron Maupin for What is the point of a subnet mask on a local network?

$
0
0

What a mask does is to define the separation between the network portion of an address, and the host portion of an address. IPv4 lets you slide these two pieces around to get a network which has enough host addresses to match your needs. This answer may help you to visualize this.

You can also use shorter masks to aggregate or summarize networks. This allows you to advertise a single route instead of a bunch of smaller routes.

But surely on everything has to be sent to a router/switch anyway right? So why do you need to have the subnet mask on your computer? If all data goes through the router, surely it is only the router that needs to have the subnet mask on it?

Not everything needs to be sent to a router. Traffic destined for the same network will never go through the router. Switches don't count since they don't participate in layer-3, where IP is.

When a host wants to send something to another host, it masks the destination address to see if it is on the same network as itself. If it is, it just sends the traffic directly to the host on the same network. If the destination is on another network, it sends the traffic to its configured gateway. It does this using layer-2 (e.g. MAC) addresses, not by changing the destination IP address.

With IPv6, you basically have a single network size (/64), so much of address manipulation is easier.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>