096.55555.69
096.888.6300
0915.183535
0915.363436

CCNA 5.0 (CCNA R&S) Bài lab cấu hình cơ bản switch ktcntn

CCNA 5.0 (CCNA R&S) Bài lab cấu hình cơ bản switch ktcntn

Đề bài

 

ccna-co-ban-switch-debai

ccna-co-ban-switch-debai

Cấu hình S1

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S1
S1(config)#en
S1(config)#ena
S1(config)#enable pas
S1(config)#enable password cisco
S1(config)#li
S1(config)#line con
S1(config)#line console 0
S1(config-line)#pas
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
S1(config)#li
S1(config)#line vty
S1(config)#line vty 0 15
S1(config-line)#pas
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
S1(config)#ban
S1(config)#banner mo
S1(config)#banner motd “khong phan su mien vao”
S1(config)#int
S1(config)#interface vl
S1(config)#interface vlan 1
S1(config-if)#ip add
S1(config-if)#ip address 192.168.1.11 255.255.255.0
S1(config-if)#no shut

S1(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

S1(config-if)#exit
S1(config)#ip de
S1(config)#ip default-gateway 192.168.1.1
S1(config)#exit
S1#
%SYS-5-CONFIG_I: Configured from console by console

S1#wr
Building configuration…
[OK]
S1#

 

Cấu hình R1

Router>
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R1
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
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#no shut

R1(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

R1(config-if)#ip add
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#exit
R1(config)#do wr
Building configuration…
[OK]
R1(config)#

 

Cấu hình S2

Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S2
S2(config)#ena
S2(config)#enable pas
S2(config)#enable password cisco
S2(config)#li
S2(config)#line con
S2(config)#line console 0
S2(config-line)#pas
S2(config-line)#password cisco
S2(config-line)#exit
S2(config)#li
S2(config)#line vt
S2(config)#line vty 0 15
S2(config-line)#pas
S2(config-line)#password cisco
S2(config-line)#login
S2(config-line)#exit
S2(config)#ban
S2(config)#banner mo
S2(config)#banner motd “khong phan su mien vao”
S2(config)#int
S2(config)#interface vl
S2(config)#interface vlan 1
S2(config-if)#ip add
S2(config-if)#ip address 192.168.1.12 255.255.255.0
S2(config-if)#no shut

S2(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

S2(config-if)#exit
S2(config)#ip de
S2(config)#ip default-gateway 192.168.1.1
S2(config)#int f0/1
S2(config-if)#des
S2(config-if)#description connect to R1
S2(config-if)#int f0/2
S2(config-if)#des
S2(config-if)#description co
S2(config-if)#description connect to S1
S2(config-if)#int f0/3
S2(config-if)#des
S2(config-if)#description connect to tftp
S2(config-if)#exit
S2(config)#do wr
Building configuration…
[OK]
S2(config)#

 

Cấu hình S3

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
S2(config)#hostname S3
S3(config)#en
S3(config)#ena
S3(config)#enable pas
S3(config)#enable password cisco
S3(config)#li
S3(config)#line con
S3(config)#line console 0
S3(config-line)#pas
S3(config-line)#password cisco
S3(config-line)#login
S3(config-line)#exit
S3(config)#li
S3(config)#line v
S3(config)#line vty 0 15
S3(config-line)#pas
S3(config-line)#password cisco
S3(config-line)#exit
S3(config)#ban
S3(config)#banner m
S3(config)#banner motd “khong phan su mien vao”
S3(config)#int vla
S3(config)#int vlan 1
S3(config-if)#no shut

S3(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

S3(config-if)#ip add
S3(config-if)#ip address 192.168.2.13 255.255.255.0
S3(config-if)#exit
S3(config)#ip de
S3(config)#ip default-gateway 192.168.2.1
S3(config)#do wr
Building configuration…
[OK]
S3(config)#

Cấu hình S4

Switch>
Switch>
Switch>ena
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 con
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)#exit
S4(config)#ban
S4(config)#banner m
S4(config)#banner motd “khong phan su mien vao”
S4(config)#int vlan
S4(config)#int vlan 1
S4(config-if)#no shut

S4(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

S4(config-if)#ip add
S4(config-if)#ip address 192.168.2.14 255.255.255.0
S4(config-if)#exit
S4(config)#ip d
S4(config)#ip de
S4(config)#ip default-gateway 192.168.2.1
S4(config)#do wr
Building configuration…
[OK]
S4(config)#
S4(config)#

 

Đặt IP trên các PC. Thực hiện telnet thành công từ PC 192.168.2.20 đến S1 192.168.1.11

ccna-telnet-switch

ccna-telnet-switch

Từ S4 Backup cấu hình vào TFTP

S4#
S4#co
S4#cop
S4#copy r
S4#copy running-config tf
S4#copy running-config tftp:
Address or name of remote host []? 192.168.1.30
Destination filename [S4-confg]?

Writing running-config…!!
[OK – 1130 bytes]

1130 bytes copied in 0.011 secs (102000 bytes/sec)
S4#

Thực hiện copy ngược từ TFTP vào S4

S4#
S4#
S4#copy tf
S4#copy tftp: r
S4#copy tftp: running-config
Address or name of remote host []? 192.168.1.30
Source filename []? S4-confg
Destination filename [running-config]?

Accessing tftp://192.168.1.30/S4-confg…
Loading S4-confg from 192.168.1.30: !
[OK – 1130 bytes]

1130 bytes copied in 0.001 secs (1130000 bytes/sec)
S4#
%SYS-5-CONFIG_I: Configured from console by console

S4#

 

Tags:
Nhắn tin qua Facebook