서브넷팅 & IP 주소 (2)

oogu ㅣ 2022. 4. 18. 22:00

@ 서브넷팅&주소 요약

1. 서브넷팅

 - 서브넷팅 목적 : IP 주소 낭비 방지
 - 서브넷팅 방법 : 원본 네트워크를 여러개의 네트워크로 분리하는 계산 작업

 

Ex1) 서브넷팅

 - 원본 네트워크 : 198.133.219.0/24 <- 2^8 - 2 = 254개
 - 서브넷 개수 : 5개 이상
 - 최대 필요한 IP 주소 개수 : 29개(서브넷 하나에 최대로 필요한 IP개수)

 

2^x - 2 >= 29

 x = 5 (호스트 유저 비트 개수)

2^5 - 2 = 30개

------------------------------------------------------------------------------------

198.133.219.000 00000

255.255.255.111 00000   <- 255.255.255.224 /27 (증가한 서브넷 마스크 비트만큼 서브넷이 나눠진다.)

--------------------------- [네트워크 이름]     [서브넷 브로드케스트 주소] 
198.133.219.000 00000 <- 198.133.219.0 ~   198.133.219.31
198.133.219.001 00000 <- 198.133.219.32 ~  198.133.219.63
198.133.219.010 00000 <- 198.133.219.64 ~  198.133.219.95
198.133.219.011 00000 <- 198.133.219.96 ~  198.133.219.127
198.133.219.100 00000 <- 198.133.219.128 ~ 198.133.219.159
198.133.219.101 00000 <- 198.133.219.160 ~ 198.133.219.191
198.133.219.110 00000 <- 198.133.219.192 ~ 198.133.219.223
198.133.219.111 00000 <- 198.133.219.224 ~ 198.133.219.255
---------------------------------------------------------------------------------
[설정 가능한 IP 주소 범위]

198.133.219.1 ~ 198.133.219.30 <- 30개 <-----  198.133.219.0/27
198.133.219.33 ~ 198.133.219.62 <- 30개 <-----  198.133.219.32/27
198.133.219.65 ~ 198.133.219.94 <- 30개 <-----  198.133.219.64/27
198.133.219.97 ~ 198.133.219.126 <- 30개 <-----  198.133.219.96/27
198.133.219.129 ~ 198.133.219.158 <- 30개 <-----  198.133.219.128/27

198.133.219.161 ~ 198.133.219.190 <- 30개 <-----  198.133.219.160/27
198.133.219.193 ~ 198.133.219.222 <- 30개 <-----  198.133.219.192/27
198.133.219.225 ~ 198.133.219.254 <- 30개 <-----  198.133.219.224/27

 

 

EX1-1) 서브넷팅
 
 - 원본 네트워크 : 198.133.219.0 < - 2^8 -2 = 254개
 - 서브넷 개수 : 5개 이상
 - 최대 필요한 IP 주소 개수 : 12개

2^X -2  >= 12

2 ^ 4 -2 >= 14

------------------------------------------------------------------------------------
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
128 64 32 16 8 4 2 1
------------------------------------------------------------------------------------
198.133.219.0000 0000
198.133.219.1111 0000   <- 198.133.219.240 <- /28
------------------------------------------------------------------------------------
-------------------------- 네트워크 이름    서브넷 브로드캐스트 주소
198.133.219.0000 0000 198.133.219.0 ~ 198.133.219.15
198.133.219.0001 0000 198.133.219.16 ~ 198.133.219.31
198.133.219.0010 0000 198.133.219.32 ~ 198.133.219.47
198.133.219.0011 0000 198.133.219.48 ~ 198.133.219.63
198.133.219.0100 0000 198.133.219.64 ~ 198.133.219.79
198.133.219.0101 0000 198.133.219.80 ~ 198.133.219.95
198.133.219.0110 0000 198.133.219.96 ~ 198.133.219.111
198.133.219.0111 0000 198.133.219.112 ~ 198.133.219.127
198.133.219.1000 0000 198.133.219.128 ~ 198.133.219.143
198.133.219.1001 0000 198.133.219.144 ~ 198.133.219.159
198.133.219.1010 0000 198.133.219.160 ~ 198.133.219.175
198.133.219.1011 0000 198.133.219.176 ~ 198.133.219.191
198.133.219.1100 0000 198.133.219.192 ~ 198.133.219.207
198.133.219.1101 0000 198.133.219.208 ~ 198.133.219.223
198.133.219.1110 0000 198.133.219.224 ~ 198.133.219.239
198.133.219.1111 0000 198.133.219.240 ~ 198.133.219.255
---------------------------------------------------------------------------------
[설정 가능한 IP 주소 범위]
198.133.219.1 ~ 198.133.219.14 <-14 개 <-198.133.219.0/28
198.133.219.17 ~ 198.133.219.30 <-14 개 <-198.133.219.16/28
198.133.219.33 ~ 198.133.219.46 <-14 개 <-198.133.219.32/28
198.133.219.49 ~ 198.133.219.62 <-14 개 <-198.133.219.48/28
198.133.219.65 ~ 198.133.219.78 <-14 개 <-198.133.219.64/28
198.133.219.81 ~ 198.133.219.94 <-14 개 <-198.133.219.80/28
198.133.219.97 ~ 198.133.219.110 <-14 개 <-198.133.219.96/28
198.133.219.113 ~ 198.133.219.126 <-14 개 <-198.133.219.112/28
198.133.219.129 ~ 198.133.219.142 <-14 개 <-198.133.219.128/28
198.133.219.145 ~ 198.133.219.158 <-14 개 <-198.133.219.144/28
198.133.219.161 ~ 198.133.219.174 <-14 개 <-198.133.219.160/28
198.133.219.177 ~ 198.133.219.190 <-14 개 <-198.133.219.176/28
198.133.219.193 ~ 198.133.219.206 <-14 개 <-198.133.219.192/28
198.133.219.209 ~ 198.133.219.222 <-14 개 <-198.133.219.208/28
198.133.219.225 ~ 198.133.219.238 <-14 개 <-198.133.219.224/28
198.133.219.241 ~ 198.133.219.254 <-14 개 <-198.133.219.240/28  

 

 

EX1-2) 서브넷팅
 
 - 원본 네트워크 : 133.200.0.0/16 <-2^16 -2 == 65534개
 - 서브넷 개수 : 15개 이상
 - 최대 필요한 IP 주소 개수 : 4000개

 

2 ^ X -2 >= 4000

2 ^ 12 -2 >= 4094

---------------------------------------------------------------------------------
133.200.0000 0000.00000000
255.255.1111 0000.00000000 < - /20
------------------------------ [네트워크 이름]     [서브넷 브로드케스트 주소] 
133.200.0000 000000000000 133.200.0.0           133.200.15.255
133.200.0001 000000000000 133.200.16.0          133.200.31.255
133.200.0010 000000000000 133.200.32.0          133.200.47.255
133.200.0011 000000000000 133.200.48.0          133.200.63.255

.
.
.
.
133.200.1111 000000000000 133.200.240.0         133.200.255.255
---------------------------------------------------------------------------------
[설정 가능한 IP 주소 범위]
133.200.0.1  ~ 133.200.15.254
133.200.16.1  ~ 133.200.31.254
133.200.32.1  ~ 133.200.47.254
133.200.48.1  ~ 133.200.63.254
133.200.240.1  ~ 133.200.255.254

 

Ex2) 141.160.7.148/27

 - 네트워크 이름? 141.160.7.128
 - 서브넷 브로드케스트 주소? 141.160.7.159
 
255.255.255.1110 0000

 

Ex3) 181.160.85.225/28

 - 네트워크 이름? 181.160.85.224/28
 - 서브넷 브로드케스트 주소? 181.160.85.239

255.255.255.1111 0000

 

Ex4) 192.168.1.133/30

 - 네트워크 이름? 192.168.1.132/30
 - 서브넷 브로드케스트 주소? 192.168.1.135

255.255.255.111111 00

 

Ex5) 121.160.30.17/30

 - 네트워크 이름? 121.160.30.16/30
 - 서브넷 브로드케스트 주소? 121.160.30.19

255.255.255.111111 00

 

Ex6) 211.240.56.188/26

 - 네트워크 이름? 211.240.56.128/26
 - 서브넷 브로드케스트 주소? 211.240.56.191

255.255.255.11 000000

 

EX7)

 - 네트워크 이름 : 198.133.219.64/27
   설정 가능한 IP 주소 범위?
255.255.255.111 00000

198.133.219.65 ~ 198.133.219.94

 

EX8)

 - 네트워크 이름 : 198.133.219.128/30
   설정 가능한 IP 주소 범위?

255.255.255.11111100

198.133.219.129 ~ 198.133.219.130

 

EX9)

PC IP 주소로 설정이 가능한것은?

PC-------------------------------[F0/0]R1
                              198.133.219.158/28

1. 198.133.219.144
2. 198.133.219.158
3. 198.133.219.159
4. 198.133.219.145
5. 198.133.219.166

'네트워크' 카테고리의 다른 글

Cisco IOS 명령어(2)  (0) 2022.04.20
Cisco IOS 명령어(1)  (0) 2022.04.19
IP 주소 특징(1)  (0) 2022.04.17
와이어 샤크 사용법  (0) 2022.04.17
네트워크 실습, 데이터 전송 프로토콜  (0) 2022.04.16