# IP Subnetting.

## Presentation on theme: "IP Subnetting."— Presentation transcript:

IP Subnetting

IPv4 addresses are 32 bits in length. IPv4 broken into four bytes (called octets), with a dot between each byte. Classes of Addresses Used for network Class A Class B Class C Multicast Class D Future Class E

Decimal to Binary Numbers

IP Address Components IP address has two part, the first part is the network which identifies the network where the system is connected, and a second part is the Host which identifies that particular system on the network.

You must not use 127 for the first octet of the network ID. This value is reserved for diagnostic purposes. You must not use all 1s (binary) for the host ID. If all bits are set to 1, the address is interpreted as a broadcast address. You must not use all 0s for the host ID. If host bits are set to 0, some TCP/IP implementations interpret this as a subnetwork address. You must not duplicate host IDs within a network segment.

Determine which of the following IP addresses is valid or invalid Invalid (256) Valid Invalid (127) Invalid (Broadcast)

What Is a Subnet? A subnet is a physical segment of a network that is separated from the rest of the network by a router or routers. A network of multiple subnets connected by routers is often referred to as an internetwork.

Creating a Subnet How many subnets? How many hosts per subnet?
2X = number of subnets you need (X represents subnet bits) How many hosts per subnet? 2Y - 2 = number of hosts (Y represents host bits) What are the valid subnets? 256 – subnet mask What’s the broadcast address for each subnet? What are the valid hosts? Valid hosts are the numbers between the subnets, omitting all the 0s and all 1s.

How many subnets? Since 192 is 2 bits on ( ), the answer would be 22. How many hosts per subnet? We have 6 host bits off ( ), so the equation would be 26 – 2 = 62 hosts. What are the valid subnets? 256 – 192 = 64. Remember, we start at zero and count in our block size, so our subnets are 0, 64, 128, and 192. What’s the broadcast address for each subnet? The number right before the value of the next subnet is all host bits turned on and equals the broadcast address.

Example 1 192 128 64 The subnets 193 129 65 1 The first host 254 190
What are the valid hosts? 192 128 64 The subnets 193 129 65 1 The first host 254 190 126 62 The last host 255 191 127 63 The broadcast address

How many subnets? 224 is , so our equation would be 23 = 8. How many hosts? 25 – 2 = 30. What are the valid subnets? 256 – 224 = 32. We just start at zero and count to the subnetmask value in blocks (increments) of 32: 0, 32, 64, 96, 128, 160, 192, 224. What’s the broadcast address for each subnet (always the number right before the next subnet)? What are the valid hosts (the numbers between the subnet number and the broadcast address)?

Example 2 The subnets The first host The last host The broadcast
What are the valid hosts? 224 192 160 128 96 64 32 The subnets 225 193 161 129 97 65 33 1 The first host 254 222 190 158 126 94 62 30 The last host 255 223 191 159 127 95 63 31 The broadcast address

Exercise 1 You are given a Class C network ( ) and you have 4 segments in your network, where the largest segment has 50 hosts. What subnet mask should you use and what is the layout of your addresses?

Answer 1 Subnet Mask = 255.255.255.192 192 128 64 The subnets 193 129
The subnets 193 129 65 1 The first host 254 190 126 62 The last host 255 191 127 63 The broadcast address