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 OSPF KTCNTN

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

Đề bài

ccna-debai-ospf

ccna-debai-ospf

Cấu hình Gate

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname Gate
Gate(config)#ena
Gate(config)#enable pas
Gate(config)#enable password cisco
Gate(config)#li
Gate(config)#line con
Gate(config)#line console 0
Gate(config-line)#pas
Gate(config-line)#password cisco
Gate(config-line)#login
Gate(config-line)#exit
Gate(config)#li
Gate(config)#line vt
Gate(config)#line vty 0 4
Gate(config-line)#pas
Gate(config-line)#password cisco
Gate(config-line)#login
Gate(config-line)#login
Gate(config-line)#exit
Gate(config)#ban
Gate(config)#banner m
Gate(config)#banner motd “khong phan su mien vao”
Gate(config)#int s0/0/1
Gate(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Gate(config-if)#clo
Gate(config-if)#clock ra
Gate(config-if)#clock rate 56000
Gate(config-if)#ip add 192.168.2.3 255.255.255.0
Gate(config-if)#des
Gate(config-if)#description connect to hv1
Gate(config-if)#exit
Gate(config)#int s0/0/0
Gate(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Gate(config-if)#clo
Gate(config-if)#clock ra
Gate(config-if)#clock rate 56000
Gate(config-if)#ip add
Gate(config-if)#ip address 177.7.7.3 255.255.255.0
Gate(config-if)#des
Gate(config-if)#description connect to ISP
Gate(config-if)#exit
Gate(config)#int s0/1/0
Gate(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
Gate(config-if)#clo
Gate(config-if)#clock r
Gate(config-if)#clock rate 56000
Gate(config-if)#ip add
Gate(config-if)#ip address 192.168.3.3 255.255.255.0
Gate(config-if)#des
Gate(config-if)#description connect to hv2
Gate(config-if)#exit
Gate(config)#ip rou
Gate(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
Gate(config)#router os
Gate(config)#router ospf 1
Gate(config-router)#net
Gate(config-router)#network 192.168.2.0 0.0.0.255 a
Gate(config-router)#network 192.168.2.0 0.0.0.255 area 0
Gate(config-router)#network 192.168.3.0 0.0.0.255 area 0
Gate(config-router)#des
Gate(config-router)#def
Gate(config-router)#default-information o
Gate(config-router)#default-information originate
Gate(config-router)#pas
Gate(config-router)#passive-interface s0/0/0
Gate(config-router)#exit
Gate(config)#exit
Gate#
%SYS-5-CONFIG_I: Configured from console by console

Gate#wr
Building configuration…
[OK]
Gate#

Cấu hình hv2

Router>
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname hv1
hv1(config)#int s0/0/0
hv1(config-if)#no shut

hv1(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

hv1(config-if)#ip add 192.168.3.2
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
255.255.255.0
hv1(config-if)#des
hv1(config-if)#description connect to Gate
hv1(config-if)#exit
hv1(config)#int f0/0
hv1(config-if)#no shut

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

hv1(config-if)#
hv1(config-if)#ip add 192.168.4.2 255.255.255.0
hv1(config-if)#des
hv1(config-if)#description connect to lan4 va RX
hv1(config-if)#exit
hv1(config)#ip route 172.16.0.0 255.255.0.0 192.168.4.8
hv1(config)#route os
hv1(config)#route ospf 1
hv1(config-router)#net
hv1(config-router)#network 192.168.3.0 0.0.0.255 a
hv1(config-router)#network 192.168.3.0 0.0.0.255 area 0
hv1(config-router)#network 192.168.4.0 0.0.0.255 area 0
hv1(config-router)#
00:29:45: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.3 on Serial0/0/0 from LOADING to FULL, Loading Done

hv1(config-router)#re
hv1(config-router)#redistribute st
hv1(config-router)#redistribute static
% Only classful networks will be redistributed
hv1(config-router)#redistribute static s
hv1(config-router)#redistribute static subnets
hv1(config-router)#pas
hv1(config-router)#passive-interface f0/0
hv1(config-router)#exit
hv1(config)#exit
hv1#
%SYS-5-CONFIG_I: Configured from console by console

hv1#wr
Building configuration…
[OK]
hv1#

nhầm tên, đổi tên

hv1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
hv1(config)#ho
hv1(config)#hostname hv2
hv2(config)# do wr

Cấu hình hv1

Router>
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname hv1
hv1(config)#int s0/0/0
hv1(config-if)#no shut

hv1(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

hv1(config-if)#ip add
hv1(config-if)#ip address 192.168.2.
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
1 255.255.255.0
hv1(config-if)#des
hv1(config-if)#description co
hv1(config-if)#description connect to Gate
hv1(config-if)#exit
hv1(config)#int f0/0
hv1(config-if)#no shut

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

hv1(config-if)#
hv1(config-if)#ip ad
hv1(config-if)#ip address 192.168.1.1 255.255.255.0
hv1(config-if)#des
hv1(config-if)#description connect to lan 1
hv1(config-if)#exit
hv1(config)#router os
hv1(config)#router ospf 1
hv1(config-router)#net
hv1(config-router)#network 192.168.1.0 0.0.0.255 a
hv1(config-router)#network 192.168.1.0 0.0.0.255 area 0
hv1(config-router)#network 192.168.2.0 0.0.0.255 area 0
hv1(config-router)#
00:35:26: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.3 on Serial0/0/0 from LOADING to FULL, Loading Done

hv1(config-router)#pas
hv1(config-router)#passive-interface f0/0
hv1(config-router)#exit
hv1(config)#exit
hv1#
%SYS-5-CONFIG_I: Configured from console by console

hv1#wr
Building configuration…
[OK]
hv1#

 

Cấu hình ISP

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname ISP
ISP(config)#int s0/0/0
ISP(config-if)#no shut

ISP(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

ISP(config-if)#
ISP(config-if)#ip add
ISP(config-if)#ip address 177.7.7.4
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
255.255.255.0
ISP(config-if)#des
ISP(config-if)#description co
ISP(config-if)#description connect to Gate
ISP(config-if)#exit
ISP(config)#int f0/0
ISP(config-if)#no shut

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

ISP(config-if)#ip add 20.20.20.4 255.255.255.0
ISP(config-if)#des
ISP(config-if)#description connet to dmz
ISP(config-if)#exit
ISP(config)#ip route 192.168.0.0 255.255.248.0 s0/0/0
ISP(config)#ip route 172.16.0.0 255.255.0.0 s0/0/0
ISP(config)#exit
ISP#
%SYS-5-CONFIG_I: Configured from console by console

ISP#wr
Building configuration…
[OK]
ISP#

 

Xem bảng định tuyến đã thành công trên hv1

hv1#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 192.168.2.3 to network 0.0.0.0

O E2 172.16.0.0/16 [110/20] via 192.168.2.3, 00:05:44, Serial0/0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, Serial0/0/0
O    192.168.3.0/24 [110/128] via 192.168.2.3, 00:05:44, Serial0/0/0
O    192.168.4.0/24 [110/129] via 192.168.2.3, 00:05:44, Serial0/0/0
O*E2 0.0.0.0/0 [110/1] via 192.168.2.3, 00:03:16, Serial0/0/0
hv1#

Ping thử đến vùng dmz đã thành công

hv1#ping 20.20.20.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/11/25 ms

hv1#

 

Cấu hình con RX

 

Router>
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname RX
RX(config)#int f0/0
RX(config-if)#no shut

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

RX(config-if)#
RX(config-if)#ip add 192.168.4.8 255.255.255.0
RX(config-if)#exit
RX(config)#ip add
RX(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.2
RX(config)#do wr
Building configuration…
[OK]
RX(config)#

Ping từ RX và dmz

RX(config)#do ping 20.20.20.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 2/2/3 ms

RX(config)#

Cấu hình DNS

ccna-dns

ccna-dns

Cấu hình Web, đặt Ip và sửa html

ccna-cauhinh-web

ccna-cauhinh-web

Vào web thành công

ccna-web

ccna-web

 

 

Tags:
Nhắn tin qua Facebook