Nothing Special   »   [go: up one dir, main page]

08 - IP Subnetting

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 20

IP Subnetting

Basics
• What happens if you wanted to take one
network address and create six networks from
it?
• Some of the benefits of subnetting include:
– Reduced network traffic
– Optimized network performance
– Simplified management
• Because of the subnet mask we used, all these computers are
part of the one network marked in blue. This also means that
any one of these hosts (computers, router and server) can
communicate with each other.
• If we now wanted to partition this network into smaller
segments, then we would need to change the subnet mask
appropriately so we can get the desired result. Let's say we
needed to change the subnet mask from 255.255.255.0 to
255.255.255.224 on each configured host.
Communication Between Subnets
• Do you think computers that are on the same physical
network but configured to be on separate subnets are
able to communicate ?
• The answer is "no". Why ?
• So how can two hosts in two different subnets talk to
each other ?
1. Using a Server with 2 Network Cards
2. Binding 2 IP Addresses to the same network card
3. Installing a router
• By connecting each network card to one of our networks and
configuring the network cards so that each one belongs to
one subnet/network we can route packets between them.
• This method is possibly the best and easiest way around our
problem. We use the same network card on the NetWare
server and bind another IP Address to it.
• If this was a large network, then a router
could possibly be the ideal solution.
How to Create Subnets
• To create subnetworks, you take bits from the
host portion of the IP address and reserve
them to define the subnet address.
• This means fewer bits for hosts, so the more
subnets, the fewer bits available for defining
hosts.
Steps Followed
1. Determine the number of required network IDs:
– One for each subnet
– One for each wide area network connection
2. Determine the number of required host IDs per
subnet:
– One for each TCP/IP host
– One for each router interface
3. Based on the above requirements, create the
following:
– One subnet mask for your entire network
– A unique subnet ID for each physical segment
– A range of host IDs for each subnet
Subnet Masks
• subnet mask is 32-bit value that allows the recipient of IP
packets to distinguish the network ID portion of the IP
address from the host ID portion of the IP address.
• When assigning addresses you set both the IP address and
subnet mask.
• Not all networks need subnets, meaning they use the default
subnet mask.
– Default subnet mask is found by setting all network address to 1 for
each class.
Classless Inter-Domain Routing (CIDR)
• the method that ISPs (Internet Service
Providers) use to allocate an amount of
addresses to a company, a home—a
customer.
• 192.168.10.32/28 – the number after the
slash tells you how many bits of the subnet
mask are turned on (1).
• This is an address with IP 192.168.10.32 and
subnet mask 11111111. 11111111.
11111111.11110000 = 255.255.255.240
Subnetting Class C Addresses
• many different ways to subnet a network.
– Binary Method
– Fast Way
– Even in your head!!!
• Please go through subnetting.pdf on your
lecture notes for binary method.
The Fast Way
• Before starting, you need to do is answer five
simple questions:
1. How many subnets does the chosen subnet mask
produce?
2. How many valid hosts per subnet are available?
3. What are the valid subnets?
4. What’s the broadcast address of each subnet?
5. What are the valid hosts in each subnet?
• How many subnets?
– 2x = number of subnets. x is the number of
masked bits, or the 1s.
– For example, given a class C subnet mask of
255.255.255.192, the number of ones gives us 22 =
4 subnets.
– Note that we only count the number of ones that
are found in the host part of the subnet mask.
– For class C address 255.255.255.0 is the default
subnet, 192=11000000 in binary, so there are only
2 ones.
• How many hosts per subnet?
– 2y – 2 = number of hosts per subnet. y is the number of
unmasked bits, or the 0s. For example, in 11000000, the
number of zeros gives us 26 – 2 = 62 hosts per subnet.
– You need to subtract two for the subnet address and the
broadcast address, which are not valid hosts.
• What are the valid subnets?
– First calculate the block size.
– 256 – subnet mask = block size, or increment number.
– An example would be 256 – 192 = 64. The block size of a
192 mask is always 64.
– Second, start counting at zero in blocks of 64 until you
reach the subnet mask value and these are your subnets.
0, 64, 128, 192.
• What’s the broadcast address for each subnet?
– Since we counted our subnets in the last section as 0, 64,
128, and 192, the broadcast address is always the number
right before the next subnet.
– For example, the 0 subnet has a broadcast address of 63
because the next subnet is 64. The 64 subnet has a
broadcast address of 127 because the next subnet is 128,
etc.
– And remember, the broadcast of the last subnet is always
255 for Class C.
• What are the valid hosts?
– Valid hosts are the numbers between the subnets,
omitting all the 0s and all 1s.
– For example, if 64 is the subnet number and 127 is the
broadcast address, then 65–126 is the valid host range—
it’s always the numbers between the subnet address and
the broadcast address.
– These are the addresses you assign to nodes.
Subnetting Practice Example
• We’re going to subnet the network address 192.168.10.0
and subnet mask 255.255.255.224.
1. How many subnets?
– 224 is 11100000, so our equation would be 23 = 8.
2. How many hosts?
– 25 – 2 = 30.
3. What are the valid subnets?
– 256 – 224 = 32. We just start at zero and count to the subnet mask
value in blocks (increments) of 32: 0, 32, 64, 96, 128, 160, 192, 224.
4. What’s the broadcast address for each subnet?
– always the number right before the next subnet
5. What are the valid hosts?
– the numbers between the subnet number and the broadcast address
• To answer questions 4 and 5, first just write out the
subnets, then write out the broadcast addresses—
the number right before the next subnet. Lastly, fill
in the host addresses.

 So now we have
192.168.10.1/27 – 192.168.10.30/27 ntk 1
192.168.10.33/27 - 192.168.10.62/27 ntk 2
upto …
192.168.10.225/27 - 192.168.10.254/27 ntk 8
Exercise
• Do full subnetting for the following
addresses.
1. 192.168.10.0/28
2. 192.0.10.0/30
3. 192.1.1.0/25
• What is the maximum and minimum CIDR
values for a class C network?

You might also like