로그인
Sign in

From Transwiki

Jump to: navigation, search

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.

Mask table

Mask = /24

0-255

Mask = /25

0-127

128-255

Mask = /26

0-63

64-127

128-191

192-255

Mask = /27

0-31

32-63

64-95

96-127

128-159

160-191

192-223

224-255

Mask = /28

0-15

16-31

32-47

48-63

64-79

80-95

96-111

112-127

128-143

144-159

160-175

176-191

192-207

208-223

224-239

240-255

Mask = /29

 0-7

8-15

16-23

24-31

32-39

40-47

48-55

56-63

64-71

72-79

80-87

88-95

96-103

104-111

112-119

120-127

128-135

136-143

144-151

152-159

160-167

168-175

176-183

184-191

192-199

200-207

208-215

216-223

224-231

232-239

240-247

248-255

Mask = /30

0-3

4-7

8-11

12-15

16-19

20-23

24-27

28-31

32-35

36-39

40-43

44-47

48-51

52-55

56-59

60-63

64-67

68-71

72-75

76-79

80-83

84-87

88-91

92-95

96-99

100-103

104-107

108-111

112-115

116-119

120-123

124-127

128-131

132-135

136-139

140-143

144-147

148-151

152-155

156-159

160-163

164-167

168-171

172-175

176-179

180-183

184-187

188-191

192-195

196-199

200-203

204-207

208-211

212-215

216-219

220-223

224-227

228-231

232-235

236-239

240-243

244-247

248-251

252-255

 

Netmasks

Netmask              Netmask (binary)                 CIDR     Notes

255.255.255.255  11111111.11111111.11111111.1111

조회 수 :
302
추천 수 :
3 / 0
등록일 :
2010.07.22
12:05:35 (*.236.3.232)
엮인글 :
http://bestceok.com/xe/index.php?mid=unix_com&document_srl=2841&act=trackback&key=8d2
게시글 주소 :
http://bestceok.com/xe/index.php?mid=unix_com&document_srl=2841

하록

2010.07.22
13:55:41
(*.236.3.232)
Commonly Supported Subnets - Address Breakdown
Network Number Hosts Available Broadcast Address
255.255.255.128 N.N.N.0 N.N.N.1-126 N.N.N.127
/25 N.N.N.128 N.N.N.129-254 N.N.N.255


Network Number Hosts Available Broadcast Address
255.255.255.192 N.N.N.0 N.N.N.1-62 N.N.N.63
/26 N.N.N.64 N.N.N.65-126 N.N.N.127
N.N.N.128 N.N.N.129-190 N.N.N.191
N.N.N.192 N.N.N.193-254 N.N.N.255

Network Number Hosts Available Broadcast Address
255.255.255.224 N.N.N.0 N.N.N.1-30 N.N.N.31
/27 N.N.N.32 N.N.N.33-62 N.N.N.63
N.N.N.64 N.N.N.65-94 N.N.N.95
N.N.N.96 N.N.N.97-126 N.N.N.127
N.N.N.128 N.N.N.129-158 N.N.N.159
N.N.N.160 N.N.N.161-190 N.N.N.191
N.N.N.192 N.N.N.193-222 N.N.N.223
N.N.N.224 N.N.N.225-254 N.N.N.255

Network Number Hosts Available Broadcast Address
255.255.255.240 N.N.N.0 N.N.N.1-14 N.N.N.15
/28 N.N.N.16 N.N.N.17-30 N.N.N.31
N.N.N.32 N.N.N.33-46 N.N.N.47
N.N.N.48 N.N.N.49-62 N.N.N.63
N.N.N.64 N.N.N.65-78 N.N.N.79
N.N.N.80 N.N.N.81-94 N.N.N.95
N.N.N.96 N.N.N.97-110 N.N.N.111
N.N.N.112 N.N.N.113-126 N.N.N.127
N.N.N.128 N.N.N.129-142 N.N.N.143
N.N.N.144 N.N.N.145-158 N.N.N.159
N.N.N.160 N.N.N.161-174 N.N.N.175
N.N.N.176 N.N.N.177-190 N.N.N.191
N.N.N.192 N.N.N.193-206 N.N.N.207
N.N.N.208 N.N.N.209-222 N.N.N.223
N.N.N.224 N.N.N.225-238 N.N.N.239
N.N.N.240 N.N.N.241-254 N.N.N.255

Network Number Hosts Available Broadcast Address
255.255.255.248 N.N.N.0 N.N.N.1-6 N.N.N.7
/29 N.N.N.8 N.N.N.9-14 N.N.N.15
N.N.N.16 N.N.N.17-22 N.N.N.23
N.N.N.24 N.N.N.25-30 N.N.N.31
N.N.N.32 N.N.N.33-38 N.N.N.39
N.N.N.40 N.N.N.41-46 N.N.N.47
N.N.N.48 N.N.N.49-54 N.N.N.55
N.N.N.56 N.N.N.57-62 N.N.N.63
N.N.N.64 N.N.N.65-70 N.N.N.71
N.N.N.72 N.N.N.73-78 N.N.N.79
N.N.N.80 N.N.N.81-86 N.N.N.87
N.N.N.88 N.N.N.89-94 N.N.N.95
N.N.N.96 N.N.N.97-102 N.N.N.103
N.N.N.104 N.N.N.105-110 N.N.N.111
N.N.N.112 N.N.N.113-118 N.N.N.119
N.N.N.120 N.N.N.121-126 N.N.N.127
N.N.N.128 N.N.N.129-134 N.N.N.135
N.N.N.136 N.N.N.137-142 N.N.N.143
N.N.N.144 N.N.N.145-150 N.N.N.151
N.N.N.152 N.N.N.153-158 N.N.N.159
N.N.N.160 N.N.N.161-166 N.N.N.167
N.N.N.168 N.N.N.169-174 N.N.N.175
N.N.N.176 N.N.N.177-182 N.N.N.183
N.N.N.184 N.N.N.185-190 N.N.N.191
N.N.N.192 N.N.N.193-198 N.N.N.199
N.N.N.200 N.N.N.201-206 N.N.N.207
N.N.N.208 N.N.N.209-214 N.N.N.215
N.N.N.216 N.N.N.217-222 N.N.N.223
N.N.N.224 N.N.N.225-230 N.N.N.231
N.N.N.232 N.N.N.233-238 N.N.N.239
N.N.N.240 N.N.N.241-246 N.N.N.247
N.N.N.248 N.N.N.249-254 N.N.N.255

Network Number Hosts Available Broadcast Address
255.255.255.252 N.N.N.0 N.N.N.1-2 N.N.N.3
/30 N.N.N.4 N.N.N.5-6 N.N.N.7
N.N.N.8 N.N.N.9-10 N.N.N.11
N.N.N.12 N.N.N.13-14 N.N.N.15
N.N.N.16 N.N.N.17-18 N.N.N.19
N.N.N.20 N.N.N.21-22 N.N.N.23
N.N.N.24 N.N.N.25-26 N.N.N.27
N.N.N.28 N.N.N.29-30 N.N.N.31
N.N.N.32 N.N.N.33-34 N.N.N.35
N.N.N.36 N.N.N.37-38 N.N.N.39
N.N.N.40 N.N.N.41-42 N.N.N.43
N.N.N.44 N.N.N.45-46 N.N.N.47
N.N.N.48 N.N.N.49-50 N.N.N.51
N.N.N.52 N.N.N.53-54 N.N.N.55
N.N.N.56 N.N.N.57-58 N.N.N.59
N.N.N.60 N.N.N.61-62 N.N.N.63
N.N.N.64 N.N.N.65-66 N.N.N.67
N.N.N.68 N.N.N.69-70 N.N.N.71
N.N.N.72 N.N.N.73-74 N.N.N.75
N.N.N.76 N.N.N.77-78 N.N.N.79
N.N.N.80 N.N.N.81-82 N.N.N.83
N.N.N.84 N.N.N.85-86 N.N.N.87
N.N.N.88 N.N.N.89-90 N.N.N.91
N.N.N.92 N.N.N.93-94 N.N.N.95
N.N.N.96 N.N.N.97-98 N.N.N.99
N.N.N.100 N.N.N.101-102 N.N.N.103
N.N.N.104 N.N.N.105-106 N.N.N.107
N.N.N.108 N.N.N.109-110 N.N.N.111
N.N.N.112 N.N.N.113-114 N.N.N.115
N.N.N.116 N.N.N.117-118 N.N.N.119
N.N.N.120 N.N.N.121-122 N.N.N.123
N.N.N.124 N.N.N.125-126 N.N.N.127
N.N.N.128 N.N.N.129-130 N.N.N.131
N.N.N.132 N.N.N.133-134 N.N.N.135
N.N.N.136 N.N.N.137-138 N.N.N.139
N.N.N.140 N.N.N.141-142 N.N.N.143
N.N.N.144 N.N.N.145-146 N.N.N.147
N.N.N.148 N.N.N.149-150 N.N.N.151
N.N.N.152 N.N.N.153-154 N.N.N.155
N.N.N.156 N.N.N.157-158 N.N.N.159
N.N.N.160 N.N.N.161-162 N.N.N.163
N.N.N.164 N.N.N.165-166 N.N.N.167
N.N.N.168 N.N.N.169-170 N.N.N.171
N.N.N.172 N.N.N.173-174 N.N.N.175
N.N.N.176 N.N.N.177-178 N.N.N.179
N.N.N.180 N.N.N.181-182 N.N.N.183
N.N.N.184 N.N.N.185-186 N.N.N.187
N.N.N.188 N.N.N.189-190 N.N.N.191
N.N.N.192 N.N.N.193-194 N.N.N.195
N.N.N.196 N.N.N.197-198 N.N.N.199
N.N.N.200 N.N.N.201-202 N.N.N.203
N.N.N.204 N.N.N.205-206 N.N.N.207
N.N.N.208 N.N.N.209-210 N.N.N.211
N.N.N.212 N.N.N.213-214 N.N.N.215
N.N.N.216 N.N.N.217-218 N.N.N.219
N.N.N.220 N.N.N.221-222 N.N.N.223
N.N.N.224 N.N.N.225-226 N.N.N.227
N.N.N.228 N.N.N.229-230 N.N.N.231
N.N.N.232 N.N.N.233-234 N.N.N.235
N.N.N.236 N.N.N.237-238 N.N.N.239
N.N.N.240 N.N.N.241-242 N.N.N.243
N.N.N.244 N.N.N.245-246 N.N.N.247
N.N.N.248 N.N.N.249-250 N.N.N.251
N.N.N.252 N.N.N.253-254 N.N.N.255

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 자주 사용하는 명령어 제비게릴라 2019-06-27 179
172 logrotate 오류시... [1] 하록 2010-12-31 1383
171 parted 명령 [1] 하록 2010-11-04 760
170 중복라인 한줄로 표시... 하록 2010-10-12 455
169 chattr, lsattr 파일 속성 변경 하록 2010-08-20 689
168 리눅스 커널 설정 [5] 하록 2010-08-19 1318
167 ext3 -> ext4로 변환 방법 하록 2010-08-17 414
166 vi에서 한글 깨질때... 하록 2010-08-04 277
165 tar 분할 압축....... 하록 2010-08-03 329
» subnet [1] 하록 2010-07-22 302
163 Netmask [2] 하록 2010-07-22 304
162 지수 표현 법.. 하록 2010-07-22 375
161 root password 만료시.... 조치 방법 하록 2010-07-16 875
160 리눅스 oom-killer [1] 하록 2010-06-29 1572
159 glance Log 체크 하록 2010-06-24 327
158 e2label 방법... 하록 2010-06-11 296
157 리눅스에서 iso 마운트 하기.... 하록 2010-05-31 594
156 어제 날짜 구하기... [1] 하록 2010-05-28 343
155 open ipmi 를 이용한 서버관리 하록 2010-05-10 728
154 NFS에서 실행이나 카피가 안되는 경우 하록 2010-04-20 987
153 ftp 명령어 설명... 하록 2010-04-09 1139