Professional Documents
Culture Documents
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
8 8 8 8
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 TABLE:
First valid host Last valid host
FVH = SA +1 LVH=BA - 1
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
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
BA = 195.19.5.63 63 - 1= 62 ->LVH
LVH = 195.19.5.62
8 8 8 8
Example 3:
Subnet the given IP: 150.15.0.0 @ 30 subnets 210=1024
Solution: 211=2048
2n = 25 = 32 subnets 213=8192
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:
IP TABLE: BS = 0.64
SA=(SN*BS) /256
6 1.128
Subnet No Subnet Address Host Address Range Broadcast Address
- 1
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
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
Example 5:
Subnet the given IP: 15.0.0.0 @ 500 subnets
Solution: 128 64 32 16 8 4 2 1
16 8.0.0
15 15.7.128.0 15.7.128.1-15.7.255.254 15.7.255.255
- 1
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
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
/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.
Physical Topology
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
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
10.177.0.1-10.177.15.254
no space between the "-"
11111111.11000000.00000000.00000000
/10
/25 = 255.255.255.128
LAN 1 10 hosts 2
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
@LAN 1 - 10 hosts
n = 4 bits
+1
2n = 24 = 16 hosts
IP: 200.20.2.64
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
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.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.96.0
IP: 130.30.011000 00.00000000
1's 0's
SM: 255.255.252.0
@ 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
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
@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
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
na:200.20.2.8
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
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