Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
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.
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.
If routing is not needed on that subnet, then it should be possible to send and receive packets on the subnet with an empty routing table. But this dosent work for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.