Help:Range blocks/fr


 * Voir /IPv6 pour les informations concernant le blocage des intervallles d'adresses IPv6.

Les blocages par intervalle d'adresses sont des restrictions techniques appliquées à travers Special:Block sur un groupe de adresses IP pour les empêcher de modifier, de créer des nouveaux comptes, d'envoyer des courriels via l'interface wiki, etc. Si vous cochez la case « », les modifications faites par les comptes enregistrés seront aussi interdites si les utilisateurs correspondants se connectent à partir de ces adresses bloquées.

Le blocage par intervalle est actif et utilisable sur tous les wikis Wikimedia ; s'il n'est pas actif sur votre wiki, ajoutez «  » dans   (toujours activé dans MediaWiki 1.18.0 et suivants).

To block an IP range from Special:Block, enter the first IP address in the range followed by a forward slash and a Classless inter-domain routing (CIDR) suffix. You should avoid performing range blocks unless you understand what you are doing, or you may end up blocking tens of thousands or even millions of people who are not the problem!

This article mainly discusses IPv4; IPv6 blocks work similarly, but have different implications - see /IPv6.

Explication non technique
IP addresses are broken up into blocks of numbers. An example of this would be  through to. Once it reaches  the next number is.

Les adresses IP peuvent être regroupées en blocs plus petits ou plus grands. Le bloc pratique le plus petit est de 4. Cela pourrait être l'un des blocs suivants :



Dans chaque bloc de quatre nombres, deux seulement peuvent être assignés à un ordinateur. Le premier et le dernier nombre de chaque bloc sont réservés à la communication réseau. These are level 30 blocks and can be expressed like this:



Le bloc suivant le plus grand est 8. Ils peuvent être ainsi :



In this block of 8 numbers only 6 can be assigned to a computer as, once again, the first and last numbers in a block are reserved for specific uses in network communication. Ces derniers peuvent aussi être exprimés ainsi :



From this point on, the number of IP addresses in a block continues to double: 16, 32, 64, 128, 256, etc.


 * A block of 16 would start.
 * A block of 32 would start.
 * A block of 64 would start.
 * A block of 128 would start.
 * A block of 256 would start.

So if you have an IP address and you want to block the range assigned how do you know which one to use? Considérons que vous avez un problème avec. Vous pouvez chercher qui possède cette adresse IP sur http://arin.net/whois/?queryinput=148.20.57.34. Say this tells us that this IP address is assigned, along with a LOT of others in a  range, to the Department of Defense. We certainly don't want to block a large block of the DoD! The rule of thumb is block as little as possible. Only block a range if there is a cluster of IP addresses giving a problem.

Il existe un calculateur très utile pour cela :
 * http://www.csgnetwork.com/ipinfocalc.html

allez sur ce site et entrez  dans le premier ensemble de blancs. Now select Network Prefix Length and enter  (this will give a block of 32 addresses) and click Calculate Network Information. This will show us a block of 32 IP addresses that include. (The first - network - and the last - broadcast - addresses will be displayed along with the usable addresses in the range.) You can use this tool to test ranges to be sure they are what you want before entering the information to initiate the block.

Explication technique
CIDR notation is written as the IP address, a slash, and the CIDR suffix (for example, the IPv4 " " or IPv6 " "). The CIDR suffix is the number of starting digits every IP address in the range have in common when written in binary.

For example: " " is binary " ", so  will match the first 27 digits (" "). The IP addresses –, when converted to binary, all have the same 27 first digits and will be blocked if   is blocked.

As the CIDR suffix increases, the block affects fewer IP addresses (see table of sample ranges). CIDR suffixes are not the same for IPv4 addresses as they are for IPv6 addresses; the same CIDR suffix in IPv4 blocks $$2^{96}$$=79,228,162,514,264,337,593,543,950,336 times as many addresses in IPv6.

Calcul du suffixe CIDR
You can use the table of sample ranges below to guess the range, use a computer script, or manually calculate the range.

Conversion en binaire
The first step in manually calculating a range is to convert the first and last IP address to binary representation. (This assumes you're not using a computer script, which can probably calculate the range for you anyway.) An IP address is composed of four groups of eight ones and zeros. Each group represents a number from 0 to 255. To convert a number to binary, you can use a reference table or know the value of each binary digit:

Proceeding from left to right, fill in  if the number is at least that value, and subtract that value (if it's not, fill in   and don't subtract). Par exemple, pour calculer 240 :


 * 1) 240 is at least 128, so place   and subtract 128.
 * 2) 112 (240-128) is at least 64, so place   and subtract 64.
 * 3) 48 (112-64) is at least 32, so place   and subtract 32.
 * 4) 16 (48-32) is at least 16, so place   and subtract 16.
 * 5) Since the remaining value is zero, all the remaining places are.

Thus, 240 is  because it can be represented as 128+64+32+16+0+0+0+0.

Calcul de l'intervalle

 * 1) Place both IP addresses one atop the other, and count how many starting digits are exactly alike. Ceci est le suffixe CIDR.
 * 2) Contrôlez par deux fois ! Being off by one digit could extend your block by thousands of addresses.

The example below calculates the CIDR range between  and. Note that this is a simple example; some groups of IP addresses do not so neatly fit CIDR suffixes, and need multiple different-sized blocks to block the exact range.


 * Adresses IP:


 * Convertir en binaire:


 * Count identical first numbers:


 * Intervalle CIDR:

Table des exemples d'intervalles
The table below shows the IPv4 blocks each CIDR suffix affects. Note that MediaWiki only supports blocking CIDR suffixes 16 - 32 in IPv4 and 19 (formerly 64) - 128 in IPv6 by default (subject to ). Voir /IPv6 pour une table d'intervalles IPv6.

Limites par défaut
Par défaut, l'installation de MediaWiki limite le nombre de blocs d'intervalles à 16 blocs d'intervalles d'adresses IPv4 (soit 65 536 addresses). Pour bloquer des intervalles plus grands doit être initialisé en conséquence dans.

Références

 * Routage interdomaine sans classe

Liens externes

 * IP Address Ranges Block gives you complete IP ranges for certain countries.
 * Netmask calculator which helps in making the correct decision for range blocks.
 * Subnet Calculator can help calculate prefix length and subnet mask for IPv4 and IPv6.
 * Calculateur de CIDR IP
 * Rangeblock-Calculator gives you the range you should use when blocking.
 * IPv4 and CIDR Calculator gives you a breakdown of Hosts and IP Range for any Given Mask/CIDR and reverse.