Download presentation
Presentation is loading. Please wait.
Published bySydney Blankenship Modified over 9 years ago
1
21-IP addressing Dr. John P. Abraham Professor UTPA
2
Chapters 19, 20 I have already covered these concepts elsewhere.
3
Addressing Physical Logical
4
IP address 32 bits –Hierarchy – prefix and suffix –Prefix identifies the network – given by IANA In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization. The range of addresses can automatically be inferred from the network address. –Suffix identifies the computer –given locally –No two computers can have the same public IP
5
Classful IP addressing Divided IP address space into three primary classes A, B, C and also there exist class D (multicasting) and E. First four (MSB) bits will determine its class
6
Class Lea ding Bits Size of Network Number Bit field Size of Rest Bit field Number of Networks Addresse s per Network Start addres s End address Class A 0 8 24 128 (2 7 ) 16,777, 216 (2 24 ) 0.0.0.0127.255. 255.255 Class B 10 16 16,384 (2 14 ) 65,536 (2 16 ) 128.0.0. 0 191.255. 255.255 Class C 110 24 8 2,097,1 52 (2 21 ) 256 (2 8 )192.0.0. 0 223.255. 255.255 Class D (multicast)multicast 1110 not defined 224.0.0. 0 239.255. 255.255 Class E (reserved) 1111 not defined 240.0.0. 0 255.255. 255.255
7
Finding the address class
8
Figure 4.5 Finding the class in decimal notation
9
Find the class of each address: a. 227.12.14.87b.193.14.56.22c.14.23.120.8 d. 252.5.15.111e.134.11.78.56 Solution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 193 (between 192 and 223); the class is C. c. The first byte is 14 (between 0 and 127); the class is A. d. The first byte is 252 (between 240 and 255); the class is E. e. The first byte is 134 (between 128 and 191); the class is B.
10
Subnet Addressing The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero.
11
Subnets Makes smaller networks for better security and easy management Mask is used by routers to find the network portion of the address. AND operation.
12
Creating subnet masks Determine how many subnets you need How many bits would be required to create that many subnets? –For example you need 8 subnets, need 3 bits set aside. Certain addresses are reserved, so all subnets can’t be used. Turn those bits (msb) to 1. –For example class C, default subnet is 255.255.255.0, if you decided to subnet it to 8 subnets, then you would use the subnet 255.255.255.224. I will explain in class.
13
Given the address 23.56.7.91, find the beginning address (network address). Example 12 Solution The default mask is 255.0.0.0, which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is 23.0.0.0.
14
What is the subnetwork address if the destination address is 200.45.34.56 and the subnet mask is 255.255.240.0? Example 15 Solution We 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.
15
Figure 4.25 Comparison of a default mask and a subnet mask
16
Table 4.3 Special addresses Private IPs
17
CIDR notation Classless Inter-Domain routing (CIDR) Ddd.ddd.ddd.ddd/m 192.5.48.69/26 Used for subnetting and supernetting An ISP can now subdivide a larger blocks and hand out 1, 2, 4, 8,.. (power of 2) to the customers. These are called variable length bocks and we use a slash notation.
18
Slash notation In classless addressing we need to include the prefix length to each address if we need to find the block of the address. Given the address 167.199.170.82/27 the netmask is 255.255.255.224 (27 ones).
19
Calculations Given the address 110.23.120.14/20 find the number of address, the first and last address in the block –There are 20 1s. So 255.255.?.0 11110000 is 240. The mask is 255.255.240.0 –Number of addresses is 32-20, so 2 12 or 4096 –To find the first address AND the given address with the mask. 110.23.120.14 AND 255.255.240.0 = 110.23.112.0 (third octet 01110000 AND 11110000 –To find the last address: OR the address with the complement of the mask. 110.23.127.255 (also we can keep all the 32-20 left most bits of the IP and change the 12 rightmost to 1s.
20
10.4.12.0/22 Mask is 255.255.252.0 First IP 10.4.00011000.0 AND 255.255.11111100.0 =10.4.00011000.0 = 10.4.12.0 Number of IP is 32-22 = 10. 2 10 =1024 Last 10.4.15.255
21
Block Assignment The number of IP addresses requested should be power of 2 The requested block needs to be allocated where there are a contiguous number of unallocated addresses in the address space. –Suppose a block of 1000 IP requested. –Power of 2 is 2 10 which is 1024. –Prefix length is 32-10 which is 22. –From the available address space, say 18.14.12.0/22 (which is divisible by 1024) is given. Last address is 18.14.15.255
22
Special addresses All zeros – When a device does not know its on IP address, it requests one using this address as the source and sends a limited broadcast asking for an IP. Therefore, all zeros means, me. All ones. Limited broadcast address in the current network. Loopback address. 127.0.0.0 is localhost. Used to test a software on a machine.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.