In this lab, I will show you the Basic Combination of Class C and Class B on 2 Routers
Table of Contents
VLSM
Given Network: 192.168.0.0
Host Requirement on Router 1: 4000
Host Requirement on Router 2: 2048
Router 1<= 4000
4000<= 2n – 2
4000<= 212 – 2
4000<= 4096 – 2
4000<= 4094
Total number of network bit = 32
32 – n = 32 – 12 = 20 (CIDR of Router 1 network i.e. Given network)
i.e. 192.168.0.0/20
N.S.M = 11111111.11111111.11110000.00000000
= 255.255.240.0
Block Size = 256 – N.S.M
= 256 – 240 = 16
Note: Add this block size in given network so that we can get our new network for Router 2.
so the new network is 192.168.16.0/?
Now find FVH, LVH and Broadcast address
Given Network | 192 | 168 | 0 | 0 |
First Valid Host-FVH | 192 | 168 | 0 | 1 |
Last Valid Host-LVH | 192 | 168 | 15 | 254 |
Broadcast | 192 | 168 | 15 | 255 |
New Network | 192 | 168 | 16 | 0 |
Router 2<= 2048
2000 <= 2n – 2
2000 <= 211 – 2
2000 <= 2048 – 2
2000 <= 2046
Total number of network bits = 32
32 – n = 32 – 11 = 21 (CIDR of Router 2 network i.e. New network)
i.e. 192.168.16.0/21
N.S.M = 11111111.11111111.11111000.00000000
= 255.255.248.0
Block Size = 256 – N.S.M
= 256 – 248 = 8
Note: Add this block size in given network so that we can get our new network for Router 1 and 2 (Virtual Network).
so the new network is 192.168.24.0?
Now find FVH, LVH and Broadcast address
Given Network | 192 | 168 | 16 | 0 |
First Valid Host-FVH | 192 | 168 | 16 | 1 |
Last Valid Host-LVH | 192 | 168 | 23 | 254 |
Broadcast | 192 | 168 | 23 | 255 |
New Network | 192 | 168 | 24 | 0 |
Router 1 and Router 2 <= 2 (we required only two IP to connect two routers)
2 <= 2n – 2
2 <= 22 – 2
2 <= 4 – 2
2 <= 2
Total number of network bits = 32
32 – n = 32 – 2 = 30 (CIDR of Virtual network (R1&R2))
i.e. 192.168.24.0/30
N.S.M = 11111111.11111111.11111111.11111100
= 255.255.255.252
Block Size = 256 – N.S.M
= 256 – 252 = 4
Note: Add this block size in given network so that we can get our new network for Router 3. This network can be used in future.
so the new network is 192.168.24.4/?
Now find FVH, LVH and Broadcast address
Given Network | 192 | 168 | 24 | 0 |
First Valid Host-FVH | 192 | 168 | 24 | 1 |
Last Valid Host-LVH | 192 | 168 | 24 | 2 |
Broadcast | 192 | 168 | 24 | 3 |
New Network | 192 | 168 | 24 | 4 |
Basic Configuration on Router 1
Router>enable Router#configure terminal Router(config)#hostname R1 R1(config)#interface fastEthernet 0/0 R1(config-if)#ip address 192.168.0.1 255.255.240.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial 0/0/0 R1(config-if)#ip address 192.168.24.1 255.255.255.252 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#exit R1#write |
Basic Configuration on Router 2
Router>enable Router#configure terminal Router(config)#hostname R2 R2(config)#interface fastEthernet 0/0 R2(config-if)#ip address 192.168.16.1 255.255.248.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface serial 0/1/0 R2(config-if)#ip address 192.168.24.2 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#exit R2#write |
Verification on Router 1
R1#show ip route C 192.168.0.0/20 is directly connected, FastEthernet0/0 192.168.24.0/30 is subnetted, 1 subnets C 192.168.24.0 is directly connected, Serial0/0/0 |
Verification on Router 2
R2#show ip route C 192.168.16.0/21 is directly connected, FastEthernet0/0 192.168.24.0/30 is subnetted, 1 subnets C 192.168.24.0 is directly connected, Serial0/1/0 |