You are on page 1of 18

IP Addressing Games (They'll drive you crazy!

)
1 Public or private?
2 Slash It! (An alternative subnet notation)
3 Bits on parade! (Identify the network, subnet and host bits in an IP address)
-> Spot the network address
-> Spot the broadcast address
4 Calc those subnets! (How many subnets and how many hosts per subnet)
5 Reveal the mask - Part 1 (Calculate the subnet mask for a required number of subnets)
6 Reveal the mask - Part 2 (Calculate the subnet mask for a required number of subnets)
7 Spot the disaster (or collect your P45).
Future ideas for games

Binary weights ( for toning the mind ).


Convert those numbers!
m.t.stanhope
Dec-05
Updated : 17 Sept 06

required number of subnets)

required number of subnets)

Public or Private?

1
2
3
4
5
6
7
8
9
10

IP Address
192.168.239.24
185.45.130.7
10.220.34.188
172.31.234.17
192.168.253.230
198.34.87.68
172.15.230.95
172.23.34.2
87.238.65.3
172.32.45.243

Most significant byte


in binary
192= 11000000
185= 10111001
10= 00001010
172= 10101100
192= 11000000

C
B
A
B
C

172= 10101100
172= 10101100

B
B

172= 10101100

Class

Useful Reference
Class Identification.
Most significant bit of IP
Class address starts with
A
B
C

0
10
110

Private range in slash notation Private Address Ranges in dotted decim

10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

Public or Private?

Private Address Ranges in dotted decimal notation

10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

Slash It!

1
2
3
4
5

Slash notation
/24
/16
/8
/25
/17

Complete the gaps in the table


Dotted decimal
255.255.255.0

6
7
8
9

12

15

18

1111 1111

1000 0000

1111 1111

1111 1111

1111 1111

1111 1000

255.255.255.240

/20
/12
255.255.255.248

16
17

0000 0000

/19
/11

13
14

1111 1111

/26
/18
/10

10
11

Binary Notation
1111 1111 1111 1111

/21

y Notation
1111 1111

0000 0000

0000 0000

0000 0000

0000 0000

0000 0000

1111 1111

1110 0000

0000 0000

0000 0000

Bits on parade (identify the network, subnet and host bits).


Subnet Mask
/24

Class
C

/27

IP Address
192.168.239.24
255.255.255.0
192.168.238.95
255.255.255.224
192.168.237.48
255.255.255.240
192.168.236.31

/29

1100 0000
1111 1111
1100 0000
1111 1111
1100 0000
1111 1111
1100 0000

192.168.236.13

/30

1100 0000

182.20.36.48

/16

1011 0110

182.20.63.255

/19

1011 0110

182.20.128.0

/19

1011 0110

84.34.68.7

/8

0101 0100

10

84.127.255.255

/11

0101 0100

/28

Tips

1. Write the subnet mask in binary. Colour to 'default' 1s part in blue and all other 1s
2. Convert the IP address into binary
3. Colour the bits of the IP address to match the colours used in the subnet mask.
4. The IP structure is now as follows: the blue part is the network id, the orange the s
and the pink part is the host number.
> A network address has all zeros in the host section of the IP address.
> A broadcast address has all 1s in the host section of the IP address.

> The host section of an IP address is that part lining up with zeros in the subnet mas

ubnet and host bits).


IP Address in binary

What is it?

1010 1000
1111 1111
1010 1000
1111 1111
1010 1000
1111 1111
1010 1000

1110 1111
1111 1111
1110 1110
1111 1111

0001 1000
0000 0000
0101 1111
1110 0000

1111 1111
1110 1100

1111 0000
0001 1111

1010 1000

1110 1100

0000 1101

0001 0100

0010 0100

0011 0000

0001 0100

0111 1111

1111 1111

0001 0100

1000 0000

0000 0000

0010 0010

0100 0100

0000 0111

0111 111

1111 1111

1111 1111

Network host No. 24

Subnet 2, B/Cast

1s part in blue and all other 1s in orange and the zeros in pink.

rs used in the subnet mask.


he network id, the orange the subnet id

of the IP address.
the IP address.

up with zeros in the subnet mask.

Calc those subnets! (How many subnets and how many hosts

1
2
3
4
5
6
7
8
9
10

IP Address
192.168.239.0
192.168.23.0
192.168.10.0
195.34.56.0
190.34.0.0
172.16.0.0
86.0.0.0
77.0.0.0

Default number Default number


Class of network bits of network bits

SNM
/27 C
/28 C
/29
/26
/23 B
/25
/21
/16

24
24

8
8

16

16

nd how many hosts per subnet?).

Number of
redefined
host bits, Number of
i.e. the
remaining
subnet bits hosts bits

27-24=3
28-24=4

8-3=5
8-4=4

23-16=7 16-7=9

Usable
Usable
number number of
of
hosts per
subnets subnet

2s

2h - 2

23 = 8

25 - 2 = 30

Reveal the mask - Part 1 (Determine the subnet mask for a required number of s

1
2
3
4
5
6
7
8
9

Class
A
C
B
C
B
A
A
B
C

No of subnets
required

60
30
250
5
12
500
6
125
25

Nearest power
of 2 to contain
the required
number

6 (as 26=64)
5 (as 25=32)

Subnet mask in binary


11111111 1111 1100
11111111 11111111

9 (as 29=512) 11111111 1111 1111


8 (as 28=128) 11111111 1111 1111

Tips

Work out the power of 2.


Write down the default subnet mask for the class. Colour the 1s blue and zeros pink.
Change a number of zeros (e.g. 6 in the first example) in the subnet mask to ones an

k for a required number of subnets).

net mask in binary


0000 0000 0000 0000
11111111 1111 1000

Resulting
number of
hosts per SNM in dotted
subnet decimal

2 18
23

255.252.0.0
255.255.255.0

1000 0000 0000 0000

2 15

255.255.128.0

1111 1111 0000 0000

28

255.255.255.0

he 1s blue and zeros pink.


e subnet mask to ones and colour them orange.

Reveal the mask - Part 1 (Determine the subnet mask for a required number of h

1
2
3
4
5
6
7
8
9

Class
A
C
B
C
B
A
A
B
C

Required
number of
hosts per
subnet

8000
25
500
12
700
32000
15000
1000
50

Nearest power of 2
to contain the
required number

Subnet mask in binary


13 (as 2 =8192) 11111111 1111 1111
5 (as 25=32)
11111111 11111111
13

15 (as 215=32768)

11111111 1111 1111

10 (as 210=1024) 11111111 1111 1111

Tips

Work out the power of 2.


Write down the default subnet mask for the class. Colour the 1s blue and zeros pink.
Only keep the zeros required (e.g. 13 of them in example 1) then change the other ze

or a required number of hosts per subnet).

net mask in binary


1110 0000 0000 0000
11111111 1110 0000

Resulting
number of SNM in dotted
subnets decimal

2 11
23

255.255.224.0
255.255.255.224

1000 0000 0000 0000

29

255.255.128.0

1111 1100 0000 0000

26

255.255.252.0

1s blue and zeros pink.


en change the other zeros to orange 1s.

Spot the Disaster (or collect your P45).


Checking rules (in the order of the easiest to do first)
1
2
3
4
5
6

Check that the hosts and the default gateway all have the same subnet mask
Check that router interface addresses belong to different networks
Check that hosts and the default gateway (i.e the router interface) are all on the same network
Check that the hosts and the default gateway have not been assigned a network address
Check that the hosts and the default gateway have not been assigned a broadcast address
Check the default gateway setting on the hosts match the actual default gateway address on t

Scenario diagram
ROUTER

ISP/Internet

DG

SWITCH

HOST
No.1

HOST
No.2

Scenairo settings
1
2
3
4
5
6
7
8
9
10
11
12

Host 1
192.168.239.65/24
192.168.238.65/27
192.168.239.65/27
192.168.239.18/24
192.168.239.65/27
192.168.239.65/24
192.168.239.66/27
192.168.239.65/24
192.168.239.0/24
192.168.238.65/27
192.168.238.92/27
172.28.16.61/26

Host 2
192.168.239.66/24
192.168.239.66/27
192.168.239.93/27
192.168.239.60/24
192.168.239.66/28
192.168.239.66/24
192.168.239.65/27
192.168.239.255/24
192.168.239.66/24
192.168.239.64/27
192.168.239.91/27
172.28.16.63/26

Default Gateway (router)


192.168.239.1/24
192.168.239.254/27
192.168.239.129/27
192.168.239.254/24
192.168.239.254/27
192.168.238.1/24
192.168.239.98/27
192.168.239.1/24
192.168.239.254/24
192.168.239.90/27
192.168.239.65/27
172.28.16.62/26

e the same subnet mask


rent networks
ter interface) are all on the same network
ot been assigned a network address
ot been assigned a broadcast address
h the actual default gateway address on the router interface.

ISP/Internet

Other interface on the router


192.168.240.2/24
not shown
not shown
192.168.239.253/24
not shown
192.168.240.2/24
not shown
192.168.240.2/24
192.168.240.2/24
not shown
not shown
Not shown

Problem? (assume all subnets allowed)

You might also like