Четверг, 25.04.2024, 02:37
Приветствую Вас Гость | RSS

Настройка Ubuntu / Debian

Меню сайта
Форма входа
Поиск
Календарь
«  Январь 2010  »
ПнВтСрЧтПтСбВс
    123
45678910
11121314151617
18192021222324
25262728293031

Дневник

Главная » 2010 » Январь » 25 » Маска сети и классы сети.
14:03
Маска сети и классы сети.
IP-Subnet-Mask numbers

IP mask numbers are used to divide internet addresses into blocks called subnets. The mask number represents the number of 1s in the binary of the address that is 'masked" against the address so that it ignores the last bits which are for the group of IP addresses in the masked address.

The first address of a subnet block (all 0s) is called the network address or network ID. The last address (all 1s) is the broadcast address of the network. Typically the network address +1 or the broadcast address -1 is the gateway to the internet. The 'slash' notation (ie /24) is known as CIDR format, while the more conventional 255.255.255.0 notation is considered a subnet mask.

Net bits
    Subnet mask     total-addresses
/20     255.255.240.0     4096
/21     255.255.248.0     2048
/22     255.255.252.0     1024
/23     255.255.254.0     512
/24     255.255.255.0     256
/25     255.255.255.128     128
/26     255.255.255.192     64
/27     255.255.255.224     32
/28     255.255.255.240     16
/29     255.255.255.248     8
/30     255.255.255.252     4

The first address of a subnet block (all 0s) is called the network address or network ID. The last address (all 1s) is the broadcast address of the network. Typically the network address +1 or the broadcast address -1 is the gateway to the internet. This leaves us with total number of IP numbers -3 left over for host address with in a sub net block. That's why you either get 1 IP (4-3= 1) or if you ask for one more you get 5 (8-3=5).
Here is an example:

192.168.1.0/25 would include all address between 192.168.1.0 and 192.168.1.127

while 192.168.1.128/25 would include 192.168.1.128 and 192.168.1.255

Below is a mask table that makes it easy to look up the mask for a group of IP addresses.

Netmasks

Netmask Netmask (binary) CIDR Notes
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr)
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable
255.255.255.0 11111111.11111111.11111111.00000000 /24 "Class C" 254 useable
255.255.254.0 11111111.11111111.11111110.00000000 /23 2 Class C's
255.255.252.0 11111111.11111111.11111100.00000000 /22 4 Class C's
255.255.248.0 11111111.11111111.11111000.00000000 /21 8 Class C's
255.255.240.0 11111111.11111111.11110000.00000000 /20 16 Class C's
255.255.224.0 11111111.11111111.11100000.00000000 /19 32 Class C's
255.255.192.0 11111111.11111111.11000000.00000000 /18 64 Class C's
255.255.128.0 11111111.11111111.10000000.00000000 /17 128 Class C's
255.255.0.0 11111111.11111111.00000000.00000000 /16 "Class B"
 
255.254.0.0 11111111.11111110.00000000.00000000 /15 2 Class B's
255.252.0.0 11111111.11111100.00000000.00000000 /14 4 Class B's
255.248.0.0 11111111.11111000.00000000.00000000 /13 8 Class B's
255.240.0.0 11111111.11110000.00000000.00000000 /12 16 Class B's
255.224.0.0 11111111.11100000.00000000.00000000 /11 32 Class B's
255.192.0.0 11111111.11000000.00000000.00000000 /10 64 Class B's
255.128.0.0 11111111.10000000.00000000.00000000 /9 128 Class B's
255.0.0.0 11111111.00000000.00000000.00000000 /8 "Class A"
254.0.0.0 11111110.00000000.00000000.00000000 /7
252.0.0.0 11111100.00000000.00000000.00000000 /6
248.0.0.0 11111000.00000000.00000000.00000000 /5
240.0.0.0 11110000.00000000.00000000.00000000 /4
224.0.0.0 11100000.00000000.00000000.00000000 /3
192.0.0.0 11000000.00000000.00000000.00000000 /2
128.0.0.0 10000000.00000000.00000000.00000000 /1
0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space

Категория: Linux / Debian | Просмотров: 1387 | Добавил: CheGuevara | Рейтинг: 0.0/0
Всего комментариев: 0
Имя *:
Email *:
Код *:
Наш опрос
Оцените мой сайт
Всего ответов: 26
Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0