Vous êtes sur la page 1sur 10

Router(config)#hostname Site-1

Site-1(config)#no ip domain-lokup
Site-1(config)#no ip domain-lookup
Site-1(config)#enable secret ccna
Site-1(config)#line console 0
Site-1(config-line)#pass
Site-1(config-line)#password ccna
Site-1(config-line)#login
Site-1(config-line)#exit
Site-1(config)#line console 0
Site-1(config-line)#logging synchronous
Site-1(config-line)#exit
Site-1(config)#service password-encryption
Site-1(config)#banner motd #acceso restringido#
Site-1(config)#interface s 0/0/0
Site-1(config-if)#ip add 192.168.10.105 255.255.255.252
Site-1(config-if)#bandwidth 128
Site-1(config-if)#description Site-1 a HQ
Site-1(config-if)#clock rate 12800
Site-1(config-if)#no sh
exit
Site-1(config)#ip route 0.0.0.0 0.0.0.0 s 0/0/0
Site-1(config)#interface g 0/0
Site-1(config-if)#no sh
Site-1(config)#interface g 0/0.45
Site-1(config-subif)#encapsulation dot1Q
Site-1(config-subif)#ip add 192.168.45.1
no sh
Site-1(config-subif)#exit
Site-1(config)#interface g 0/0.47
Site-1(config-subif)#encapsulation dot1Q
Site-1(config-subif)#ip add 192.168.47.1
exit

45
255.255.255.0

47
255.255.255.0

Site-1(config)#interface g 0/0.101
Site-1(config-subif)#encapsulation dot1Q 101
Site-1(config-subif)#ip add 192.168.101.1 255.255.255.0
Site-1(config-subif)#no sh
exit
Site-1(config)#router ospf 10
Site-1(config-router)#router-id 1.1.1.1
Site-1(config-router)#network 192.168.10.104 0.0.0.3 area 0
Site-1(config-router)#network 192.168.45.0 0.0.0.255 area 0
Site-1(config-router)#network 192.168.47.0 0.0.0.255 area 0
Site-1(config-router)#network 192.168.101.0 0.0.0.255 area 0
Site-1(config-router)#passive-interface g 0/0.45
Site-1(config-router)#passive-interface g 0/0.47
Site-1(config-router)#passive-interface g 0/0.101
Site-1(config-router)#exit
Site-1(config)#interface s 0/0/0
Site-1(config-if)#ban
Site-1(config-if)#bandwidth 128
Site-1(config-if)#ip ospf cost 7500

Site-1(config-if)#

Site-1(config)#ip dhcp excluded-address 192.168.45.1 192.168.45.20


Site-1(config)#ip dhcp excluded-address 192.168.47.1 192.168.47.20
Site-1(config)#ip dhcp pool vlan45
Site-1(dhcp-config)#network 192.168.45.0 255.255.255.0
Site-1(dhcp-config)#default-router 192.168.45.1
Site-1(dhcp-config)#dns-server 192.168.18.100
Site-1(dhcp-config)#exit
Site-1(config)#ip dhcp pool vlan47
Site-1(dhcp-config)#network 192.168.47.0 255.255.255.0
Site-1(dhcp-config)#default-router 192.168.47.1
Site-1(dhcp-config)#dns-server 192.168.18.100
Site-1(dhcp-config)#exit
Site-1(config)#
hostname Site-1
no ip domain-lookup
enable secret ccna
line console 0
password ccna
login
exit
line console 0
logging synchronous
exit
line vty 0 4
password ccna
login
exit
service password-encryption
banner motd #acceso restringido#
interface s 0/0/0
ip add 192.168.10.105 255.255.255.252
bandwidth 128
clock rate 128000
description police a central
no sh
exit
ip route 0.0.0.0 0.0.0.0 s 0/0/0
interface g 0/0
no sh
interface g 0/0.45
encapsulation dot1Q
ip add 192.168.45.1
no sh
exit
interface g 0/0.47
encapsulation dot1Q
ip add 192.168.47.1
exit

45
255.255.255.0

47
255.255.255.0

interface g 0/0.101
encapsulation dot1Q 101
ip add 192.168.101.1 255.255.255.0

no sh
exit
router ospf 10
router-id 1.1.1.1
network 192.168.10.104 0.0.0.3 area 0
network 192.168.45.0 0.0.0.255 area 0
network 192.168.47.0 0.0.0.255 area 0
network 192.168.101.0 0.0.0.255 area 0
passive-interface g 0/0.45
passive-interface g 0/0.47
passive-interface g 0/0.101
exit
interface s 0/0/0
bandwidth 128
ip ospf cost 7500
exit

ip dhcp excluded-address 192.168.45.1 192.168.45.20


ip dhcp excluded-address 192.168.47.1 192.168.47.20
ip dhcp pool VLAN45
network 192.168.45.0 255.255.255.0
default-router 192.168.45.1
dns-server 192.168.18.100
exit
ip dhcp pool VLAN47
network 192.168.47.0 255.255.255.0
default-router 192.168.47.1
dns-server 192.168.18.100
exit

HHQQQQQQQQQQQ
Router(config)#interface serial 0/0/0
Router(config-if)#ip add 192.168.10.106 255.255.255.252
Router(config-if)#no sh
Router(config-if)#bandwidth 128
Router(config-if)#exit
Router(config)#interface s 0/0/1
Router(config-if)#ban
Router(config-if)#bandwidth 128
Router(config-if)#ip add 192.168.10.114 255.255.255.252
Router(config-if)#clock rate 128000
Router(config-if)#no sh
Router(config-if)#exit
Router(config)#hostname HQ
HQ(config)#interface s 0/1/0
HQ(config-if)#
HQ(config-if)#ip ad 198.51.100.1 255.255.255.240
HQ(config-if)#no sh
HQ(config-if)#exit

HQ(config)#
interface g 0/0
HQ(config-if)#ip add 192.168.18.41 255.255.255.248
HQ(config-if)#no sh
HQ(config)#ip route 0.0.0.0 0.0.0.0 s 0/1/0
Site-2(config)#ip route 192.168.200.0 255.255.252.0 s 0/0/1
HQ(config)#router ospf 10
HQ(config-router)#router-id 2.2.2.2
HQ(config-router)#network 192.168.10.104 0.0.0.3 area 0
HQ(config-router)#network 192.168.10.112 0.0.0.3 area 0
HQ(config-router)#network 192.168.18.40 0.0.0.7 area 0
HQ(config-router)#passive-interface g 0/0
HQ(config-router)#interface s 0/0/0
HQ(config-if)#bandwidth 128
HQ(config-if)#ip ospf cost 7500
HQ(config-if)#exit
HQ(config)#interface s 0/0/1
HQ(config-if)#ban
HQ(config-if)#bandwidth 128
HQ(config-if)#exit
HQ(config)#ip nat inside source static 192.168.18.46 198.51.100.14
HQ(config)#interface g 0/0
HQ(config-if)#ip nat inside
HQ(config-if)#interface s 0/1/0
HQ(config-if)#ip nat ou
HQ(config-if)#ip nat pool INTERNET 198.51.100.3 198.51.100.13 net
HQ(config-if)#ip nat pool INTERNET 198.51.100.3 198.51.100.13 netmask 255.255.25
5.240
HQ(config)#ip nat inside source list 1 pool INTERNET
HQ(config)#
HQ(config)#ip nat inside source static 192.168.18.46 198.51.100.14
HQ(config)#ip acc
HQ(config)#ip access-list stan
HQ(config)#ip access-list standard 1
HQ(config-std-nacl)#permit 192.168.45.0 0.0.0.255
HQ(config-std-nacl)#permit 192.168.47.0 0.0.0.255
HQ(config-std-nacl)#permit 192.168.200.0 0.0.3.255
HQ(config-std-nacl)#exit
HQ(config)#
access-list 1 permit 192.168.45.0 0.0.0.255
access-list 1 permit 192.168.47.0 0.0.0.255
access-list 1 permit 192.168.200.0 0.0.3.255
ip access-list standard MANAGE
permit host 203.0.113.18
exit
access-list 101 permit ip host 203.0.113.18 any
access-list 101 permit tcp any host 198.51.100.14 eq www
access-list 101 permit tcp any any established
access-list 101 deny ip any any
line vty 0 15
access-class MANAGE in
password cisco
login

exit
interface Serial0/1/0
ip access-group 101 in
exit
--------------------------------------------------interface serial 0/0/0
ip add 192.168.10.106 255.255.255.252
no sh
bandwidth 128
exit
interface s 0/0/1
bandwidth 128
ip add 192.168.10.114 255.255.255.252
clock rate 128000
no sh
exit
hostname HQ
interface s 0/1/0
ip ad 198.51.100.1 255.255.255.240
no sh
exit
interface g 0/0
ip add 192.168.18.41 255.255.255.248
no sh
exit
ip route 0.0.0.0 0.0.0.0 s 0/1/0
ip route 192.168.200.0 255.255.252.0 s 0/0/1
router ospf 10
router-id 2.2.2.2
network 192.168.10.104 0.0.0.3 area 0
network 192.168.10.112 0.0.0.3 area 0
network 192.168.18.40 0.0.0.7 area 0
passive-interface g 0/0
exit
interface s 0/0/0
bandwidth 128
ip ospf cost 7500
exit
interface s 0/0/1
bandwidth 128
exit
ip nat inside source static 192.168.18.46 198.51.100.14
interface g 0/0
ip nat inside
interface s 0/1/0
ip nat ou
ip nat pool INTERNET 198.51.100.3 198.51.100.13 net
ip nat pool INTERNET 198.51.100.3 198.51.100.13 netmask 255.255.255.240
ip nat inside source list 1 pool INTERNET
ip nat inside source static 192.168.18.46 198.51.100.14
ip access-list standard 1
permit 192.168.45.0 0.0.0.255
permit 192.168.47.0 0.0.0.255
permit 192.168.200.0 0.0.3.255
exit

access-list 1 permit 192.168.45.0 0.0.0.255


access-list 1 permit 192.168.47.0 0.0.0.255
access-list 1 permit 192.168.200.0 0.0.3.255
ip access-list standard MANAGE
permit host 203.0.113.18
exit
access-list 101 permit ip host 203.0.113.18 any
access-list 101 permit tcp any host 198.51.100.14 eq www
access-list 101 permit tcp any any established
access-list 101 deny ip any any
line vty 0 15
access-class MANAGE in
password cisco
login
exit
interface Serial0/1/0
ip access-group 101 in
exit

--------------------------------------------------------------

Router(config)#hostname Site-2
Site-2(config)#interface s 0/0/0
Site-2(config-if)#ip add 192.168.10.126 255.255.255.252
Site-2(config-if)#no sh
Site-2(config-if)#exit
Site-2(config)#interface s 0/0/1
Site-2(config-if)#ban
Site-2(config-if)#bandwidth 128
Site-2(config-if)#ip add 192.168.10.113 255.255.255.252
Site-2(config-if)#no sh
Site-2(config-if)#exit
Site-1(config)#ip route 0.0.0.0 0.0.0.0 s 0/0/1
Site-2(config)#ip route 192.168.200.0 255.255.252.0 s 0/0/0
Site-2(config)#router ospf 10
Site-2(config-router)#router-id 3.3.3.3
Site-2(config-router)#network 192.168.10.112 0.0.0.3 area 0
Site-2(config-router)#exit
Site-2(config)#interface s 0/0/1
Site-2(config-if)#ban
Site-2(config-if)#bandwidth 128
Site-2(config-if)#exit

-------hostname Site-2
interface s 0/0/0
ip add 192.168.10.126 255.255.255.252

no sh
exit
interface s 0/0/1
bandwidth 128
ip add 192.168.10.113 255.255.255.252
no sh
exit
ip route 0.0.0.0 0.0.0.0 s 0/0/1
ip route 192.168.200.0 255.255.252.0 s 0/0/0
router ospf 10
router-id 3.3.3.3
network 192.168.10.112 0.0.0.3 area 0
exit
interface s 0/0/1
bandwidth 128
exit

SWICHETS

S1(config)#hostname Site1-SW1
Site1-SW1(config)#vlan 45
Site1-SW1(config-vlan)#name HR
Site1-SW1(config-vlan)#exit
Site1-SW1(config)#vlan 47
Site1-SW1(config-vlan)#name records
Site1-SW1(config-vlan)#exit
Site1-SW1(config)#vlan 101
Site1-SW1(config-vlan)#name comm
Site1-SW1(config-vlan)#exit
Site1-SW1(config)#
Site1-SW1(config)#interface g 0/1
Site1-SW1(config-if)#sw mode trunk
Site1-SW1(config-if)#no sh
exit
Site1-SW1(config)#interface g 0/2
Site1-SW1(config-if)#no sh
Site1-SW1(config-if)#sw mode trunk
Site1-SW1(config-if)#exit
Site1-SW1(config)#interface fa 0/10
Site1-SW1(config-if)#sw mode acc
Site1-SW1(config-if)#sw acc vlan 45
Site1-SW1(config-if)#exit
Site1-SW1(config)#interface fa 0/15
Site1-SW1(config-if)#sw mode acc
Site1-SW1(config-if)#sw acc vlan 47
Site1-SW1(config-if)#exit
Site1-SW1(config)#
Site1-SW1(config)#ip default-gateway 192.168.101.1
Site1-SW1(config)#interface vlan 101

Site1-SW1(config-if)#ip add 192.168.101.2 255.255.255.0


Site1-SW1(config-if)#exit
Site1-SW1(config)#
Site1-SW1(config)#interface range fa 0/1-9 ,fa 0/11-14 , fa 0/16-24
Site1-SW1(config-if-range)#sw mode acc
Site1-SW1(config-if-range)#sh
------hostname Site1-SW1
VLAN 45
name finance
exit
VLAN 47
name sales
exit
VLAN 101
name netadmin
exit
interface g 0/1
sw mode trunk
no sh
exit
interface g 0/2
no sh
sw mode trunk
exit
interface fa 0/10
sw mode acc
sw acc VLAN 45
no sh
exit
interface fa 0/15
sw mode acc
sw acc VLAN 47
no sh
exit
ip default-gateway 192.168.101.1
interface VLAN 101
ip add 192.168.101.2 255.255.255.0
no sh
exit
interface range fa 0/1-9 ,fa 0/11-14 , fa 0/16-24
sw mode acc
sh
exit

-------------------------------------------------SWWWWWWW22222
S2(config)#hostname Site1-SW2
Site1-SW2(config)#vlan 45
Site1-SW2(config-vlan)#name finance
Site1-SW2(config-vlan)#exit
Site1-SW2(config)#vlan 47

Site1-SW2(config-vlan)#name sales
Site1-SW2(config-vlan)#exit
Site1-SW2(config)#vlan 101
Site1-SW2(config-vlan)#name netadmin
Site1-SW2(config-vlan)#exit
Site1-SW2(config)#
site1-SW2(config)#interface g 0/1
Site1-SW2(config-if)#sw mode trunk
Site1-SW2(config-if)#no sh
Site1-SW2(config)#interface fa 0/3
Site1-SW2(config-if)#sw mode acc
Site1-SW2(config-if)#sw acc vlan 45
no sh
Site1-SW2(config-if)#exit
Site1-SW2(config)#interface fa 0/21
Site1-SW2(config-if)#sw mode acc
Site1-SW2(config-if)#sw acc vlan 47
no sh
Site1-SW2(config-if)#exit
Site1-SW2(config)#ip default-gateway 192.168.101.1
Site1-SW2(config)#interface vlan 101
Site1-SW2(config-if)#ip add 192.168.101.3 255.255.255.0
Site1-SW2(config-if)#exit
Site1-SW2(config)#
Site1-SW2(config)#interface range fa 0/1-2
Site1-SW2(config-if-range)#sw mode acc
Site1-SW2(config-if-range)#sh
Site1-SW2(config)#interface range fa 0/4-20
Site1-SW2(config-if-range)#sw mode acc
Site1-SW2(config-if-range)#sh
Site1-SW2(config)#interface range fa 0/22-24
Site1-SW2(config-if-range)#sw mode acc
Site1-SW2(config-if-range)#sh
Site1-SW2(config)#interface range g 0/2
Site1-SW2(config-if-range)#sw mode acc
Site1-SW2(config-if-range)#sh

hostname Site1-SW2
VLAN 45
name finance
exit
VLAN 47
name sales
exit
VLAN 101
name netadmin
exit
interface g 0/1
sw mode trunk
no sh
exit
interface fa 0/3

sw mode acc
sw acc VLAN 45
no sh
exit
interface fa 0/21
sw mode acc
sw acc VLAN 47
no sh
exit
ip default-gateway 192.168.101.1
interface VLAN 101
ip add 192.168.101.3 255.255.255.0
exit
interface range
sw mode acc
sh
exit
interface range
sw mode acc
sh
exit
interface range
sw mode acc
sh
exit
interface range
sw mode acc
sh
exit

fa 0/1-2

fa 0/4-20

fa 0/22-24

g 0/2