Baitap
Baitap
0/24
192.168.1. 0
and 255.255.255.0
NA 192.168.1.0
xor 0 .0 .0.255
BA 192.168.1.255
192.168.1.0 --> 192.168.1.255/24
-----------------------------------------------------------------------------------
---------------------
LAN1: 60 hosts
2^(32-24-n1) - 2 >= 60
=> n1 = 2
LAN1: 192.168.1.0 -- 64 Ips --> 192.168.1.63/26
----------------------------------------------------
LAN2: 40 hosts
2^(32-26-n2) - 2 >= 40
=> n2 = 0
LAN2: 192.168.1.64 -- 64 Ips --> 192.168.1.127/26
----------------------------------------------------
LAN3: 30 hosts
2^(32-26-n3) - 2 >= 30
=> n3 = 1
LAN3: 192.168.1.128 -- 32 Ips --> 192.168.1.159/27
----------------------------------------------------
LAN4: 20 hosts
2^(32-27-n4) - 2 >= 20
=> n4 = 0
LAN4: 192.168.1.160 -- 32 Ips --> 192.168.1.191/27
----------------------------------------------------
R1-R2: 2 hosts
2^(32-27-n5) - 2 >= 2
=> n5 = 3
R1-R2: 192.168.1.192 -- 4 Ips --> 192.168.1.195/30
----------------------------------------------------
R2-R3: 2 hosts
2^(32-30-n6) - 2 >= 2
=> n6 = 0
R2-R3: 192.168.1.196 -- 4 Ips --> 192.168.1.199/30
----------------------------------------------------
R3-R4: 2 hosts
2^(32-30-n7) - 2 >= 2
=> n7 = 0
R3-R4: 192.168.1.200 -- 4 Ips --> 192.168.1.203/30
----------------------------------------------------
R1-R4: 2 hosts
2^(32-30-n8) - 2 >= 2
=> n8 = 0
R1-R4: 192.168.1.204 -- 4 Ips --> 192.168.1.207/30
-----------------------------------------------------------------------------------
---------------------
Router1:
en
conf t
hostname Router1
interface f0/0
no shutdown
ip address 192.168.1.1 255.255.255.192
exit
interface s2/0
no shutdown
ip address 192.168.1.205 255.255.255.252
exit
interface s3/0
no shutdown
ip address 192.168.1.193 255.255.255.252
exit
ip dhcp pool Router1
network 192.168.1.0 255.255.255.192
default-router 192.168.1.1
exit
router rip
version 2
network 192.168.1.0
network 192.168.1.192
network 192.168.1.204
no auto-summary
exit
end
wr
-----------------------------------------------------------------------------------
---------------------
Router 2:
en
conf t
hostname Router2
interface f0/0
no shutdown
ip address 192.168.1.65 255.255.255.192
exit
interface s2/0
no shutdown
ip address 192.168.1.197 255.255.255.252
exit
interface s3/0
no shutdown
ip address 192.168.1.194 255.255.255.252
exit
ip dhcp pool Router2
network 192.168.1.64 255.255.255.192
default-router 192.168.1.65
exit
router rip
version 2
network 192.168.1.64
network 192.168.1.192
network 192.168.1.196
no auto-summary
exit
end
wr
-----------------------------------------------------------------------------------
---------------------
Router 3:
en
conf t
hostname Router3
interface f0/0
no shutdown
ip address 192.168.1.129 255.255.255.224
exit
interface s2/0
no shutdown
ip address 192.168.1.198 255.255.255.252
exit
interface s3/0
no shutdown
ip address 192.168.1.201 255.255.255.252
exit
ip dhcp pool Router3
network 192.168.1.128 255.255.255.224
default-router 192.168.1.129
exit
router rip
version 2
network 192.168.1.128
network 192.168.1.196
network 192.168.1.200
no auto-summary
exit
end
wr
-----------------------------------------------------------------------------------
---------------------
Router 4:
en
conf t
hostname Router4
interface f1/0
no shutdown
ip address 192.168.1.161 255.255.255.224
exit
interface s2/0
no shutdown
ip address 192.168.1.206 255.255.255.252
exit
interface s3/0
no shutdown
ip address 192.168.1.202 255.255.255.252
exit
interface f0/0
no shutdown
ip address 6.9.6.10 255.255.255.0
exit
ip dhcp pool Router4
network 192.168.1.160 255.255.255.224
default-router 192.168.1.161
exit
ip route 0.0.0.0 0.0.0.0 6.9.6.9
router rip
version 2
network 192.168.1.160
network 192.168.1.200
network 192.168.1.204
redistribute static
no auto-summary
exit
end
wr
-----------------------------------------------------------------------------------
---------------------
Router Internet:
en
conf t
ip route 0.0.0.0 0.0.0.0 6.9.6.10
end
wr