Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP Subnetting CIT 307 Kevin Siminski.

Similar presentations


Presentation on theme: "IP Subnetting CIT 307 Kevin Siminski."— Presentation transcript:

1 IP Subnetting CIT 307 Kevin Siminski

2 The Basics So… what does this mean? If you want to work in the networking industry you ABSOLUTELY need to understand how to subnet IP addresses IP address is a 32 bit address, bits are either 1 or 0 IP address contain 4 octets of 8 bits IP address and Mask define the host address and the network address Network is a layer 3 function in OSI model

3 -Zero’s indicate how many hosts are available in block-
IP address and Network subnet mask also define how many hosts are in a IP network Example- = 256 hosts = 128 hosts = 216 hosts = 65536 Classful subnetting Class A = (16,777,216 Hosts) Class B = (65,536 Hosts) Class C = (255 Hosts) -Zero’s indicate how many hosts are available in block-

4 Now forget about traditional Classful subnetting
Variable Length Subnet Masking (VLSM) is what is utilized today An IP address ALWAYS has to important element Network address and a Broadcast address Network address is always EVEN, Broadcast address is always ODD. An IP address is like a phone number- It’s unique; if publically routable over Internet 3 first three octets are the Network; Last octet is host For your network you can only use You can’t change the first three octets

5 Subnetting is like taking a piece of pie and dividing it up it smaller pieces.
You can only sub-divide by multiples of 2- The subnet mask determines how the pie is divided Network address is similar to your phone number Area-code & Exchange (317)-823 = NETWORK Last four digits = Host The broadcast address is similar to dialing the operator and asking for assistance. In networking, the broadcast address is used to ask all of the available hosts to broadcast their address so that switch/router can find the appropriate path to send IP packets Yes Yes Yes NO

6 Now how do we figure out all this stuff?
Step 1- Convert IP address to binary form Convert each octet into it’s 8 binary bits = 142 = 10 = 24 = 32 We will start with first octet (142), start at left and determine if you can subtract 128 from 142 and end up with positive integer, yes = 1 & no = 0 = 14 (true), then ask if you can take 14 – 64… NO (false), 14 – 32 (False), 14 – 16 (false), 14-8 = 6 (true), 6-4=2 (true), 2-2=0 (true), 0-1 (false) 142 = (8 bits)… now 255 = & 0 = Now we know why an 8 bit address can be no larger than 255!

7 Subnet mask 255.255.255.0 or 255.255.255.128 is same process
= = Shorthand notation for subnet mask is notated by counting number of ones = /24 = /25 = /26 and so on… Subnet mask is always contiguous 1’s from left to right is NOT a valid subnet The ones in the subnet equal the network prefix and the 0’s equal the HOST 8 Zero’s in the first example = 28 = 256 HOST; 27 = 128

8 A IP address and subnet determine two important pieces of information:
What the NETWORK address is What the BROADCAST address is /24 ( ) Network = Broadcast = USABLE HOSTS = (these are address you can use for your network) Now how did I figure this out?

9 192.168.10.130 /24 Step one do a bitwise & operation against octets
0 + 0 = 0; 1+0 = 0; 0+1=0; 1+1= 1 (TRUE) If you want more details, look up binary number system on wikipedia Now compare the octet by converting to binary- Now use bitwise & to compare the values Simple rules- Anytime you compare a NUMBER against 255, will result in same number, Anytime you compare a number against 0, will result in 0 during bitwise & operation

10 Now do the rest… NETWORK ADDRESS =

11 Usable Hosts Now lets figure out Broadcast address-
NETWORK ADDRESS = Subnet mast = ( ) This is the part that I like to compare to book-ends: The subnet mask determines the number of usable hosts, you CANNOT use Network or broadcast for host address or you will break your network! To determine number of total hosts take total bits in IP address (32) – number of 1 bits in the subnetmask (24) 32-24 = 8 Now take 2 raised to the 8 = 28 = 256, now add this number to the ip address in the last octet = 256, now subtract 1 since you start on 0 value = 255 Broadcast Address = Usable hosts = Network add Broadcast Usable Hosts

12 32 bits – 25 bits = 7 27=128 total hosts
/25 ( ) NETWORK x B/Cast x We can quickly determine first 3 octets based on simple rule mentioned in slide 9 Now we just need to determine last octet Network Address 32 bits – 25 bits = 7 27=128 total hosts Now take last octet in network (total hosts) = = 127 Broadcast Address Usable hosts =

13 Now take last octet in network 0 + 128 (total hosts) = 128 -1= 127
/17 ( ) NETWORK x.0 B/Cast x.255 We can quickly determine first 3 octets based on simple rule mentioned in slide 9 Now we just need to determine last octet Network Address 32 bits – 17 bits = =32,768 total hosts, Instead take bits in Octet (8) - # of subnet bits in third octet (1); 8-1 = 7; 27 = 128 Now take last octet in network (total hosts) = = 127 Broadcast Address Usable hosts =

14 Relationship between # of hosts and subnet mask.
= 256 TOTAL hosts = 128 TOTAL hosts = 64 TOTAL Hosts (see the pattern emerging…) = 32 = 16 = 8 = 4 = 2 (you really can’t use this since you would only have NETWORK address and BroadCast, with no usable hosts)

15 Visual breakdown of subnets
Remember these simple rules Network address is always even, broadcast is always odd Network address is always the low value, broadcast is high value and the usable hosts are between the two values You can NEVER use a broadcast or network address for a host address /24 /25 /26 /27 /28 /29 /30


Download ppt "IP Subnetting CIT 307 Kevin Siminski."

Similar presentations


Ads by Google