Subnetting

advertisement
IP Subnetting
(Week 4, Wednesday 1/31/2007)
© Abdou Illia, Spring 2007
Structure of IP addresses
Network Part (n)
Local Part (h)
Sgmt. part Host part
Class A
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
10.0.0.1 – 126.255.255.255
Class B
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
128.0.0.1 – 191.255.255.255
Class C
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
192.0.0.1 – 223.255.255.255
2
Reserved IP addresses
IP addresses reserved for private use.
Class
Range
A
10.0.0.0 – 10.255.255.255
B
172.16.0.0 – 172.31.255.255
C
192.168.0.0 – 192.168.255.255
Special IP addresses.
Address
Use
255.255.255.255
Example: 10.255.255.255
Local broadcast to LAN computers
Broadcast to network 10.0.0.0/8
127.0.0.1
Loopback address (for self addressing)
0.0.0.0
Prohibited
169.254.x.x
Automatic Private IP Addressing
3
Structure of IP addresses
Network Part

Segment
Part
Host
Part
The division between Network part,
Segment part, and Host part is determined
by a computer or a router by using a
network mask.
4
Network mask

A 32 bit number, just like an IP address,
where all bits in the Network Part and the
Segment Part are set to 1, and all bits in
the Host Part are set to 0. Example:
11111111 11111111 11111111 00000000
(or 255.255.255.0 in decimal notation)

Computers use Network mask, along with
the IP address, to determine whether or
not a destination IP address is on the
same logical network.
5
Two Virtual LANs
192.168.2.1
255.255.255.0
192.168.1.1
255.255.255.0
192.168.1.2
255.255.255.0
192.168.1.3
255.255.255.0
192.168.2.2
255.255.255.0
Switch
192.168.2.3
255.255.255.0
6
Two interconnected LANs
7
128
64
32
 Are the following three Class C IP addresses 16
8
from the same network?
4
192.168.1.1, 192.168.1.50 and 192.168.2.1
2
IP:
11000000
10101000 00000001 00000001 192.168.1.1 1
The ADDing technique
Mask:
11111111
11111111
11111111
00000000
255.255.255.0
Network:
11000000
10101000
00000001
00000000
192.168.1.0/24
IP:
11000000
10101000
00000001
00110010
192.168.1.50
Mask:
11111111
11111111
11111111
00000000
255.255.255.0
Network:
11000000
10101000
00000001
00000000
192.168.1.0/24
IP:
11000000
10101000
00000010
00000001
192.168.2.1
Mask:
11111111
11111111
11111111
00000000
255.255.255.0
Network:
11000000
10101000
00000010
00000000
192.168.2.0/24
Network 1: 192.168.1.0/24, i.e network starting at 192.168.1.0 with network mask 255.255.255.0.
8
Network 2: 192.168.2.0/24, i.e network starting at 192.168.2.0 with network mask 255.255.255.0.
Subnetting a class C network



128
64
32
16
8
4
2
1
Suppose the 192.168.1.0/24 network
You want to divide that network into two segments
You can decide to use the first bit of the fourth octet as
dividing point between your network segments. So, your
network mask would be:
11111111 11111111 11111111 10000000
And you will have about 27 = 128 hosts in each
segment.
Segment 1: 192.168.1.0 to 192.168.1.127 Segment 2: 192.168.1.128 to 192.168.1.255
How to determine the two segments
using the ADDing technique?
9
Subnetting a class C network
Segment 1: 192.168.1.0 to 192.168.1.127
128
64
32
16
8
4
2
1
IP:
11000000
10101000
00000001
00000001
192.168.1.1
Mask:
11111111
11111111
11111111
10000000
255.255.255.128
Network:
11000000
10101000
00000001
00000000
192.168.1.0/25
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
IP:
11000000
10101000
00000001
01111111
192.168.1.127
Mask:
11111111
11111111
11111111
10000000
255.255.255.128
Network:
11000000
10101000
00000001
00000000
192.168.1.0/25
10
Subnetting a class C network
Segment 2: 192.168.1.128 to 192.168.1.255
128
64
32
16
8
4
2
1
IP:
11000000
10101000
00000001
10000000
192.168.1.128
Mask:
11111111
11111111
11111111
10000000
255.255.255.128
Network:
11000000
10101000
00000001
10000000
192.168.1.128/25
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
IP:
11000000
10101000
00000001
11111110
192.168.1.254
Mask:
11111111
11111111
11111111
10000000
255.255.255.128
Network:
11000000
10101000
00000001
10000000
192.168.1.128/25
11
Question 1

Network A is IP network 192.168.1.x/24 (i.e a
Class C network with a default 24-bit mask).
Using the IP Subnet Calculator, determine the
maximum number of hosts (computers) in each
of the Network A’s subnets assuming that there
are two subnets. You answer: ________.

Using the IP Subnet Calculator, determine the
maximum number of subnets for a Class B
network assuming that the four first bits of the
third octet in each IP address are used as subnet
bits. Your answer: _____. What is the maximum
number of computers for each subnet? Your
answer: ______.
12
13
Download