báo cáo thực tập athena trần trọng thái

6
1.1 Trin khai Ipsec VPN site to site. 1.1.1 Mô hnh. 1.1.2 M c ti êu: Cấu hnh VPN cho phép 2 LAN ở router ThaiR1 và router ThaiR2 liên lạc được với nhau. 1.1.2.1 Trên Router ThaiR1. - Đt ip cho cc cng interface trên router. ThaiR1(config)#interface s0/0 ThaiR1(config-if)#ip address 1.1.1.1 255.255.255.0 ThaiR1(config-if)#clock rate 64000 ThaiR1(config-if)#no shutdown ThaiR1(config)#interface f0/0 ThaiR1(config-if)#ip address 10.0.0.1 255.0.0.0 ThaiR1(config-if)#no shutdown - cấu hình default route. ThaiR1(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2

Upload: paul-tran

Post on 20-Jan-2015

61 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Báo cáo thực tập athena   trần trọng thái

1.1 Triên khai Ipsec VPN site to site.

1.1.1 Mô hinh.

1.1.2

M c tiêu:u Cấu hình VPN cho phép 2 LAN ở router ThaiR1 và router

ThaiR2 liên lạc được với nhau.

1.1.2.1 Trên Router ThaiR1.

- Đăt ip cho cac công interface trên router.

ThaiR1(config)#interface s0/0

ThaiR1(config-if)#ip address 1.1.1.1 255.255.255.0

ThaiR1(config-if)#clock rate 64000

ThaiR1(config-if)#no shutdown

ThaiR1(config)#interface f0/0

ThaiR1(config-if)#ip address 10.0.0.1 255.0.0.0

ThaiR1(config-if)#no shutdown

- cấu hình default route.

ThaiR1(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2

- Tạo Internet Key Exchange (IKE) key policy.

Page 2: Báo cáo thực tập athena   trần trọng thái

ThaiR1(config)#crypto isakmp policy 9

ThaiR1(config-isakmp)#hash md5

ThaiR1(config-isakmp)#authentication pre-share

- Tạo shared key để sử dụng cho kết nối VPN.

ThaiR1(config)#crypto isakmp key cisco address 2.2.2.2

- Quy định lifetime.

ThaiR1(config)#crypto ipsec security-association lifetime

seconds 86400

- Cấu hình ACL dãy IP có thể VPN.

access-list 100 permit ip 10.0.0.0 0.255.255.255 192.168.1.0

0.0.0.255

- Define the transformations set that will be used for this VPN

--connection.

crypto ipsec transform-set athena esp-3des esp-md5-hmac

- Tạo cypto-map cho cac transform, setname.

ThaiR1(config)#crypto map mapathena 10 ipsec-isakmp

ThaiR1(config-crypto-map)#set peer 2.2.2.2

ThaiR1(config-crypto-map)#set transform-set athena

ThaiR1(config-crypto-map)#match address 100

- Gan vào interface.

ThaiR1(config)#interface s0/0

ThaiR1(config-if)#crypto map mapathena

- show crypto ipsec transform-set  để hiển thị cấu hình cac

IPsec policy trong transform set.

Transform set athena: { esp-3des esp-md5-hmac }

will negotiate = { Tunnel, },

Page 3: Báo cáo thực tập athena   trần trọng thái

- show crypto map  để hiển thị cac crypto map sẽ ap dụng trong

router.

ThaiR1#show crypto map

Crypto Map "mapathena" 10 ipsec-isakmp

Peer = 2.2.2.2

Extended IP access list 100

access-list 100 permit ip 10.0.0.0 0.255.255.255

192.168.1.0 0.0.0.255

Current peer: 2.2.2.2

Security association lifetime: 4608000 kilobytes/86400

seconds

PFS (Y/N): N

Transform sets={

athena,

}

Interfaces using crypto map mapathena:

Serial0/0

- show crypto isakmp sa để hiện thị các SA IKE.

ThaiR1#show crypto isakmp sa

dst src state conn-id slot status

2.2.2.2 1.1.1.1 QM_IDLE 1 0 ACTIVE

- Sử dụng lệnh  show crypto ipsec sa  để hiển thị bảng thông tin

về cac gói tin SA giữa ThaiR1 và ThaiR3.

ThaiR1#show crypto ipsec sa

interface: Serial0/0

Crypto map tag: mapathena, local addr 1.1.1.1

protected vrf: (none)

local ident (addr/mask/prot/port): (10.0.0.0/255.0.0.0/0/0)

remote ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)

current_peer 2.2.2.2 port 500

PERMIT, flags={origin_is_acl,}

Page 4: Báo cáo thực tập athena   trần trọng thái

#pkts encaps: 9, #pkts encrypt: 9, #pkts digest: 9

#pkts decaps: 8, #pkts decrypt: 8, #pkts verify: 8

#pkts compressed: 0, #pkts decompressed: 0

#pkts not compressed: 0, #pkts compr. failed: 0

#pkts not decompressed: 0, #pkts decompress failed: 0

#send errors 1, #recv errors 0

local crypto endpt.: 1.1.1.1, remote crypto endpt.: 2.2.2.2

path mtu 1500, ip mtu 1500

current outbound spi: 0xBF7A80FE(3212476670)

inbound esp sas:

spi: 0xC390A31D(3281036061)

transform: esp-3des esp-md5-hmac ,

in use settings ={Tunnel, }

conn id: 2001, flow_id: SW:1, crypto map: mapathena

sa timing: remaining key lifetime (k/sec): (4508469/86139)

IV size: 8 bytes

replay detection support: Y

Status: ACTIVE

inbound ah sas:

inbound pcp sas:

outbound esp sas:

spi: 0xBF7A80FE(3212476670)

transform: esp-3des esp-md5-hmac ,

in use settings ={Tunnel, }

conn id: 2002, flow_id: SW:2, crypto map: mapathena

sa timing: remaining key lifetime (k/sec): (4508469/86135)

IV size: 8 bytes

replay detection support: Y

Status: ACTIVE

Page 5: Báo cáo thực tập athena   trần trọng thái

outbound ah sas:

outbound pcp sas:

- Đưng tư PC1 ping thành công đến PC2.

1.1.2.2 Trên Router ThaiR2.

- Đăt ip cho cac công interface trên router.

ThaiR2(config)#interface s0/0

ThaiR2(config-if)#ip address 1.1.1.2 255.255.255.0

ThaiR2(config-if)#clock rate 64000

ThaiR2(config-if)#no shutdown

ThaiR2(config)#interface s0/1

ThaiR2(config-if)#ip address 2.2.2.1 255.255.255.0

ThaiR2(config-if)#clock rate 64000

ThaiR2(config-if)#no shutdown

1.1.2.3 Trên Router ThaiR3.

- Đăt ip cho cac công interface trên router.

ThaiR3(config)#interface s0/0

ThaiR3(config-if)#ip address 2.2.2.2 255.255.255.0

ThaiR3(config-if)#clock rate 64000

ThaiR3(config-if)#no shutdown

ThaiR3(config)#interface f0/0

ThaiR3(config-if)#ip address 192.168.1.1 255.255.255.0

ThaiR3(config-if)#no shutdown

- cấu hình default route.

ThaiR3(config)#ip route 0.0.0.0 0.0.0.0 2.2.2.1

Page 6: Báo cáo thực tập athena   trần trọng thái

- Tạo Internet Key Exchange (IKE) key policy.

ThaiR3(config)#crypto isakmp policy 9

ThaiR3(config-isakmp)#hash md5

ThaiR3(config-isakmp)#authentication pre-share

- Tạo shared key để sử dụng cho kết nối VPN.

ThaiR3(config)#crypto isakmp key cisco address 1.1.1.1

- Quy định lifetime.

ThaiR3(config)#crypto ipsec security-association lifetime

seconds 86400

- Cấu hình ACL dãy IP có thể VPN.

access-list 100 permit ip 192.168.1.0 0.0.0.255 10.0.0.0

0.255.255.255

- Define the transformations set that will be used for this VPN

--connection.

ThaiR3(config)#crypto ipsec transform-set athena esp-3des

esp-md5-hmac

- Tạo cypto-map cho cac transform, setname.

ThaiR3(config)#crypto map mapathena 10 ipsec-isakmp

ThaiR3(config-crypto-map)#set peer 1.1.1.1

ThaiR3(config-crypto-map)#set transform-set athena

ThaiR3(config-crypto-map)#match address 100

- Gan vào interface.

ThaiR3(config)#interface s0/0

ThaiR3(config-if)#crypto map mapathena

1.1.3 K t lu n:ê â ping từ LAN 10.0.0.0/8 sang LAN 192.168.1.0/24 đã

thành công.