CHAPTER 19 Logical Addressing Subnet Process of Breaking
CHAPTER 19 Logical Addressing
Subnet Process of Breaking Down of an IP Network into small Networks. Ex. A country is broken down in small States. --You can understand it very easily. 2
Subnetting, Subnet & Subnet Mask ü Subnetting, a subnet & a subnet mask are all different. ü In fact, the 1 st creates the 2 nd & is identified by the 3 rd. ü Subnetting is the process of dividing a network into smaller sub-networks is called a subnetwork or subnet. ü Subnet mask is a mask used to determine what subnet an IP address belongs to. üSubnetting means we borrow some bits from the host part to add to the network part. 3
Why Subnetting • The problem here is if we want to create 300 networks how can we do that? In the above example, we can only create different networks when changing the first octet so we can create a maximum of 256 networks because the first octet can only range from 0 to 255 (in fact it is much smaller because class A only range from 1 to 126). Now we have to use a technique called “subnetting” to achieve our purpose. • For example, we can borrow some bits in the next octet to make the address 11. 1. 0. 1 belong to a different network from 11. 0. 0. 1. 4
Subnetting When changing a number in the Network part of an IP address we will be in a different network from the previous address. For example, the IP address 11. 0. 0. 1 belongs to class A and has a default subnet mask of 255. 0. 0. 0; if we change the number in the first octet (a block of 8 bits, the first octet is the leftmost 8 bits) we will create a different network. For example, 12. 0. 0. 1 is in a different network from 11. 0. 0. 1. But if we change a number in the Host part, we are still in the same Network. For example, 11. 1. 0. 1 is in the same network of 11. 0. 0. 1. 5
Basic Idea of Subnetting § Split the host number portion of an IP address into a subnet number and a (smaller) host § Result is a 3 -layer hierarchy network prefix host number subnet number host number extended network prefix 6
How to subnetting? IP address(in Decimal): 11. 0. 0. 1 IP address(in Binary) : 00001011. 000000001 Default subnet mask : 1111. 00000000 <-Network address-> <------Host address------> Now you can clearly see that the subnet mask will decide which is the Network part, which is the Host part. By borrowing 8 bits, our subnet mask will be like this: IP address(in Decimal): 11. 0. IP address(in Binary) : 00001011. 0000. Default subnet mask: 11111111. 0000 <Network address> <Subnet address> 0. 1 00000001 0000. <Host address> 7
Cont. After changing the second octet of the subnet mask from all “ 0″ to all “ 1″, the Network part is now extended. Now we can create new networks by changing number in the first or second octet. This greatly increases the number of networks we can create. With this new subnet mask, IP 11. 1. 0. 1 is in different network from IP 11. 0. 0. 1 because “ 1″ in the second octet now belongs to the Network part. So, in conclusion we “subnet” by borrowing bit “ 0″ in the Host portion and converting them to bit “ 1″. The number of borrowed bits is depended on how many networks we need. 8
Cont. Note: A rule of borrowing bits is we can only borrow bit 0 from the left to the right without skipping/avoiding any bit 0. For example, you can borrow like this: “ 1111. 1100 0000″ but not this: “ 1111. 1010 0000″. In general, just make sure all your bit “ 1″s are successive on the left and all your bit “ 0″s are successive on the right. 9
Advantage & Disadvantage of Subnetting H. W 10
Supernetting Classes A and B are almost depleted. Class C addresses are still available. (Supernetting applies only to the class C addresses) Supernetting is the process of combining several IP networks with a common network prefix. You may remember, in Subnetting we are adding the bits from the host part to the network part. But in Supernetting we do the reverse. Here in supernetting we add bits from the network part to the host part. The process of forming a supernet is often called supernetting, prefix aggregation, route aggregation or route summarization. 11
Supernetting § The number of blocks must be a power of 2 (1, 2, 4, 8, 16, . . . ). § The blocks must be contiguous in the address space (no gaps between the blocks). § The third byte of the first address in the superblock must be evenly divisible by the number of blocks. § In other words, if the number of blocks is N, the third byte must be divisible by N. 12
Supernetting A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company? 1. 198. 47. 32. 0 198. 47. 33. 0 198. 47. 34. 0 No, there are only three blocks. 2. 198. 47. 32. 0 198. 47. 42. 0 198. 47. 52. 0 198. 47. 62. 0 No, the blocks are not contiguous. 3. 198. 47. 31. 0 198. 47. 32. 0 198. 47. 33. 0 198. 47. 52. 0 No, 31 in the first block is not divisible by 4. 198. 47. 32. 0 198. 47. 33. 0 198. 47. 34. 0 Yes, all three requirements are fulfilled. 198. 47. 35. 0 13
Why need superneeting? Class c has 256 addresses, but the first address is used for the network and the second is used for the broadcast address. The remaining 254 addresses can be used for computers. If you have more than 254 computers that need to be on the same network, then you need to create a supernet. 14
Advantages & Disadvantages of Supernetting H. W 15
First Address AND = Fast Address Mask 16
First/ network Address Find the first address 167. 199. 170. 82/27 Address: 10100111. 11000111. 1010. 01010010 And Mask: 11111111. 11100000 First/ network Adress: 10100111. 11000111. 1010. 01000000 167. 199. 170. 64/27 N. B: The first address in the block can be found by setting the rightmost 32 - n bits to 0 s. 17
Last Address OR = Last Address Mask-1 18
Last/ Broadcast Address Find the last address 167. 199. 170. 82/27 Address: 10100111. 11000111. 1010. 01010010 OR Mask Complement: 00000000. 00011111 Last/ Broadcast Adress: 10100111. 11000111. 1010. 01011111 167. 199. 170. 95/27 N. B: The first address in the block can be found by setting the rightmost 32 - n bits to 1 s. 19
The number of addresses in the block can be found by using the formula 232 -n. Block Size: 2(32 -n) Example: 167. 199. 170. 82/27 Number of Block Size: 232 -27 =25=32 20
Need • Number of (Maximum Useable Subnet): (2 number of bits used for subnet) -2 • Example: 167. 199. 170. 82/27 • Number of Subnets: 23 =8 21
N. B: 2 address is not used # ������� IP ���� �� ? 150. 10. 75 (Network Address) 150. 10. 76 150. 10. 77 150. 10. 78 (Broadcast Address) 22
Subnet Mask 128 1 192 2 224 3 240 4 248 5 252 6 254 7 255 8 Example: 167. 199. 170. 82/27 27= 8+8+8+3 Subnet Mask: 255. 224 23
Network Address Translation (NAT) There are two ways that convert the private address to public address: 1. NAT and 2. PAT 24
Network Address Translation (NAT) Home users and small businesses can be connected by an ADSL (Asymmetric Digital Subscriber Line) line or cable modem. Many are not happy with one address; many have created small networks with several hosts and need an IP address for each host. The shortage of addresses, this is a serious problem. A quick solution to this problem is called network address translation (NAT). 25
Network Address Translation (NAT) NAT enables a user to have a large set of addresses internally and one address, or a small set of addresses, externally. The traffic inside can use the large set; the traffic outside, the small set. 26
Why Need NAT The Internet is expanding at an exponential rate. As the amount of information and resources increases, it is becoming a requirement for even the smallest businesses and homes to connect to the Internet. Network Address Translation (NAT) is a method of connecting multiple computers to the Internet (or any other IP network) using one IP address. This allows home users and small businesses to connect their network to the Internet cheaply and efficiently. 27
Network Address Translation (NAT) Ø Network Address Translation (NAT) is a method of connecting multiple computers to the Internet (or any other IP network) using one IP address. Ø Network Address Translation (NAT) is designed for IP address conservation. It enables private IP networks that use unregistered IP addresses to connect to the Internet. NAT operates on a router, usually connecting two networks together, and translates the private (not globally unique) addresses in the internal network into legal addresses, before packets are forwarded to another network. 28
Network Address Translation (NAT) As Figure shows, the private network uses private addresses. The router that connects the network to the global address uses one private address and one global address. The private network is transparent to the rest of the Internet; the rest of the Internet sees only the NAT router with the address 200. 24. 5. 8. 29
Advantage/need: NAT H. W 30
Special IP Address Private IP Addresses In the Internet addressing architecture, a private network is a network that uses private IP address space, following the standards set by RFC (Request for Comment) 1918 for Internet Protocol Version 4 (IPv 4), and RFC 4193 for Internet Protocol Version 6 (IPv 6). The private addresses are: Class A B C Start 10. 0 172. 16. 0. 0 192. 168. 0. 0 End 10. 255 172. 31. 255 192. 168. 255 Block 1 16 255 31
Loop Back Address An address that sends outgoing signals back to the same computer for testing. The loop back address allows a network administration to treat the local machine as if it were a remote machine. A Loop Back Address is a type of IP address that is used to test the communication or transportation medium on a local network card and/or for testing networking application data. Packet send on a Loop Back Address are routed back to the originating node without any alternation or modification. Start 127. 0. 0. 0 End 127. 255 32
IP supports the following services In an IPv 4 network, the hosts can communicate one of three different ways: § Unicast - the process of sending a packet from one host to an individual host. [One-to-one] § Broadcast - the process of sending a packet from one host to all hosts in the network. [One-to-all] § Multicast - the process of sending a packet from one host to a selected group of hosts. [One-to-several] 33
Multicast IP Addresses The process of sending a packet from one host to a selected group of host. Class D Start 224. 0. 0. 0 End 239. 255 34
IPv 4 versus IPv 6 • IP version 6 (IPv 6) has been defined and developed. • IPv 6 uses 128 bits rather than the 32 bits currently used in IPv 4. • IPv 6 uses hexadecimal numbers to represent the 128 bits. IPv 4
- Slides: 35