You are on page 1of 28

Bridging Course:

EGCO2210 - Computer Networks


Learning Outcomes
2. Illustrate the student with different types of cables,
topologies, devices and networks.

4. Distinguish the network addressing, subnetting, switching


and routing.

5. Explain the role of DHCP/DNS/TFTP/FTP/VLAN.

7. Design computer network for a given real time requirement


and configure a network analyzer to monitor and analyze the
network.
Subnetting
The process of dividing a network into 2 or more sub-
networks.
IPv4 – Internet Protocol ver.4
- IPv4 addresses are expressed in 32 binary bits divided
into 4 8-bit octets
- IPv4 addresses are commonly expressed in dotted
decimal notation
Example: 192.168.1.1

11000000.10101000.00000001.00000001

8 8 8 8 = 32 bits
28 = 256 -> 0 to 255
Types of IPv4 Addresses
Legacy Classful Addressing
In 1981, Internet IPv4 addresses were assigned using
classful addressing (RFC 790) - Request for Comments
Network addresses were based on 3 classes:
1. Class A (1.0.0.0 to 126.255.255.255) – Designed
to support extremely large networks with maximum of
16,777,214 host addresses.
2. Class B (128.0.0.0 – 191.255.255.255) –
Designed to support the needs of moderate to large
size networks with maximum of 65,534 hosts
addresses.
3. Class C (192.0.0.0 – 223.255.255.255) –
Designed to support small networks with a maximum
of 254 hosts.
Private and Public IP addresses

Private Addresses: LAN


Class A – 10.0.0.0 – 10.255.255.255
Class B – 172.16.0.0 – 172.31.255.255
Class C – 192.168.0.0 – 192.168.255.255
Public Addresses: WAN
- The list of IP addresses that are not found in
the range of Private IP addresses.
Examples:
11.123.23.13 - Class A
150.15.1.20 - Class B
200.20.2.0 - Class C
172.15.100.200 - Class B
172.32.123.231 - Class B

google.com -> search -> who am I ip?


Special IP addresses:
1. Loopback addresses (127.0.0.1 – 127.255.255.254)
Used on a host to test if the TCP/IP configuration is
operational.
TCP/IP - Transmission Control Protocol over Internet
Protocol
ping - packet internet gropher
- use to test the connectivity of the network
ex:
c:\> ping 127.0.0.1

2. Link-Local addresses (169.254.0.1 - 169.254.255.254)


- Commonly known as Automatic Private IP
Addressing (APIPA) addresses.

- Used by Windows client to self configure if no DHCP


server available.
DHCP - Dynamic Host Configuration Protocol
Formulas:
n –> represents the number of bits borrowed

2n –> total number of subnets


2h-n - 2 -> total number of host/subnet
h-> HA -> Host Address - IP Address of the End Device
NA -> Network Address - the identifier for a host on the network
BA -> Broadcast Address - enables transmission to every node in a local network
SM -> Subnet Mask - represents the size of the network
FUS -> First Useable Subnet
LUS -> Last Useable Subnet
Types of Addressing:
A. Classful Addressing
- Each subnet will have the same size of host addresses
- All the subnets will have a common Subnet Mask - > always begins with 255.

1. Class C - 192.0.0.0 - 223.255.255.255

8 8 8 8

NA - Network Address HA - Host Address

24 bits - constant 8 bits - dynamic

OMAN DUBAI

Example 1:
Subnet the given IP: 200.20.2.0 @ 3 subnets
Solution:
n = 2 bits -> nearest bit n = 3 bits
2n = 22 = 4 subnets 2n = 23 = 8 subnets
2h-n - 2 = 28-2 - 2 = 26- 2 = 64 - 2 = 62 hosts/subnet 2h-n - 2 = 28-3 - 2 = 25- 2 = 32 - 2 = 30 hosts/subnet

IP: 200. 20. 2. .00 000000


11111111.11111111.11111111.11 000000
0 1 0 0 0 0 0 0
SM: 255.255.255.192 128 64 32 16 8 4 2 1
IP: 200. 20. 2. .00 000000
128
constant .00 111111 192
255 - 192 = 63
BA: 200.20.2.63 224
240
IP: 200. 20. 2. .00 000000 248
zero subnet = 00 252
constant 01 000000
FUS = 01 254
FUS: 200.20.2.64 .63 + 1 = .64
255
2nd US = 10
IP: 200. 20. 2. .00 000000
LUS = 11
constant .11 000000
LUS: 200.20.2.192
note: the last digit of the LUS is always equals to the
last digit of the SM.
block size = 64 the last digit of the FUS
SA -> Subnet Address = SA + BS(block size)

IP TABLE:
First valid host Last valid host
FVH = SA +1 LVH=BA - 1

Subnet No. Subnet Address Host-Address Range Broadcast Address

0 200.20.2.0 200.20.2.1 - 200.20.2.62 200.20.2.63

1 200.20.2.64 200.20.2.65-200.20.2.126 200.20.2.127

2 200.20.2.128 200.20.2.129-200.20.2.190 200.20.2.191

3 200.20.2.192 200.20.2.193-200.20.2.254 200.20.2.255

192 + 64 = 256
Example 2:
Subnet the given IP: 195.19.5.0 @ 6 subnets
Solution:
n = 3 bits -> nearest bit
2n = 23 = 8 subnets 0 0 0 1 1 1 1 1 = 31
2h-n - 2 = 28-3 - 2 = 25- 2 = 32 - 2 = 30 hosts/subnet
1 1 1 0 0 0 0 0 = 224

IP: 195.19.5.000 00000 128 64 32 16 8 4 2 1

1's 0's 128


SM:255.255.255.224 192
224
IP: 195.19.5.000 00000
240
C 1's 248
255-224 = 31 252
BA: 195.19.5.31 254
IP: 195.19.5.000 00000 255
31 + 1 = 32
195.19.5. C 001 00000
FUS: 195.19.5. 32
IP: 195.19.5.000 00000
C 111 00000
LUS:195.19.5. 224

Block Size = 32 ->last digit of FUS


SA = SA + 32
IP TABLE:

Subnet No Subnet Address Host Address Range Broadcast Address

0 195.19.5.0 195.19.5.1-195.19.5.30 195.19.5.31

1 195.19.5.32 195.19.5.33-195.19.5.62 195.19.5.63

2 195.19.5.64 195.19.5.65-195.19.5.94 195.19.5.95

3 195.19.5.96 195.19.5.97-195.19.5.126 195.19.5.127

4 195.19.5.128 195.19.5.129-195.19.5.158 195.19.5.159

5 195.19.5.160 195.19.5.161-195.19.5.190 195.19.5.191

6 195.19.5.192 195.19.5.193-195.19.5.222 195.19.5.223

192 + 32 = 224
224 + 32 = 256
Problem Solving:
1. What is the SM of a class C IP address if 6 bits are borrowed?
Solution: 128 64 32 16 8 4 2 1
x.x.x.00000000
128
1's 0's 192
SM: 255.255.255.252 224
240
248
2. What is the Network Address of the IP 195.19.5.150 and SM 255.255.255.224? 252
254
Solution: 3 bits 255
195.19.5.10010110 150 = 10010110

C 0's
195.19.5.10000000
NA = 195.19.5.128

3. What is the Broadcast Address of the IP 195.19.5.189 255.255.255.224?


Solution:
189 = 10111101
195.19.5.101 11101
c 1's
195.19.5.101 11111
BA = 195.19.5.191

4. What is the host address range of the IP 195.19.5.35 255.255.255.224?


Solution:
195.19.5.001 00011
128 64 32 16 8 4 2 1
c 0's 35 = 00100011
0 0 1 0 0 0 1 1
c 1's
0 0 1 1 1 1 1 1
NA = 195.19.5.32 32 + 1 = 33 ->FVH
FVH= 195.19.5.33

BA = 195.19.5.63 63 - 1= 62 ->LVH
LVH = 195.19.5.62

host address range = 195.19.5.33-195.19.5.62


no space between the dash sign
Types of Addressing:
A. Classful Addressing
2. Class B - 128.0.0.0 - 191.255.255.255

8 8 8 8

NA - Network Address HA - Host Address


16 bits - constant 16 bits - dynamic

216 = 65536 - 2 = 65534

Example 3:
Subnet the given IP: 150.15.0.0 @ 30 subnets 210=1024

Solution: 211=2048

n = 5 bits -> nearest bit 212=4096

2n = 25 = 32 subnets 213=8192

2h-n - 2 = 216-5 - 2 = 211 - 2 = 2048 - 2 = 2046 hosts/subnet

IP: 150.15.00000 000.00000000 0 0 0 0 0 1 1 1

1's 0's 1 1 1 1 1 0 0 0
SM: 255.255.248.0 128 64 32 16 8 4 2 1
255.255
150.15.00000 000.00000000 128
- 248. 0
constant 1's 192
7.255
BA: 150.15. 7.255 224
240
150.15.00000 000.00000000 7.255 248
252
c 00001 0's + 1 254
FUS: 150.15. 8. 0 00001000 = 8 255
8. 0
150.15.00000 000.00000000
c 11111 000.00000000
BS=8.0
LUS:150.15. 248. 0
SA=Subnet No * BS

IP TABLE:

Subnet No Subnet Address Host Address Range Broadcast Address

1 150.15.8.0 150.15.8.1-150.15.15.254 150.15.15.255

6 150.15.48.0 150.15.48.1-150.15.55.254 150.15.55.255

10 150.15.80.0 150.15..80.1-150.15.87.254 150.15.87.255

25 150.15.200.0 150.15.200.1-150.15.207.254 150.15.207.255

31 150.15.248.0 150.15.248.1-150.15.255.254 150.15.255.255

2 150.15.16.0 -> 16.0 15.255


- 1 + 1
15 .255 16. 0
Example 4:
00000000.00000000.00000000.00000000
Subnet the given IP: 180.80.0.0 @ 1000 subnets
Solution: 00000000.00000000.00000000.00000001
n = 10 bits -> nearest bit 00000000.00000000.00000000.11111111
n 10
2 = 2 = 1024 subnets 00000000.00000000.00000001.0000000
2h-n - 2 = 216-10 - 2 = 26 - 2 = 64 - 2 = 62 hosts/subnet
11000000 = 192
IP: 180.80.00000000.00 000000
1's 0's
255.255
SM: 255.255.255.192 SN SA SN SA SN SA
- 255.192
180.80.00000000.00 000000 0 0.0 -> 0.0 12 3.0 24 6.0
0 . 63
constant 1's 1 0.64 -> 0.25 13 3.64 25 6.64

BA: 180.80.0.63 2 0.128 -> 0.5 14 3.128 26 6.128

180.80.00000000.00 000000 3 0.192 -> 0.75 15 3.192


0.63
c 00000000.01 0's 4 1.0 16 4.0
+ 1
FUS: 180.80.0.64 5 1.64 17 4.64
0.64
180.80.00000000.00 000000 6 1.128 18 4.128

c 11111111.11 000000 7 1.192 19 4.192

LUS:180.80. 255.192 8 2.0 20 5.0


9 2.64 21 5.64
10 2.128 22 5.128
11 2.192 23 5.192

IP TABLE: BS = 0.64
SA=(SN*BS) /256

6 1.128
Subnet No Subnet Address Host Address Range Broadcast Address
- 1

5 180.80.1.64 180.80.1.65-180.80.1.126 180.80.1.127 1.127

10 180.80.2.128 180.80.2.129-180.80.2.190 180.80.2.191


16 4.0
15 180.80.3.192 180.80.3.193-180.80.3.254 180.80.3.255 - 1
3.255
20 180.80.5.0 180.80.5.1-180.80.5.62 180.80.5.63

25 180.80.6.64 180.80.6.65-180.80.6.126 180.80.6.127

0 -> .0
50 180.80.12.128
64 -> .25
150 180.80.37.128
128 -> .5
192 -> .75
Problem Solving:
1. What is the first valid host on the network 172.25.0.0 255.255.192.0?
Solution:
172.25.00 000000.00000000
constant 0's
NA: 172.25.0.0 +1
FVH: 172.25.0.1

2. What is the first valid host on the IP 180.80.2.150 255.255.255.192?


Solution:
128 64 32 16 8 4 2 1
180.80.2.10 010110
128
constant 0's
192
10 000000 224
NA: 180.80.2.128 +1 240
248
FVH: 180.80.2.129 252
254
255
3. What is the broadcast address of the IP 180.80.6.100 255.255.255.192?
Solution:
180.80.6.01 10100
constant 1's
180.80.6.01 111111
BA: 180.80.6.127

4. What subnet mask would you use for the 172.16.0.0 network, such that you can get 810 subnets and 40 hosts per subnet?
Solution:
Class B
@ 810 subnets
n = 10 bits
210 = 1024 subnets
x. x. 00000000.00 000000
1's 0's
SM: 255.255.255.192

@40 hosts/subnet
n = 6 bits
26 = 64 hosts/subnet
x. x. 00000000.00 000000
1's 0's
SM: 255.255.255.192

5. What subnet mask would you use for the 172.25.0.0 network, such that you can get 10 subnets and 2520 hosts per subnet?
Class B
@10 subnets @2520 hosts/subnet
n = 4 bits n = 12 bits
24=16 subnets 2 12 = 4096 hosts/subnet
x. x. 0000 0000.00000000
SM: 255.255.240.0 x.x.00000000.00000000
SM:255.255.240.0
6. What is the subnet the host 172.21.218.125 255.255.255.252 belongs to?
Solution:
172.21.218.011111 01 125 = 01111101
252 = 6 bits
constant 0's
Subnet Add = 172.21.218.124
Types of Addressing:
A. Classful Addressing
3. Class A - 1.0.0.0 - 126.255.255.255

8 8 8 8

NA-Network Address HA - Host Address


8 bits - constant 24 bits - dynamic

Example 5:
Subnet the given IP: 15.0.0.0 @ 500 subnets
Solution: 128 64 32 16 8 4 2 1

n = 9 bits -> nearest bit 128


192
2n = 29 = 512 subnets
h-n 24-9 15
224
2 -2= 2 - 2 = 2 - 2 = 32768 - 2 = 32766 hosts/subnet 240
248
252
IP: 15. 00000000.0 0000000.00000000 254
255
1's 0's 255.255.255
SM: 255.255.128.0 -255.128.0
SN SA
IP: 15. 00000000.0 0000000.00000000 0. 127.255
0 0.0.0
constant 1's
1 0.128.0
BA: 15.0.127.255
2 1.0.0
IP: 15. 00000000.0 0000000.00000000
3 1.128.0
c 00000000.1 0's
4 2.0.0
FUS: 15. 0.128.0
5 2.128.0
IP: 15. 00000000.0 0000000.00000000
6 3.0.0
c 11111111.1 0's
LUS: 15. 255.128.0
BS = 0.128.0
SA = (SN*BS)/256
IP TABLE:

Subnet No Subnet Address Host Address Range Broadcast Address

2 15.1.0.0 15.1.0.1-15.0.127.254 15.0.127.255 3 1.128.0


- 1

5 15.2.128.0 15.2.128.1-15.2.255.254 15.2.255.255 0.127.255

16 8.0.0
15 15.7.128.0 15.7.128.1-15.7.255.254 15.7.255.255
- 1

22 15.11.0.0 15.11.0.1-15.11.127.254 15.11.127.255 7.255.255

30 15.15.0.0 15.15.0.1-15.15.127-254 15.15.127.255

15 -> (15*128)/256 = 7.5 16 -> (16*128)/256 = 8.0


.5 -> 128
22 -> (22*128)/256 = 11.0
.0 -> 0
CIDR - Classless Inter-Domain Routing

/no. - number of high bits


example: 128 64 32 16 8 4 2 1
/24 = 11111111.11111111.11111111.00000000 128
SM = 255.255.255.0 192
224
240
/20 = 11111111.11111111.11110000.00000000 248
252
SM = 255.255.240.0
254
255
11111111.11111110.00000000.00000000
/15 = 255.254.0.0 SM = 255.255.128.0 = /17
SM = 255.248.0.0 = /13
/29 = 255.255.255.248 SM = 255.255.240.0 = /20
/32 = 11111111.11111111.11111111.11111111
SM = 255.255.255.255

11111111.11000000.00000000.00000000
/10 = 255.192.0.0
/15 = 255.254.0.0

Problem Solving:
1. What is the maximum number of valid subnets and usable hosts per subnet that you can get from the network 172.17.0.0/24:
Solution:
/24 = 255.255.255.0
class B = 172.17.00000000. 00000000
c n
n = 8 bits
8
2 =256 subnets -> 0 to 255 - valid subnets
2h-n - 2 = 216-8 - 2 = 256 - 2 = 254 hosts/subnet

2. What is the maximum number of valid subnets and usable hosts per subnet that you can get from the network 192.168.121.0/27
Solution:
/27 = 255.255.255.224
class C = 192.168.121.000 00000
n
n = 3 bits
3
2 = 8 subnets -> 0 to 7 - valid subnets
2h-n - 2 = 28-3 - 2 = 32 - 2 = 30 hosts/subnet

3. What is the Subnet Mask corresponding to a shorthand of /19?


/19 = 11111111.11111111.11100000.00000
SM = 255.255.224.0

4. What is the maximum number of valid subnets and usable hosts per subnet that you can get from the IP 15.2.128.1/17
Solution:
/17 = 255.255.128.0
class A = 15.00000000.0 0000000.00000000
n
n = 9 bits
9
2 = 512 subnets -> valid subnets
2h-n - 2 = 224-9 - 2 = 215 - 2 = 32766 hosts/subnet

5. What is the last valid host on the network that the host 192.168.13.117/29 is a part of:
Solution:
/29 = 255.255.255.248
192.168.13.01110101

constant 111 01110 = 112


192.168.13.01110111 111 = 7
BA = 192.168.13.119 119-1
LVH = 192.168.13.118

6. What is the network address of the host 10.247.240.198/20 belongs to:


Solution:
/20 = 255.255.240.0
class A = 10.247.1111 0000.00000000
c 0's
NA = 10.247.240.0

Enter the first valid host on the network 172.18.32.0/22:

/22 = 255.255.252.0

172.18.00100000.00000000

NA=172.18.32.0 + 1
FVH = 172.18.32.1
Basic Router Configuration
CLI - Command Line Interface
RIP - Routing Information Protocol

A. Classful Addressing
Example: IP: 200.20.2.0 @ 3 subnets
SM: 255.255.255.192
IP Table:

Subnet
Subnet Address Host Address Range Broadcast Address
No.

0 200.20.2.0 200.20.2.1-200.20.2.62 200.20.2.63

OMAN 1 200.20.2.64 200.20.2.65-200.20.2.126 200.20.2.127

DUBAI 2 200.20.2.128 200.20.2.129-200.20.2.190 200.20.2.191

WAN 3 200.20.2.192 200.20.2.193-200.20.2.254 200.20.2.255

Physical Topology

DCE - Data Communication Equipment DTE - Data circuit-Terminal Equipment


Router Configuration for OMAN:
Router Configuration for DUBAI:
Example 2: IP: Subnet the given IP: 195.19.5.0 @ 5 subnets
SM: 255.255.255.224
IP Table:

Subnet No Subnet Address Host Address Range Broadcast Address

0 - LAN 1 195.19.5.0 195.19.5.1-195.19.5.30 195.19.5.31

1 - LAN 2 195.19.5.32 195.19.5.33-195.19.5.62 195.19.5.63

2 - LAN 3 195.19.5.64 195.19.5.65-195.19.5.94 195.19.5.95

3 - WAN 1 195.19.5.96 195.19.5.97-195.19.5.126 195.19.5.127

4 - WAN 2 195.19.5.128 195.19.5.129-195.19.5.158 195.19.5.159

EEE Router MIE Router CAE Router


EEE Configuration
MIE Configuration
CAE Configuration
Q and A

1. Configure the serial interface of CHINA and describe the interface as CHINA Interface..
CHINA(config)#int se0/0
CHINA(config-if)#ip add 200.20.2.2 255.255.255.252
CHINA(config-if)#desc CHINA Interface
CHINA(config-if)#no shut
CHINA(config-if)#exit

2. Configure the serial interface of JAPAN.


JAPAN(config)#int se1/0
JAPAN(config-if)#ip add 200.20.2.1 255.255.255.252
JAPAN(config-if)#clock rate 4000000
JAPAN(config-if)#no shut
JAPAN(config-if)#exit

3. Configure the gateway of JAPAN and describe the gateway as JAPAN Gateway.
JAPAN(config)#int fa0/0
JAPAN(config-if)#ip add 172.16.100.1 255.255.0.0
JAPAN(config-if)#desc JAPAN Gateway
JAPAN(config-if)#no shut
JAPAN(config-if)#exit

4. Configure the gateway of CHINA and describe the gateway as CHINA Gateway.

CHINA(config)#int fa0/1
CHINA(config-if)#ip add 172.30.200.1 255.255.255.0
CHINA(config-if)#desc CHINA Interface
CHINA(config-if)#no shut
CHINA(config-if)#exit

What subnet mask would you use for the 120.120.0.0 network, such that you can get 2049 subnets? Show your solution in the space
provided. [Estimated time to answer the question: 3 mins]
Solution:
2^12 = 4096
120.120.0000 | 0000.00000000
255.255.240.0

What is the host address range of the IP 220.22.250.50 255.255.255.240? Show your solution in the space provided. [Estimated time to
answer the question: 3 mins]

220.22.250.0011 | 0010
NA: 220.22.250.48 + 1 FVH=220.22.250.49
BA:220.22.250.63 - 1 LVH-220.22.250.62

220.22.250.49-220.22.250.62

What subnet mask would you use for the 120.120.0.0 network, such that you can get 4097 subnets?
Show your solution in the space provided. [Estimated time to answer the question: 3 mins]
Solution:
2^13 = 8192
120.120.00000 | 000.00000000
255.255.248.0
What subnet mask would you use for the 172.20.0.0 network,
such that you can get 780 subnets and 60 hosts per subnet?

class B
@60 hosts/subnet
n = 6 bits
26 = 64 hosts

172.20.00000000.00000000

SM=255.255.255.192

Enter the valid host range for the network that the IP
address 10.177.3.227/20 is a part of:

/20 = 255.255.240.0

10.177.00000011.11100011
c 0's
c 1's

NA=10.177.0.0 + 1 -> FVH=10.177.0.1


BA=10.177.15.255 - 1 -> LVH=10.177.15.254

10.177.0.1-10.177.15.254
no space between the "-"

What is the CIDR corresponding to a subnet mask of


255.192.0.0?

11111111.11000000.00000000.00000000
/10

Enter the broadcast address for the network 172.26.120.0/25:

/25 = 255.255.255.128

172.26.120.00000000 or 255 - 128 = 127


c 1's
BA=172.26.120.127
Types of Addressing:
B. Classless Addressing
- it also means "supernetting"
-> subnetting the "subnetted" IP addresses
- it is also called VLSM - Variable Length Subnet Mask
-> to avoid wasted IP addresses.
1. Class C - 192.0.0.0 - 223.255.255.255
Example 1:
Subnet the IP 200.20.2.0/24 based on the table below:

Subnet Name No. of Hosts

LAN 1 10 hosts 2

LAN 2 50 hosts 1 **look for the highest no. of host required

WAN 4 hosts(includes NA and BA) 3

Solution:
@LAN 2 - 50 hosts
n = 6 bits
2n = 26 = 64 hosts
IP: 200.20.2.0
IP: 200.20.2.00 000000
1's 0's
SM: 255.255.255.192

IP: 200.20.2.00 000000


constant 1's
BA: 200.20.2.63

@LAN 1 - 10 hosts
n = 4 bits
+1
2n = 24 = 16 hosts
IP: 200.20.2.64

IP: 200.20.2.0100 0000


1's 0's
SM: 255.255.255.240
0100 0000
c 1's
IP: 200.20.2.0100 0000
constant 1's 0100 1111

BA: 200.20.2.79 64 + 15 = 79

@WAN - 4 hosts
n = 2 bits +1
2n = 22 = 4 hosts
IP: 200.20.2.80

IP: 200.20.2.010100 00
1's 0's
SM: 255.255.255.252

IP: 200.20.2.010100 00
constant 1's
BA: 200.20.2.83

IP Table:

Subnet Name Subnet Address Host-Address Range Broadcast Address Subnet Mask

LAN 2 200.20.2.0 200.20.2.1-200.20.2.62 200.20.2.63 255.255.255.192

LAN 1 200.20.2.64 200.20.2.65-200.20.2.78 200.20.2.79 255.255.255.240

WAN 200.20.2.80 200.20.2.81-200.20.2.82 200.20.2.83 255.255.255.252


2. Class B - 128.0.0.0 - 192.255.255.255
Example 2:
Subnet the IP 130.30.0.0/16 based on the table below:

Subnet Name No. of hosts

OMAN 8,000 hosts 2

DUBAI 1,000 hosts 3

EGYPT 15,000 hosts 1

WAN 1 4 hosts 4

WAN 2 4 hosts 5

Solution:
@ EGYPT - 15,000 hosts
n = 14 bits
2n = 214 = 16384 hosts
IP: 130.30.0.0
IP: 130.30.00 000000.00000000
1's 0's
SM: 255.255.192.0

IP: 130.30.00 000000.00000000


constant 1's
BA: 130.30.63.255

@OMAN - 8,000 hosts 63.255


n = 13 bits +1 + 1
2n = 213 = 8192 hosts 64. 0

IP: 130.30.64.0
IP: 130.30.010 00000.00000000 128 64 62 16 8 4 2 1

1's 0's 0 1 0 0 0 0 0 0

SM: 255.255.224.0

IP: 130.30.010 00000.00000000


010 11111
constant 1's
64 + 31 = 95
BA: 130.30.95.255

@ DUBAI - 1000 hosts 95.255


n = 10 bits +1 +1
2n = 210 = 1024 hosts

IP: 130.30.96.0
IP: 130.30.011000 00.00000000
1's 0's
SM: 255.255.252.0

IP: 130.30.011000 00.00000000 011000 11.11111111


constant 1's 96 + 3. 255
BA: 130.30.99.255

@ WAN 1 - 4 hosts
n = 2 bits +1
2n = 22 = 4 hosts

IP: 130.30.100.0
IP: 130.30.100.000000 00
1's 0's
SM: 255.255.255.252

IP: 130.30.100.000000 00
constant 1's
BA: 130.30.100.3

@ WAN 2 - 4 hosts
n = 2 bits +1
2n = 22 = 4 hosts

IP: 130.30.100.4
IP: 130.30.100.000001 00
1's 0's
SM: 255.255.255.252

IP: 130.30.100.000001 00
constant 1's
BA: 130.30.100.7

IP TABLE:

Subnet Name Subnet Address Host-Address Range Broadcast Address Subnet Mask

EGYPT 130.30.0.0 130.30.0.1-130.30.63.254 130.30.63.255 255.255.192.0

OMAN 130.30.64.0 130.30.64.1-130.30.95.254 130.30.95.255 255.255.224.0

DUBAI 130.30.96.0 130.30.96.1-130.30.99.254 130.30.99.255 255.255.252.0

WAN 1 130.30.100.0 130.30.100.1-130.30.100.2 130.30.100.3 255.255.255.252

WAN 2 130.30.100.4 130.30.100.5-130.30.100.6 130.30.100.7 255.255.255.252

WAN 3 130.30.100.8 130.30.100.9-130.30.100.10 130.30.100.11 255.255.255.252


3. Class A - 1.0.0.0 - 126.255.255.255
Example 3:
Subnet the IP 13.0.0.0/8 based on the table below:

Subnet Name No. of hosts

OMAN 100,000 hosts 3

DUBAI 200,000 hosts 2

EGYPT 2 million hosts 1

WAN 1 4 hosts 4

WAN 2 4 hosts 5

Solution:
@EGYPT - 2 million hosts
n = 21 bits
2n = 221 = 2,097,152 hosts
IP: 13.0.0.0
IP: 13.000 00000.00000000.00000000
SM: 255.224.0.0
BA: 13.31.255.255

@DUBAI - 200,000 hosts


n = 18 bits
2n = 218 = 262,144 hosts
IP: 13.32.0.0
IP: 13.001000 00.00000000.00000000
SM: 255.252.0.0
BA: 13.35.255.255

@OMAN - 100,000 hosts


n = 17 bits
2n = 217 = 131,072 hosts
IP: 13.36.0.0
IP: 13.0010010 0.00000000.00000000
SM: 255.254.0.0
BA: 13.37.255.255

@WAN 1 - 4 hosts
IP: 13.38.0.0
SM: 255.255.255.252
BA: 13.38.0.3

@WAN 2 - 4 hosts
IP: 13.38.0.4
SM: 255.255.255.252
BA: 13.38.0.7

IP TABLE:

Subnet Name Subnet Address Host-Address Range Broadcast Address Subnet Mask

EGYPT 13.0.0.0 13.0.0.1-13.31.255.254 13.31.255.255 255.224.0.0

DUBAI 13.32.0.0 13.32.0.1-13.35.255.254 13.35.255.255 255.252.0.0

OMAN 13.36.0.0 13.36.0.1-13.37.255.254 13.37.255.255 255.254.0.0

WAN 1 13.38.0.0 13.38.0.1-13.38.0.2 13.38.0.3 255.255.255.252

WAN 2 13.38.0.4 13.38.0.5-13.38.0.6 13.38.0.7 255.255.255.252


Sample CLI questions:

Ex1. Configure the gateway of CANADA.


CANADA(config)#int fa0/0
CANADA(config-if)#ip add 172.16.255.254 255.255.0.0
CANADA(config-if)#no shut
CANADA(config-if)#exit

Ex2. Configure the DCE interface of UK.


UK(config)#int se0/1/1
UK(config-if)#ip add 200.20.2.9 255.255.255.252
UK(config-if)#clock rate 2000000
UK(config-if)#no shut
UK(config-if)#exit

Ex3. Configure the RIP of USA.


USA(config)#router rip
USA(config-router)#version 2
USA(config-router)#network 200.20.2.0
USA(config-router)#network 200.20.2.4
USA(config-router)#network 10.0.0.0
USA(config-router)#exit

Ex4. Configure the DTE of CANADA.


CANADA(config)#int se0/1/1
CANADA(config-if)#ip add 200.20.2.10 255.255.255.252
CANADA(config-if)#no shut
CANADA(config)#exit

Ex5. Configure the console password for USA and the password is cisco.
USA(config)#line cons 0
USA(config-line)#pass cisco
USA(config-line)#login
USA(config-line)#exit
Ex6. Configure the gateway of UK.
UK(config)#int Gig0/0
UK(config-if)#ip add 192.168.255.254 255.255.255.0
UK(config-if)#no shut
UK(config-f)#exit

Ex7. Configure the RIP of CANADA.


CANADA(config)#router rip
CANADA(config-router)#version 2
CANADA(config-router)#network 200.20.2.0
CANADA(config-router)#network 200.20.2.8
CANADA(config-router)#network 172.16.0.0
CANADA(config-router)#exit

na: 200.20.2.0 na:200.20.2.4

na:200.20.2.8

What is the NA of 200.20.2.1/30?


Soln:
/30=255.255.255.252
200.20.2.000000 01
c 0's
200.20.2.0
More Subnetting Practice

What subnet mask would you use for the 172.27.0.0 network, such that you can get 770 subnets and 40 hosts per subnet?

Solution:

@40 hosts/subnet
n=6 bits
26 = 64 hosts/subnet

172.27.00000000.00 000000
1's 0's
255.255.255.192

Enter the last valid host on the network that the host 10.210.96.244 255.255.240.0 is a part of:

Solution:

10.210.0110 0000.00000000
c 1's

BA:10.210.111.255 - 1
LVH:10.210.111.254

Enter the valid host range for the network that the IP address 10.1.67.138/19 is a part of:

Solution:

/19 = 255.255.224.0

10.1.010 00011.00000000
c 0's
c 1's

NA:10.1.64.0 + 1 FVH:10.1.64.1
BA:10.1.95.255 - 1 LVH:10.1.95.254

10.1.64.1-10.1.95.254

Enter the broadcast address for the network 172.21.63.88/30:

Solution:

8 8 8 6 = 30
/30 = 255.255.255.252

172.21.63.010110 00
c 1's

172.21.63.91

What subnet mask would you use for the 172.18.0.0 network, such that you can get 270 subnets and 90 hosts per subnet?

Solution:
@270 subnets
n=9 bits
2^9=512 subnets

172.18.00000000.0 0000000

255.255.255.128

You might also like