2006-09-27 경북대학교컴퓨터공학과 1 제 5 장서브넷팅과슈퍼넷팅 서브넷팅 (subnetting) 슈퍼넷팅 (Supernetting)
2006-09-27 경북대학교컴퓨터공학과 2 서브넷팅과슈퍼넷팅 서브넷팅 (subnetting) 하나의네트워크를여러개의서브넷 (subnet) 으로분할 슈퍼넷팅 (supernetting) 여러개의서브넷주소를결합 The idea of subnetting and supernetting of classful addresses is almost obsolete.
2006-09-27 경북대학교컴퓨터공학과 3 2-단계계층구조 Classful addressing : netid + hostid 먼저 netid 를사용하여네트워크에도달한후에 hostid 를사용하여호스트에도달 A, B, C 클래스는 2 단계계층구조
2006-09-27 경북대학교컴퓨터공학과 4 3-단계계층구조 3 단계이상의계층구조를위하여서브넷팅활용
3-단계계층구조 2006-09-27 경북대학교컴퓨터공학과 5
서브넷마스크 2006-09-27 경북대학교컴퓨터공학과 6
2006-09-27 경북대학교컴퓨터공학과 7 Example 15 What is the subnetwork address if the destination address is 200.45.34.56 and the subnet mask is 255.255.240.0? Solution Apply the AND operation on the address and the subnet mask. Address 11001000 00101101 00100010 00111000 Subnet Mask 11111111 11111111 11110000 00000000 Subnetwork Address 11001000 00101101 00100000 00000000.
서브넷의특수주소 2006-09-27 경북대학교컴퓨터공학과 8
Example B 클래스주소를가진기관이 12 개의서브넷이필요할때 12 개지만 14 개필요 (subnetid 필드가모두 1 인것과 0 인것 ) 서브넷할당을위한최소비트수 : 4 개 나머지 12 개비트는 hostid (2 12 = 4,096) 지정, 실제는 4,094 개 Mask = 255.255.240.0 (240 = 11110000) 서브넷 X.Y.0000hhhh.hhhhhhhh (X.Y.0.0) ~ X.Y.1111hhhh.hhhhhhhh (X.Y.240.0) 2006-09-27 경북대학교컴퓨터공학과 9
Example 2006-09-27 경북대학교컴퓨터공학과 10
2006-09-27 경북대학교컴퓨터공학과 11 Example C 클래스주소를가진기관이 5 개의서브네트워크를필요할때 5 개지만 7 개필요 (subnetid 가모두 1 인것과 0 인것포함 ) 서브넷할당을위한최소비트수 : 3 개 (2 2 < 7 <2 3 ) 나머지 5 개의비트 hostid(2 5 = 32 개 ), 실제는 30 개호스트지정가 능 Mask = 255.255.255.224 (224 = 11100000) 서브넷 X.Y.Z.000hhhhh (X.Y.Z.0) ~ X.Y.Z.111hhhhh (X.Y.Z.224)
Example 2006-09-27 경북대학교컴퓨터공학과 12
2006-09-27 경북대학교컴퓨터공학과 13 가변길이서브넷팅 예 : C 클래스주소를허가받고각각 60,60,60,30,30 개 의호스트를갖는 5 개의서브넷이필요한사이트 subnetid : 2 비트할당 2 6 2 = 62 개호스트허용 subnetid : 3 비트할당 2 5 2 = 30 개호스트허용 불가능 해결책 - 가변길이서브넷팅 하나의마스크를적용한후에다른마스크를적용 255.255.255.192 마스크를 3 개의서브넷에적용 (11111111 11111111 11111111 11000000) 255.255.255.224 마스크를다시 2 개의서브넷에적용 (11111111 11111111 11111111 11100000)
2006-09-27 경북대학교컴퓨터공학과 14 가변길이서브넷팅 ( 계속 ) 서브넷필드 =00 서브넷필드 =01 서브넷필드 =10 서브넷필드 =11 2 차서브넷필드 =0 2 차서브넷필드 =1
슈퍼넷팅 2006-09-27 경북대학교컴퓨터공학과 15
Supernet mask 2006-09-27 경북대학교컴퓨터공학과 16
2006-09-27 경북대학교컴퓨터공학과 17 Example Q: We need to make a supernetwork out of 16 class C blocks. What is the supernet mask? A: 16 개의블록필요. 마스크 = 11111111 11111111 11110000 00000000 (255.255.240.0)
2006-09-27 경북대학교컴퓨터공학과 18 Example Q: A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. A router receives three packets with the following destination addresses: Which packet belongs to the supernet? A: We apply the supernet mask to see if we can find the beginning address. DA = 205.16.37.44 AND 255.255.248.0 DA = 205.16.42.56 AND 255.255.248.0 DA = 205.17.33.76 AND 255.255.248.0 205.16.32.0 (o) 205.16.40.0 (x) 205.17.32.0 (x) IP packet Mask= 255.255.248.0 Router Supernet 205.16.32.0
2006-09-27 경북대학교컴퓨터공학과 19 Example Q: A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. How many blocks are in this supernet and what is the range of addresses? A: Supernet mask : 255.255.248.0 = 255.255.11111000.00000000 Beginning address : 205.16. 32.0 = 205.16.00100000.00000000 So, 2 3 or 8 blocks in this supernet. The blocks are 205.16.32.0 to 205.16.39.0. The range is 205.16.32.0 ~ 205.16.39.255. 205.16.00100001.00000000 205.16.00100010.00000000.. 205.16.00100111.00000000
2006-09-27 경북대학교컴퓨터공학과 20 Example 예 : 1,000 개의주소가필요한기관 ( 시작주소 =X.Y.32.0) 슈퍼넷마스크 255.255.252.0 (252=11111100) 을이용하여 4 개의 C 클래스주소결합 X.Y.00100000.0, X.Y.00100001.0, X.Y.00100010.0, X.Y.00100011.0 => X.Y.32.0, X.Y.33.0, X.Y.34.0, X.Y.35.0 패킷목적지주소에슈퍼넷마스크적용 최하위주소가같다면슈퍼넷에속한다
Example 2006-09-27 경북대학교컴퓨터공학과 21
2006-09-27 경북대학교컴퓨터공학과 22 Example 12 An organization is granted the block 130.34.12.64/26. The organization needs 4 subnets. What is the subnet prefix length? Solution 130.34.12.64/26=130.34.12.01000000 6비트의 suffix => 블록내전체주소수 = 2 6 = 64 각서브넷은 16개의호스트주소지정 => subnet prefix = /28 Subnet 1: 130.34.12.64/28~130.34.12.79/28. (130.34.12.0100hhhh) Subnet 2 : 130.34.12.80/28~130.34.12.95/28. (130.34.12.0101hhhh) Subnet 3: 130.34.12.96/28~130.34.12.111/28. (130.34.12.0110hhhh) Subnet 4: 130.34.12.112/28~130.34.12.127/28. (130.34.12.0111hhhh)
2006-09-27 경북대학교컴퓨터공학과 23
2006-09-27 경북대학교컴퓨터공학과 24 Example 14 An organization is granted a block of addresses with the beginning address 14.24.74.0/24. There are 2 32 24 = 256 addresses in this block. The organization needs to have 11 subnets as shown below: a. two subnets, each with 64 addresses. b. two subnets, each with 32 addresses. c. three subnets, each with 16 addresses. d. four subnets, each with 4 addresses. Design the subnets.
Example 14 (Continuted) 1. We use the first 128 addresses for the first two subnets, each with 64 addresses. Mask for each network is /26. 14.24.01001010.sshhhhhh (ss=00,01) 14.24.74.0/26~14.24.74.63/26 14.24.74.64/26~14.24.74.127/26 2. We use the next 64 addresses for the next two subnets, each with 32 addresses. Mask for each network is /27. 14.24.01001010.ssshhhhh (sss=100,101) 14.24.74.128/27~14.24.74.159/27 14.24.74.160/27~14.24.74.192/27 3. We use the next 48 addresses for the next three subnets, each with 16 addresses. Mask for each network is /28. 14.24.01001010.sssshhhh (ssss=1100,1101,1110) 14.24.74.192/28~14.24.74.207/28 14.24.74.208/28~14.24.74.223/28 14.24.74.224/28~14.24.74.239/28 4. We use the last 16 addresses for the last four subnets, each with 4 addresses. Mask for each network is /30. 14.24.01001010.sssssshh (ssssss=111100,111101,111110,111111) 14.24.74.240/30~14.24.74.243/30 14.24.74.244/30~14.24.74.247/30 14.24.74.248/30~14.24.74.251/30 14.24.74.252/30~14.24.74.255/30 2006-09-27 경북대학교컴퓨터공학과 25
2006-09-27 경북대학교컴퓨터공학과 26
2006-09-27 경북대학교컴퓨터공학과 27 Example 15 A company has three offices: Central, East, and West. The Central office is connected to the East and West offices via private, point-to-point WAN lines. The company is granted a block of 64 addresses with the beginning address 70.12.100.128/26. The management has decided to allocate 32 addresses for the Central office and divides the rest of addresses between the two offices. R West R R Central R R East 64 addresses 70.12.100.128/26
2006-09-27 경북대학교컴퓨터공학과 28 Example 15 (Continued) The company will have three subnets, one at Central, one at East, and one at West. a. The Central office uses the network address 70.12.100.128/27 (70.12.100.10000000/27). The addresses in this subnet are 70.12.100.128/27 to 70.12.100.159/27. (32 addresses) Note that three of these addresses are used for the routers and the company has reserved the last address in the sub-block. Note that the interface of the router that connects the Central subnet to the WAN needs no address because it is a point-to-point connection.
2006-09-27 경북대학교컴퓨터공학과 29 Example 15 (Continued) b. The West office uses the network address 70.12.100.160/28 (70.12.100.10100000/28). The addresses in this subnet are 70.12.100.160/28 to 70.12.100.175/28. (16 addresses) Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block. c. The East office uses the network address 70.12.100.176/28. (70.12.100.10110000/28) The addresses in this subnet are 70.12.100.176/28 to 70.12.100.191/28. (16 addresses) Note that one of these addresses is used for the router and the company has reserved the last address in the sub-block.
2006-09-27 경북대학교컴퓨터공학과 30
2006-09-27 경북대학교컴퓨터공학과 31 Example 16 An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses c. The third group has 128 customers; each needs 64 addresses. Design the subblocks and find out how many addresses are still available after these allocations.
2006-09-27 경북대학교컴퓨터공학과 32 Group 1: 64 개의서브넷, 서브넷당 256 개의주소필요 (8 비트의 suffix 와 24 비트의 prefix) 01 : 190.100.0.0/24 ~ 190.100.0.255/24 02 : 190.100.1.0/24 ~ 190.100.1.255/24.. 64 : 190.100.63.0/24 ~ 190.100.63.255/24 Total = 64 256 = 16,384 Group 2: 128 개의서브넷, 서브넷당 128 개의주소필요 (7 비트의 suffix 와 25 비트의 prefix) 001 : 190.100.64.0/25 ~ 190.100.64.127/25 002 : 190.100.64.128/25 ~ 190.100.64.255/25.. 128 : 190.100.127.128/25 ~ 190.100.127.255/25 Total = 128 128 = 16,384
2006-09-27 경북대학교컴퓨터공학과 33 Group 3: 128 개의서브넷, 서브넷당 64 개의주소필요 (6 비트의 suffix, 26 비트의 prefix) 001 : 190.100.128.0/26 ~ 190.100.128.63/26 002 : 190.100.128.64/26 ~ 190.100.128.127/26 128 : 190.100.159.192/26 ~ 190.100.159.255/26 Total = 128 64 = 8,192 Number of granted addresses: 65,536 Number of allocated addresses: 40,960 Number of available addresses: 24,576
2006-09-27 경북대학교컴퓨터공학과 34