Lab 2-3: XÁc thực trong rip version 2 Mô tả



tải về 12.63 Kb.
Chuyển đổi dữ liệu10.08.2016
Kích12.63 Kb.
#15370
Lab 2-3: XÁC THỰC TRONG RIP VERSION 2

Mô tả


Router RA và RB đều sử dụng giao thức định tuyến RIP để trao đổi thông tin định tuyến. Các router sử dụng giao thức định tuyến RIP version 2.
Cần thực hiện chứng thực theo dạng plain-text và MD5 qua kết nối serial.

Cấu hình
RA

!
hostname RA
no ip domain-lookup
!
key chain vnpro
key 1
key-string 234
!
process-max-time 200
!
interface Loopback0
ip address 70.70.70.70 255.255.255.255
no ip directed-broadcast
!
interface Serial0
ip address 141.108.0.10 255.255.255.252
no ip directed-broadcast
ip rip authentication mode md5
ip rip authentication key-chain vnpro
clockrate 64000
!
router rip
version 2
network 70.0.0.0
network 141.108.0.0
!
end
RB
!
hostname RB
no ip domain-lookup
!

key chain vnpro


key 1
key-string 234
!
interface Loopback0
ip address 80.80.80.1 255.255.255.0
!
interface Serial0
ip address 141.108.0.9 255.255.255.252
ip rip authentication mode md5
ip rip authentication key-chain vnpro
!
router rip
version 2
network 80.0.0.0
network 141.108.0.0
!
ip classless
!
end
Các bước thực hiện
1. Cấu hình các thông số cơ bản cho router RA và router RB:
Router(config)#host RA
RA(config)#no ip domain-lookup
RA(config)#int lo0
RA(config-if)#ip addr 70.70.70.70 255.255.255.255
RA(config-if)#int s0
RA(config-if)#ip address 141.108.0.10 255.255.255.252
RA(config-if)#clock rate 64000
RA(config-if)#no shut
RA(config-if)#exit

Router(config)#host RB


RB(config)#no ip domain-lookup
RB(config)#int lo0
RB(config-if)#ip address 80.80.80.1 255.255.255.0
RB(config-if)#int s0
RB(config-if)#ip address 141.108.0.9 255.255.255.252
RB(config-if)#no shut
RB(config-if)#exit
2. Cấu hình định tuyến cho router RA và router RB:
RA(config)#router rip
RA(config-router)#ver 2
RA(config-router)#net 141.108.0.0
RA(config-router)#net 70.0.0.0
RA(config-router)#

RB(config)#router rip


RB(config-router)#ver 2
RB(config-router)#net 141.108.0.0
RB(config-router)#net 80.0.0.0
RB(config-router)#^Z
3. Cấu hình chứng thực dạng plain-text trên router RA và router RB
RA(config)#key ?
chain Key-chain
config-key Set a private configuration key
RA(config)#key chain ?
WORD Key-chain name
RA(config)#key chain vnpro !--- Tên của khoá là vnpro. Tên này có thể chứa nhiều khoá khác nhau để tăng cường bảo mật

RA(config-keychain)#key ?


<0-2147483647> Key identifier
RA(config-keychain)#key 1 !--- Định nghĩa một khoá trong key chain vnpro

RA(config-keychain-key)#key-string ?


<0-7> Encryption type (0 to disable encryption, 7 for proprietary)
LINE The key
RA(config-keychain-key)#key-string 234?
LINE <cr>
RA(config-keychain-key)#key-string 234 !--- Đây là khoá thật sự, cần phải được cấu hình giống nhau ở 2 phía
RA(config-keychain-key)#^Z
RA#
Sau đó apply khoá này lên cổng S0 của router A:
RA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RA(config)#int s0
RA(config-if)#ip rip ?
authentication Authentication control
receive advertisement reception
send advertisement transmission
triggered enable rfc2091 triggered rip
RA(config-if)#ip rip authentication key-chain vnpro
!--- cho phép chứng thực trên cổng sử dụng key-chain là vnpro.
RB(config)#key chain vnpro
RB(config-keychain)#key 1
RB(config-keychain-key)#key-string 234
RB(config-keychain-key)#exit
RB(config-keychain)#exit
RB(config)#int s0
RB(config-if)#ip rip authen
RB(config-if)#ip rip authentication key
RB(config-if)#ip rip authentication key-chain vnpro
RB(config-if)#exit
3. Kiểm tra trạng thái cổng giao tiếp và xem cấu hình hiện tại trên router RA (thực hiện tương tự đối với RB)
RA#sh ip int brief
Interface IP-Address OK? Method Status Protocol
Ethernet0 192.168.0.254 YES NVRAM up up
Loopback0 70.70.70.70 YES manual up up
Serial0 141.108.0.10 YES manual up up
Serial1 unassigned YES NVRAM administratively down down
RA#sh run
hostname RA
!
no ip domain-lookup
!
key chain vnpro
key 1
key-string 234
!
process-max-time 200
!
interface Loopback0
ip address 70.70.70.70 255.255.255.255
no ip directed-broadcast
!
interface Serial0
ip address 141.108.0.10 255.255.255.252
ip rip authentication key-chain vnpro
clockrate 64000
!
router rip
version 2
network 70.0.0.0
network 141.108.0.0
!
end
4. Kiểm tra chứng thực trên router RA (thực hiện tương tự đối với router RB)
RA#debug ip rip
RIP protocol debugging is on
RA#show ip route
70.0.0.0/32 is subnetted, 1 subnets
C 70.70.70.70 is directly connected, Loopback0
R 80.0.0.0/8 [120/1] via 141.108.0.9, 00:00:11, Serial0
141.108.0.0/30 is subnetted, 1 subnets
C 141.108.0.8 is directly connected, Serial0

RA#
00:48:51: RIP: sending v2 update to 224.0.0.9 via Loopback0 (70.70.70.70)


00:48:51: RIP: build update entries
00:48:51: 80.0.0.0/8 via 0.0.0.0, metric 2, ta
00:48:51: 141.108.0.0/16 via 0.0.0.0, metric 1, tag 0
RA#
00:49:07: RIP: received packet with text authentication 234
00:49:07: RIP: received v2 update from 141.108.0.9 on Serial0
00:49:07: 80.0.0.0/8 via 0.0.0.0 in 1 hops
Khi sử dụng chứng thực dạng plain-text sẽ thấy password chứng thực ở đây là 234. Để tăng cường bảo mật cần sử dụng chứng thực dạng MD5.

password được encrypt bởi lệnh service-password encryption là được gọi nôm na là password level 7. Có thể dịch ngược trở lại từ Harsh String. Hiện có nhiều tool trên mạng làm được chuyện này.


Routers không có khả-năng de-crypt MD5 passwords. Even sometimes admins can feed routers by MD5 already encrypted passwords, all routers need to do is reading và checking against the encrypted passwords.
Cũng cần nói rõ thêm: các passwords effected bởi command "service password-encryption" không dược encrypted bằng MD5. Mình quên tên của this Cisco proprietary hash algorithm.

5. Cấu hình chứng thực dạng MD5 trên router RA và router RB


RA#u all
All possible debugging
RA#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RA(config)#int s0
RA(config-if)#ip rip authen
RA(config-if)#ip rip authentication mod
RA(config-if)#ip rip authentication mode ?
md5 Keyed message digest
text Clear text authentication
RA(config-if)#ip rip authentication mode md5
RA(config-if)#^Z
RA#

RB#u all


All possible debugging has been turned off
RB#conf t
RB(config)#int s0
RB(config-if)#ip rip authentication mode md5
RB(config-if)#^Z
RB#
6. Kiểm tra chứng thực trên router RA (thực hiện tương tự đối với router RB)
RA#debug ip rip
RIP protocol debugging is on
RA#sh ip ro
70.0.0.0/32 is subnetted, 1 subnets
C 70.70.70.70 is directly connected, Loopback0
R 80.0.0.0/8 [120/1] via 141.108.0.9, 00:00:06, Serial0
141.108.0.0/30 is subnetted, 1 subnets
C 141.108.0.8 is directly connected, Serial0
RA#
00:51:54: RIP: received packet with MD5 authentication
00:51:54: RIP: received v2 update from 141.108.0.9 on Serial0
00:51:54: 80.0.0.0/8 via 0.0.0.0 in 1 hops
00:51:59: RIP: sending v2 update to 224.0.0.9 via Loopback0 (70.70.70.70)
00:51:59: RIP: build update entries
00:51:59: 80.0.0.0/8 via 0.0.0.0, metric 2, tag 0
00:51:59: 141.108.0.0/16 via 0.0.0.0, metric 1, tag 0
00:51:59: RIP: sending v2 update to 224.0.0.9 via Serial0 (141.108.0.10)
00:51:59: RIP: build update entries
00:51:59: 70.0.0.0/8 via 0.0.0.0, metric 1, tag 0
00:51:59: RIP: ignored v2 packet from 70.70.70.70 (sourced from one of our addresses)
RA#
00:52:22: RIP: received packet with MD5 authentication
00:52:22: RIP: received v2 update from 141.108.0.9 on Serial0
00:52:22: 80.0.0.0/8 via 0.0.0.0 in 1 hops
00:52:26: RIP: sending v2 update to 224.0.0.9 via Loopback0 (70.70.70.70)
00:52:26: RIP: build update entries
00:52:26: 80.0.0.0/8 via 0.0.0.0, metric 2, tag 0
00:52:26: 141.108.0.0/16 via 0.0.0.0, metric 1, tag 0
00:52:26: RIP: sending v2 update to 224.0.0.9 via Serial0 (141.108.0.10)
00:52:26: RIP: build update entries
00:52:26: 70.0.0.0/8 via 0.0.0.0, metric 1, tag 0
00:52:26: RIP: ignored v2 packet from 70.70.70.70 (sourced from one of our addresses)
Ta thấy sau khoảng thời gian 51:54 -52:22 (khoảng 30 giây) router sẽ tiến hành chứng thực lại để cập nhật thông tin định tuyến. Để hiểu rõ cơ chế hoạt động của MD5 xem thêm trong sách “CCNA LabPro”

7. Bước cuối cùng, ta kiểm tra lại cấu hình trên router RA và RB


RA#show run
...
!
hostname RA
no ip domain-lookup
!
key chain vnpro
key 1
key-string 234
!
process-max-time 200
!
interface Loopback0
ip address 70.70.70.70 255.255.255.255
no ip directed-broadcast
!
interface Serial0
ip address 141.108.0.10 255.255.255.252
no ip directed-broadcast
ip rip authentication mode md5
ip rip authentication key-chain vnpro
clockrate 64000
!
router rip
version 2
network 70.0.0.0
network 141.108.0.0
!
end

RB#show run


...
!
hostname RB
no ip domain-lookup
!
key chain vnpro
key 1
key-string 234
!
interface Loopback0
ip address 80.80.80.1 255.255.255.0
!
interface Serial0
ip address 141.108.0.9 255.255.255.252
ip rip authentication mode md5
ip rip authentication key-chain vnpro
!
router rip
version 2
network 80.0.0.0
network 141.108.0.0
!
ip classless
!
end

tải về 12.63 Kb.

Chia sẻ với bạn bè của bạn:




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương