Simple Guide to Subnet Mask : Différence entre versions

[version en cours de rédaction][version en cours de rédaction]
 
Ligne 9 : Ligne 9 :
  
  
= Definition =
+
=Definition=
 
A subnet mask defines the range of IP addresses that can be used within a network or subnet.  
 
A subnet mask defines the range of IP addresses that can be used within a network or subnet.  
 
{{Info|...It also separates an IP address into two parts: network bits and host bits.}}
 
{{Info|...It also separates an IP address into two parts: network bits and host bits.}}
  
= Practical Application =
+
=Practical Application=
 
{{Info|...The 3 digit numbers in an IP address are called octets and range from 0 to 255}}{{Info|...I have padded the 3 digit "octets" with zeroes, this is not strictly necessary but it helps with visualisation}}
 
{{Info|...The 3 digit numbers in an IP address are called octets and range from 0 to 255}}{{Info|...I have padded the 3 digit "octets" with zeroes, this is not strictly necessary but it helps with visualisation}}
  
Ligne 27 : Ligne 27 :
  
  
'''Subnet Mask in simple terms - same and different.'''  
+
'''Subnet Mask in simple terms - same (255) and different (000).'''  
  
 
For the 192.168.... range, subnet mask is always 255.255.255.0, so all ip addresses with the first 3 octets the same will talk to each other<syntaxhighlight>
 
For the 192.168.... range, subnet mask is always 255.255.255.0, so all ip addresses with the first 3 octets the same will talk to each other<syntaxhighlight>
Ligne 39 : Ligne 39 :
 
Same Same Diff Diff
 
Same Same Diff Diff
 
255 .255 .000 .000
 
255 .255 .000 .000
</syntaxhighlight>{{Warning|...Again, please do not change the subnet mask unless told to do so by the IT department}}
+
</syntaxhighlight>
 +
The actual numbers in the subnet mask prevent cross talk between subnets and devices{{Warning|...Again, please do not change the subnet mask unless told to do so by the IT department}}
 +
 
 +
= Examples =
 +
<syntaxhighlight>
 +
IP1        192. 168. 001. 016
 +
IP2        192. 168. 001. 010
 +
SubnetMask 255. 255. 255. 000
 +
          Same Same Same Diff
 +
Can communicate
 +
</syntaxhighlight><syntaxhighlight>
 +
IP1        192. 168. 011. 016
 +
IP2        192. 168. 001. 010
 +
SubnetMask 255. 255. 255. 000
 +
          Same Same Diff Diff
 +
Cannot communicate
 +
</syntaxhighlight><br /><syntaxhighlight>
 +
IP1        010. 000. 008. 011
 +
IP2        010. 000. 001. 010
 +
SubnetMask 255. 255. 255. 000
 +
          Same Same Diff Diff
 +
Cannot communicate
 +
</syntaxhighlight><syntaxhighlight>
 +
IP1        010. 000. 008. 011
 +
IP2        010. 000. 001. 010
 +
SubnetMask 255. 255. 000. 000
 +
          Same Same Diff Diff
 +
Can communicate
 +
</syntaxhighlight>
 +
 
 +
 
 
If you want to understand more about subnets and subnet mask, check out https://www.freecodecamp.org/news/subnet-mask-definition/</translate>
 
If you want to understand more about subnets and subnet mask, check out https://www.freecodecamp.org/news/subnet-mask-definition/</translate>
 
{{PageLang
 
{{PageLang

Version actuelle datée du 30 novembre 2022 à 18:54

Auteur avatarGareth Green | Dernière modification 30/11/2022 par Gareth Green en cours de rédaction

Simplistic guide to the subnet mask setting to help diagnose network problems

...Big Warning The subnet mask should not be changed by Stuga engineers unless directed. It is strictly controlled by the customer's IT department / consultants. However, It is helpful to know what it is and what it does to help diagnose connection problems


Definition

A subnet mask defines the range of IP addresses that can be used within a network or subnet.

...It also separates an IP address into two parts: network bits and host bits.

Practical Application

...The 3 digit numbers in an IP address are called octets and range from 0 to 255
...I have padded the 3 digit "octets" with zeroes, this is not strictly necessary but it helps with visualisation


In most applications, the subnet 192.168.aaa.bbb is used with a subnet of 255.255.255.0

Where aaa is the same number throughout the factory and bbb is a unique number for each device. This is ok up to a maximum of 255 devices on a network.


In larger factories, the subnet is sometimes changed to 10.000.aaa.bbb and the subnet will be different to 255.255.255.0

Where both aaa and bbb can vary.


Subnet Mask in simple terms - same (255) and different (000).

For the 192.168.... range, subnet mask is always 255.255.255.0, so all ip addresses with the first 3 octets the same will talk to each other

192 .168 .001 .101
192 .168 .001 .102
Same Same Same Diff
255 .255 .255 .000

For the 10.0.....range, the 3rd octet could vary, so the subnet mask needs to allow for this. With a subnet mask of 255.255.000.000, all Ip addresses with ip address 10.0.aaa.bbb can talk to 10.0.xxx.yyy

010 .000 .004 .001
010 .000 .008 .054
Same Same Diff Diff
255 .255 .000 .000

The actual numbers in the subnet mask prevent cross talk between subnets and devices

...Again, please do not change the subnet mask unless told to do so by the IT department

Examples

IP1        192. 168. 001. 016
IP2        192. 168. 001. 010
SubnetMask 255. 255. 255. 000
           Same Same Same Diff
Can communicate
IP1        192. 168. 011. 016
IP2        192. 168. 001. 010
SubnetMask 255. 255. 255. 000
           Same Same Diff Diff
Cannot communicate


IP1        010. 000. 008. 011
IP2        010. 000. 001. 010
SubnetMask 255. 255. 255. 000
           Same Same Diff Diff
Cannot communicate
IP1        010. 000. 008. 011
IP2        010. 000. 001. 010
SubnetMask 255. 255. 000. 000
           Same Same Diff Diff
Can communicate


If you want to understand more about subnets and subnet mask, check out https://www.freecodecamp.org/news/subnet-mask-definition/

Commentaires

Draft