Ifconfig and network masks
I have been reading up on networking basics, and I have have one question which I couldnt find the answer to although I googled quite a bit.
What is the network mask for a interface actually used for. Here I mean the network mask that is set when you configure the interface with ifconfig. I know that it separates the network address from the host address, and I understand how network masks are used in the routing table. What I dont understand is why every interface needs its own netmask. Wont packages get routed correctly regardless of this value as long as the routing table is configured properly? I did a little bit of testing and didnt notice any difference (just tested pinging) when setting this parameter to strange values. |
Hi -
Google for "TCP/IP subnet mask". Essentially, every 32-bit IP address consists of two parts: the "network" a host resides in, and the "host#" within that network. The "subnet mask" basically determines which bits are part of the subnet address, and which bits part of the host address. Among other benefits, this allows more granular administrative control. |
More about sibnet mask
It also defines the subnet, or range of addresses, for which a direct network should exist. For that subnet routing should not be needed, all other traffic goes through the default route unless there is a specific routing that overrides.
|
Quote:
|
All times are GMT -5. The time now is 09:11 AM. |