CCNA 5.0 Bài lab Switching-ospf-acl-tn
CCNA 5.0 Bài lab
CCNA 5.0 Cấu hình Campus
S4
Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S4
S4(config)#ena
S4(config)#enable pas
S4(config)#enable password cisco
S4(config)#li
S4(config)#line co
S4(config)#line console 0
S4(config-line)#pas
S4(config-line)#password cisco
S4(config-line)#login
S4(config-line)#exit
S4(config)#li
S4(config)#line vt
S4(config)#line vty 0 15
S4(config-line)#pas
S4(config-line)#password cisco
S4(config-line)#login
S4(config-line)#exit
S4(config)#ban
S4(config)#banner m
S4(config)#banner motd “S4-cuongnm”
S4(config)#vlan 10
S4(config-vlan)#na
S4(config-vlan)#name CB
S4(config-vlan)#exit
S4(config)#vlan 11
S4(config-vlan)#na
S4(config-vlan)#name SV
S4(config-vlan)#exit
S4(config)#vla
S4(config)#vlan 12
S4(config-vlan)#na
S4(config-vlan)#name QT
S4(config-vlan)#exit
S4(config)#vtp mo
S4(config)#vtp mode se
S4(config)#vtp mode server
Device mode already VTP SERVER.
S4(config)#vtp
S4(config)#vtp do
S4(config)#vtp domain cisco.com
Changing VTP domain name from NULL to cisco.com
S4(config)#vtp
S4(config)#vtp pa
S4(config)#vtp password cisco
Setting device VLAN database password to cisco
S4(config)#ip routi
S4(config)#ip routing
S4(config)#int vlan 10
S4(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
S4(config-if)#no shut
S4(config-if)#ip add
S4(config-if)#ip address 10.0.10.14 255.255.255.0
S4(config-if)#exit
S4(config)#int vlan 11
S4(config-if)#
%LINK-5-CHANGED: Interface Vlan11, changed state to up
S4(config-if)#no shut
S4(config-if)#ip add
S4(config-if)#ip address 10.0.11.14 255.255.255.0
S4(config-if)#exit
S4(config)#int vlan 12
S4(config-if)#
%LINK-5-CHANGED: Interface Vlan12, changed state to up
S4(config-if)#no shut
S4(config-if)#ip add
S4(config-if)#ip address 10.0.12.14 255.255.255.0
S4(config-if)#exit
S4(config)#
S4(config)#int f0/1
S4(config-if)#no sw
S4(config-if)#no switchport
S4(config-if)#ip add
S4(config-if)#ip address 192.168.6.14 255.255.255.0
S4(config-if)#des
S4(config-if)#description connect to R2
S4(config-if)#exit
S4(config)#int f0/2
S4(config-if)#sw
S4(config-if)#switchport tr
S4(config-if)#switchport trunk en
S4(config-if)#switchport trunk encapsulation d
S4(config-if)#switchport trunk encapsulation dot1q
S4(config-if)#sw
S4(config-if)#switchport mo
S4(config-if)#switchport mode tr
S4(config-if)#switchport mode trunk
S4(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan11, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan12, changed state to up
S4(config-if)#exit
S4(config)#int f0/3
S4(config-if)#sw
S4(config-if)#switchport tr
S4(config-if)#switchport trunk en
S4(config-if)#switchport trunk encapsulation d
S4(config-if)#switchport trunk encapsulation dot1q
S4(config-if)#sw
S4(config-if)#switchport m
S4(config-if)#switchport mode tr
S4(config-if)#switchport mode trunk
S4(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
S4(config-if)#exit
S4(config)#rou
S4(config)#router os
S4(config)#router ospf 1
S4(config-router)#ne
S4(config-router)#network 192.168.6.14 0.0.0.0 ar
S4(config-router)#network 192.168.6.14 0.0.0.0 area 0
S4(config-router)#net
S4(config-router)#network 10.0.10.14 0.0.0.0 area 0
S4(config-router)#network 10.0.11.14 0.0.0.0 area 0
S4(config-router)#network 10.0.12.14 0.0.0.0 area 0
S4(config-router)#exit
S4(config)#exit
S4#
%SYS-5-CONFIG_I: Configured from console by console
S4#wr
Building configuration…
[OK]
S4#
CCNA 5.0 cấu hình S5
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S5
S5(config)#ena
S5(config)#enable pas
S5(config)#enable password cisco
S5(config)#li
S5(config)#lico
S5(config)#li
S5(config)#line co
S5(config)#line console 0
S5(config-line)#pas
S5(config-line)#password cisco
S5(config-line)#exit
S5(config)#li
S5(config)#line v
S5(config)#line vty 0 15
S5(config-line)#pas
S5(config-line)#password cisco
S5(config-line)#exit
S5(config)#ban
S5(config)#banner m
S5(config)#banner motd “S5-cuongnm”
S5(config)#vt
S5(config)#vtp m
S5(config)#vtp mode c
S5(config)#vtp mode client
Setting device to VTP CLIENT mode.
S5(config)#vtp
S5(config)#vtp do
S5(config)#vtp domain cisco.com
Domain name already set to cisco.com.
S5(config)#vtp
S5(config)#vtp p
S5(config)#vtp password cisco
Setting device VLAN database password to cisco
S5(config)#int f0/1
S5(config-if)#sw
S5(config-if)#switchport mo
S5(config-if)#switchport mode tre
S5(config-if)#switchport mode tr
S5(config-if)#switchport mode trunk
S5(config-if)#exit
S5(config)#do show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gig1/1
Gig1/2
10 CB active
11 SV active
12 QT active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
S5(config)#int vlan 12
S5(config-if)#
%LINK-5-CHANGED: Interface Vlan12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan12, changed state to up
S5(config-if)#no shut
S5(config-if)#ip add
S5(config-if)#ip address 10.0.12.15 255.255.255.0
S5(config-if)#exit
S5(config)#ip de
S5(config)#ip default-gateway 10.0.12.14
S5(config)#int f0/2
S5(config-if)#sw
S5(config-if)#switchport mo
S5(config-if)#switchport mode ac
S5(config-if)#switchport mode access
S5(config-if)#sw
S5(config-if)#switchport ac
S5(config-if)#switchport access v
S5(config-if)#switchport access vlan 10
S5(config-if)#int f0/3
S5(config-if)#sw
S5(config-if)#switchport mo
S5(config-if)#switchport mode ac
S5(config-if)#switchport mode access
S5(config-if)#sw
S5(config-if)#switchport ac
S5(config-if)#switchport access v
S5(config-if)#switchport access vlan 11
S5(config-if)#exit
S5(config)#exit
S5#
%SYS-5-CONFIG_I: Configured from console by console
S5#wr
Building configuration…
[OK]
S5#
S6
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S6
S6(config)#vtp
S6(config)#vtp m
S6(config)#vtp mode cl
S6(config)#vtp mode client
Setting device to VTP CLIENT mode.
S6(config)#vt
S6(config)#vtp do
S6(config)#vtp domain cisco.com
Domain name already set to cisco.com.
S6(config)#vtp
S6(config)#vtp pas
S6(config)#vtp password cisco
Setting device VLAN database password to cisco
S6(config)#int f0/1
S6(config-if)#sw
S6(config-if)#switchport mo
S6(config-if)#switchport mode tr
S6(config-if)#switchport mode trunk
S6(config-if)#exit
S6(config)#do show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gig1/1
Gig1/2
10 CB active
11 SV active
12 QT active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
S6(config)#int vlan 12
S6(config-if)#
%LINK-5-CHANGED: Interface Vlan12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan12, changed state to up
S6(config-if)#no shut
S6(config-if)#ip add
S6(config-if)#ip address 10.0.12.16 255.255.255.0
S6(config-if)#exit
S6(config)#ip de
S6(config)#ip default-gateway 10.0.12.14
S6(config)#int f0/2
S6(config-if)#sw
S6(config-if)#switchport mo
S6(config-if)#switchport mode ac
S6(config-if)#switchport mode access
S6(config-if)#sw
S6(config-if)#switchport ac
S6(config-if)#switchport access vl
S6(config-if)#switchport access vlan 12
S6(config-if)#int f0/3
S6(config-if)#sw
S6(config-if)#switchport mo
S6(config-if)#switchport mode ac
S6(config-if)#switchport mode access
S6(config-if)#sw
S6(config-if)#switchport ac
S6(config-if)#switchport access v
S6(config-if)#switchport access vlan 10
S6(config-if)#exit
S6(config)#exit
S6#
%SYS-5-CONFIG_I: Configured from console by console
S6#wr
Building configuration…
[OK]
S6#
Cau hinh R1
Router>en
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R1
R1(config)#ena
R1(config)#enable pas
R1(config)#enable password cisco
R1(config)#li
R1(config)#line co
R1(config)#line console 0
R1(config-line)#pas
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#li
R1(config)#line v
R1(config)#line vty 0 4
R1(config-line)#pas
R1(config-line)#password cisco
R1(config-line)#exit
R1(config)#ban
R1(config)#banner m
R1(config)#banner motd “R1-cuongnm”
R1(config)#ac
R1(config)#access-list 100 per
R1(config)#access-list 100 permit t
R1(config)#access-list 100 permit tcp ho
R1(config)#access-list 100 permit tcp host 192.168.1.101 ho
R1(config)#access-list 100 permit tcp host 192.168.1.101 host 192.168.5.4 eq 80
R1(config)#ac
R1(config)#access-list 100 de
R1(config)#access-list 100 deny tc
R1(config)#access-list 100 deny tcp 192.168.1.0 0.0.0.255 hos
R1(config)#access-list 100 deny tcp 192.168.1.0 0.0.0.255 host 192.168.5.4 eq 80
R1(config)#ac
R1(config)#access-list 100 per
R1(config)#access-list 100 permit ip a
R1(config)#access-list 100 permit ip any a
R1(config)#access-list 100 permit ip any any
R1(config)#int f0/0
R1(config-if)#no shut
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#ip ac
R1(config-if)#ip access-group 100 in
R1(config-if)#exit
R1(config)#int s0/0/0
R1(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R1(config-if)#ip add
R1(config-if)#ip address 192.168.3.1 255.255.255.0
R1(config-if)#clo
R1(config-if)#clock r
R1(config-if)#clock rate 56000
R1(config-if)#exit
R1(config)#router os
R1(config)#router ospf 1
R1(config-router)#net
R1(config-router)#network 192.168.1.0 0.0.0.255 are
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 192.168.3.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#wr
Building configuration…
[OK]
R1#
Cau hinh R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R2
R2(config)#ena
R2(config)#enable pas
R2(config)#enable password cisco
R2(config)#li
R2(config)#line con
R2(config)#line console 0
R2(config-line)#pas
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit
R2(config)#li
R2(config)#line v
R2(config)#line vty 0 4
R2(config-line)#pas
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit
R2(config)#ban
R2(config)#banner m
R2(config)#banner motd “R2-cuongnm”
R2(config)#int f0/0
R2(config-if)#no hsut
^
% Invalid input detected at ‘^’ marker.
R2(config-if)#no shut
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#ip add
R2(config-if)#ip address 192.168.6.2 255.255.255.0
R2(config-if)#exit
R2(config)#int f0/1
R2(config-if)#no shut
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config-if)#ip add
R2(config-if)#ip address 192.168.5.2 255.255.255.0
R2(config-if)#int s0/0/0
R2(config-if)#no shut
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
R2(config-if)#ip add
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
% Incomplete command.
R2(config-if)#ip add
R2(config-if)#ip address 192.168.3.2 255.255.255.0
R2(config-if)#int s0/0/1
R2(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R2(config-if)#clo
R2(config-if)#clock r
R2(config-if)#clock rate 56000
R2(config-if)#ip add
R2(config-if)#ip address 192.168.4.2 255.255.255.0
R2(config-if)#exit
R2(config)#router
R2(config)#router os
R2(config)#router ospf 1
R2(config-router)#net
R2(config-router)#network 192.168.3.0 0.0.0.255 ar
R2(config-router)#network 192.168.3.0 0.0.0.255 area 0
R2(config-router)#network 192.168.3.0 0.0.0.255 area 0
01:38:21: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on Serial0/0/0 from LOADING to FULL, Loading Done
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#network 192.168.5.0 0.0.0.255 area 0
R2(config-router)#network 192.168.6.0 0.0.0.255 area 0
R2(config-router)#
01:39:01: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.6.14 on FastEthernet0/0 from LOADING to FULL, Loading Done
R2(config-router)#exit
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#wr
Building configuration…
[OK]
R2#
Cau hinh R3
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R3
R3(config)#ena
R3(config)#enable pas
R3(config)#enable password cisco
R3(config)#li
R3(config)#line co
R3(config)#line console 0
R3(config-line)#pa
R3(config-line)#pas
R3(config-line)#password cisco
R3(config-line)#login
R3(config-line)#exit
R3(config)#li
R3(config)#line v
R3(config)#ac
R3(config)#access-list 2 per
R3(config)#access-list 2 permit ho
R3(config)#access-list 2 permit host 192.168.1.101
R3(config)#ac
R3(config)#access-list 1 pet
R3(config)#access-list 1 per
R3(config)#access-list 1 permit ho
R3(config)#access-list 1 permit host 192.168.1.101
R3(config)#ac
R3(config)#access-list 1 de
R3(config)#access-list 1 deny 192.168.1.0 0.0.0.255
R3(config)#ac
R3(config)#access-list 1 de
R3(config)#access-list 1 per
R3(config)#access-list 1 permit an
R3(config)#access-list 1 permit any
R3(config)#li
R3(config)#line vt
R3(config)#line vty 0 4
R3(config-line)#pas
R3(config-line)#password cisco
R3(config-line)#login
R3(config-line)#ac
R3(config-line)#access-class 2 in
R3(config-line)#exit
R3(config)#int s0/0/0
R3(config-if)#no shut
R3(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
R3(config-if)#ip add
R3(config-if)#ip address 1
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
^
% Invalid input detected at ‘^’ marker.
R3(config-if)#ip address 192.168.4.3 255.255.255.0
R3(config-if)#int f0/0
R3(config-if)#no shut
R3(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#ip ac
R3(config-if)#ip access-group 1 o
R3(config-if)#ip access-group 1 out
R3(config-if)#ip ad
R3(config-if)#ip address 192.168.2.3 255.255.255.0
R3(config-if)#exit
R3(config)#router os
R3(config)#router ospf 1
R3(config-router)#net
R3(config-router)#network 192.168.2.0 0.0.0.255 are
R3(config-router)#network 192.168.2.0 0.0.0.255 area 0
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#exit
R3(config)#
01:47:42: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.6.2 on Serial0/0/0 from LOADING to FULL, Loading Done
exit
R3#
%SYS-5-CONFIG_I: Configured from console by console
R3#wr
Building configuration…
[OK]
R3#show ip route
Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area
* – candidate default, U – per-user static route, o – ODR
P – periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
O 10.0.10.0 [110/66] via 192.168.4.2, 00:00:03, Serial0/0/0
O 10.0.11.0 [110/66] via 192.168.4.2, 00:00:03, Serial0/0/0
O 10.0.12.0 [110/66] via 192.168.4.2, 00:00:03, Serial0/0/0
O 192.168.1.0/24 [110/129] via 192.168.4.2, 00:00:03, Serial0/0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/0
O 192.168.3.0/24 [110/128] via 192.168.4.2, 00:00:03, Serial0/0/0
C 192.168.4.0/24 is directly connected, Serial0/0/0
O 192.168.5.0/24 [110/65] via 192.168.4.2, 00:00:03, Serial0/0/0
O 192.168.6.0/24 [110/65] via 192.168.4.2, 00:00:03, Serial0/0/0
R3#