Kamis, 19 Januari 2023

CCNA


 SUBNETTING

Jawab :
172.16.3.0/23

IP Base :
23-24 = 1 = 2^1 = 2
(0-1)(2-3)
172.16.2.0/23

Vlan 10
63 Host
IP Network = 172.16.3.0/25
Range IP yang dapat digunkan = 172.16.3.1 - 172.16.3.126
Broadcast 172.16.3.127
Subnet mask = 255.255.255.128

Vlan 20
127 Host
IP Network = 172.16.2.0/24
Range IP yang dapat digunakan = 172.16.2.1 - 172.16.2.254
Broadcast = 172.16.2.255
Subnet mask = 255.255.255.0

Vlan 30
31 Host
IP Network = 172.16.3.128/26
Range IP yang dapat digunakan = 172.16.3.129 - 172.16.3.190
Broadcast 172.16.3.191
Subnet mask = 255.255.255.192

Bit        Bit        CIDR    Subnet    Net Mask            Host    Host Per
Masked    Host ID                                        Max        Network
0        8        /24        1        255.255.255.0        254        254
1        7        /25        2        255.255.255.128        252        126
2        6        /26        4        255.255.255.192        248        62
3        5        /27        8        255.255.255.224        240        30
4        4        /28        16        255.255.255.240        224        14
5        3        /29        32        255.255.255.248        192        6
6        2        /30        64        255.255.255.252        128        2



#SW-0
en
conf t
enable secret cisco
exit
vlan database
vlan 10
vlan 20
vlan 30
ex
conf t
int f0/1
sw mo trunk
sw trunk allowed vlan all
ex
int f0/2
sw mo access
sw access vlan 10
ex
int f0/3
sw mo access
sw access vlan 20
ex
int f0/4
sw mo access
sw access vlan 30
ex

#Router0
en
conf t
enable secret cisco
line vty 0 4
password cisca
login
exit
int g0/0
no sh
exit
int g0/1
ip add 202.100.2.1 255.255.255.0
no sh
exit
int g0/0.10
encapsulation dot1Q 10
ip add 172.16.3.1 255.255.255.128
exit
int g0/0.20
encapsulation dot1Q 20
ip add 172.16.2.1 255.255.255.0
exit
int g0/0.30
encapsulation dot1Q 30
ip add 172.16.3.129 255.255.255.192
exit
ip dhcp excluded-address 172.16.3.129
ip dhcp pool vlan30
network 172.16.3.135 255.255.255.192
default-router 172.16.3.129
exit
access-list 20 deny 172.16.2.0 0.0.0.255
access-list 20 permit any
line vty 0 4
login
access-class 20 in
exit
ip route 0.0.0.0 0.0.0.0 202.100.2.2
ip nat inside source list 100 interface g0/1 overload
access-list 100 permit ip any any
int g0/1
ip nat outside
exit
int g0/0.10
ip nat inside
exit
int g0/0.20
ip nat inside
exit
int g0/0.30
ip nat inside
exit

#Router1
en
conf t
enable secret cisco
int g0/0
ip add 202.100.2.2 255.255.255.0
no sh
exit
int g0/1
ip add 202.100.1.1 255.255.255.0
no sh
exit
router rip
network 202.100.2.0
network 202.100.1.0
network 202.100.0.0
network 172.16.2.0
network 172.16.3.0
exit

#Router2
en
conf t
enable secret cisco
int g0/0
ip add 202.100.1.2 255.255.255.0
no sh
exit
int g0/1
ip add 202.100.0.1 255.255.255.0
no sh
exit
router rip
network 202.100.0.0
network 202.100.1.0
network 202.100.2.0
network 172.16.2.0
network 172.16.3.0
exit

#Vlan 10
CMD
telnet 172.16.3.1
cisca
en
cisco

#Vlan 20
CMD
telnet 172.16.2.1

#Vlan 30
CMD
telnet 172.16.3.129
cisca
en
cisco

Tugas


 PC = 4
IP DHCP

Laptop = 1
Wireless IP DHCP

WRT300N
IP Static
IP 192.168.150.100/24
GW 192.168.150.1

ROUTER = 5
Router 0
en
conf t
int g0/1
no shut
ip add 192.168.150.1 255.255.255.0
ex
int g0/0
no shut
ip add 10.10.10.1 255.255.255.252
ex
int g0/1.10
encap dot1q 10
ip add 192.168.0.1 255.255.255.0
ex
int g0/1.100
encap dot1q 100
ip add 192.168.100.1 255.255.255.0
ex
ip dhcp pool vlan10
net 192.168.0.0 255.255.255.0
def 192.168.0.1
ex
ip dhcp pool vlan100
net 192.168.100.0 255.255.255.0
def 192.168.100.1
ex
router ospf 10
net 10.10.10.0 0.0.0.3 area 0
net 192.168.150.0 0.0.0.255 area 1
net 192.168.0.0 0.0.0.255 area 1
net 192.168.100.0 0.0.0.255 area 1
do wr

Router 1 (1941)
en
conf t
int g0/0
no shut
ip add 10.10.10.2 255.255.255.252
do wr
ex
int s0/0/0
no shut
ip add 20.20.20.1 255.255.255.252
ex
router ospf 20
net 10.10.10.0 0.0.0.3 area 0
net 20.20.20.0 mask 255.255.255.252
ex
router ospf 20
redistribute bgp 100 subnets
ex
router bgp 100
neig 20.20.20.2 remote-as 200
net 20.20.20.0 mask 255.255.255.252
redistribute ospf 20
ex
do wr

Router 2 (1941)
en
conf t
int s0/0/0
no shut
ip add 20.20.20.2 255.255.255.252
ex
int s0/0/1
no shut
ip add 30.30.30.1 255.255.255.252
ex
router bgp 200
neig 20.20.20.1 remote-as 100
neig 30.30.30.2 remote-as 300
net 30.30.30.0 mask 255.255.255.252
net 20.20.20.0 mask 255.255.255.252
ex
router ospf 20
net 20.20.20.0 0.0.0.3 area 0
net 30.30.30.0 0.0.0.3 area 0
redistribute bgp 200 subnets
ex
router bgp 200
redistribute ospf 20
do wr

Router 3 (1941)
en
conf t
int s0/0/1
no shut
ip add 30.30.30.2 255.255.255.252
do wr
ex
int g0/0
no shut
ip add 11.11.11.1 255.255.255.252
ex
router bgp 300
neig 30.30.30.1 remote-as 200
net 30.30.30.0 mask 255.255.255.252
ex
router ospf 30
net 11.11.11.0 0.0.0.3 area 0
redistribute bgp 300 subnets
ex
router bgp 300
redistribute ospf 30
do wr

Router 4 (1941)
en
conf t
int g0/0
no shut
ip add 11.11.11.2 255.255.255.252
ex
int g0/1
no shut
ip add 172.168.0.1 255.255.255.0
ex
router ospf 40
net 11.11.11.0 0.0.0.3 area 0
net 172.168.0.0 0.0.0.255 area 2
ex
do wr

SW 2960 = 2
SW 2
en
conf t
vlan 10
ex
vlan 100
ex
int f0/1
sw acc vlan 10
ex
int f0/10
sw acc vlan 100
ex
int g0/2
sw mode trunk
ex
int g0/1
sw mode trunk
ex
do wr


SW 0
en
conf t
vlan 10
ex
vlan 100
ex
int f0/1
sw acc vlan 10
ex
int f0/10
sw acc vlan 100
ex
int g0/2
sw mode trunk
ex
int g0/1
sw mode trunk
ex
do wr


Server = 2
Server 1
IP static 172.168.0.100/24
gw 172.168.0.1
service dns google.com
address 172.168.0.100

Server 2
IP static 172.168.0.101/24
gw 172.168.0.1

BGP


 

Router 43331 = 3

Router 1
en
conf t
router bgp 1000
neighbor 10.10.10.2 remote-as 2000
net 192.168.10.0 mask 255.255.255.0
do wr

Router 2
en
conf t
router bgp 2000
neighbor 10.10.10.1 remote-as 1000
neighbor 11.11.11.2 remote-as 3000
net 192.168.20.0 mask 255.255.255.0
do wr

Router 3
en
conf t
router bgp 3000
neighbor 11.11.11.1 remote-as 2000
net 192.168.30.0 mask 255.255.255.0
do wr


ACL

 

Server-PT = 1
ip dhcp

Router 43331 = 3
Router 1
en
conf t
access-list 10 deny host 192.168.20.2
access-list 10 deny host 192.168.20.0 0.0.0.255
access-list 10 permit any
int g0/0/0
ip access-group 10 out
do wr

//clear
no ip access-group 10 out
ex
no access-list 10

EXTENDED ACL
en
conf t
access-list 110 deny icmp host 192.168.20.2 host 192.168.10.3
access-list 110 permit ip any any
int g0/0/0
ip access-group 110 out

OSPF

 

Router 43331 = 3

Router 1
en
conf t
router ospf 1
net 192.168.10.0 0.0.0.255 area 0
net 10.10.10.0 0.0.0.3 area 0
router-id 1.1.1.1
do wr

Router 2
en
conf t
router ospf 2
net 192.168.20.0 0.0.0.255 area 0
net 10.10.10.0 0.0.0.3 area 0
net 11.11.11.0 0.0.0.3 area 0
router-id 1.1.1.1
do wr

Router 3
en
conf t
router ospf 3
net 192.168.30.0 0.0.0.255 area 0
net 11.11.11.0 0.0.0.3 area 0
router-id 1.1.1.1
do wr

INTERVLAN

 

Router 4331 = 1
en
conf t
int g0/0/0
no shut
ex
int g0/0/0.10
encapsulation dot1Q 10
ip add 192.168.10.1 255.255.255.0
ex
int g0/0/0.20
encapsulation dot1Q 20
ip add 192.168.20.1 255.255.255.0
ex
ip dhcp pool vlan10
net 192.168.10.0 255.255.255.0
default-router 192.168.10.1

ip dhcp pool vlan20
net 192.168.20.0 255.255.255.0
default-router 192.168.20.1

SW 2960 = 2
SW 1
en
conf t
int g0/2
sw mode trunk
do wr

SW 2
en
conf t
int g0/1
sw mode trunk
do wr

PC = 6
PC 1 -> SW 1 DHCP
PC 2 -> SW 1 DHCP
PC 3 -> SW 1 DHCP
PC 4 -> SW 1 DHCP
PC 5 -> SW 2 STATIC
PC 6 -> SW 2 STATIC

 RIP (Routing Dynamis)



ROUTER 4331 = 3
ROUTER ke 1
en
conf t
router rip
version 2
network 192.168.10.0
network 10.10.10.0
no auto-summary
do wr

ROUTER ke 2
en
conf t
router rip
version 2
network 11.11.11.0
network 10.10.10.0
network 192.168.20.0
no auto-summary
do wr

ROUTER ke 3
en
conf t
router rip
version 2
network 11.11.11.0
network 192.168.30.0
no auto-summary
do wr

DEFAULT

 ROUTER 4331 = 3
ROUTER ke 1
en
conf t
ip route 0.0.0.0 0.0.0.0 g0/0/1
do wr

ROUTER ke 2
en
conf t
ip route 0.0.0.0 0.0.0.0 g0/0/1
ip route 0.0.0.0 0.0.0.0 s0/1/0
do wr

ROUTER ke 3
en
conf t
ip route 0.0.0.0 0.0.0.0 s0/1/0
do wr

STATIC ROUTING


ROUTER 4331 = 3
ROUTER ke 1
en
conf t
int g0/0/0
ip add 192.168.10.1 255.255.255.0
no shutdown
do wr
ex
int g0/0/1
ip add 10.10.10.1 255.255.255.252
no shutdown
do wr
ex
int g0/0/0
ip dhcp pool kiri
net 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ex
ip dhcp excluded-address 192.168.10.1
ip route 192.168.20.0 255.255.255.0 10.10.10.2
ip route 192.168.30.0 255.255.255.0 10.10.10.2
ip route 11.11.11.0 255.255.255.252 10.10.10.2
do wr

ROUTER ke 2
en
conf t
int g0/0/1
no shutdown
ip add 10.10.10.2 255.255.255.252
do wr
ex
int g0/0/0
ip add 192.168.20.1 255.255.255.0
no shutdown
do wr
ex
int s0/1/0
ip add 11.11.11.1 255.255.255.252
no shutdown
do wr
ip route 192.168.10.0 255.255.255.0 10.10.10.1
ip route 192.168.30.0 255.255.255.0 11.11.11.2
ip route 11.11.11.0 255.255.255.252 11.11.11.2
do wr

ROUTER ke 3
en
conf t
int s0/1/0
ip add 11.11.11.2 255.255.255.252
no shutdown
do wr
ex
int g0/0/0
ip add 192.168.30.1 255.255.255.0
no shutdown
do wr
ip route 192.168.10.0 255.255.255.0 11.11.11.1
ip route 192.168.20.0 255.255.255.0 11.11.11.1
ip route 10.10.10.0 255.255.255.252 11.11.11.1
do wr

SW 2960 = 3

PC = 3
PC ke 1
ip dhcp

PC ke 2
ip 192.168.20.2/24 gw 192.168.20.1

PC ke 3
ip 192.168.30.2/24 gw 192.168.30.1


DHCP POOL


 ROUTER 4331 = 1
en
conf t
int g0/0/0
ip add 192.168.10.1 255.255.255.0
no shutdown
ex
int g0/0/1
ip add 192.168.20.1 255.255.255.0
no shutdown
ex

int g0/0/0
ip dhcp pool kiri
net 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ex
int g0/0/1
ip dhcp pool kanan
net 192.168.20.0 255.255.255.0
default-router 192.168.20.1
ex
ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.20.1

SW 2960 = 2

PC = 2 (CONSOULE) ip dhcp