天天看點

華為IPsec Vpn手動模式典型配置案例,親測eNsp

作者:IT網絡彬彬

全文手動碼字,歡迎點贊、評論、讨論、學習。

一、實驗目的:

1、實作長沙、衡陽兩地公司内網互訪,衡陽公司的client計算機能正常通路長沙的Server1的FTP服務。

2、兩地公司計算機正常通過NAT通路網際網路。

3、網際網路采用OSPF協定模拟(本文不再講述)

二、實驗結果:

1、PC1、PC2、server1、client之間能互相PING通。

華為IPsec Vpn手動模式典型配置案例,親測eNsp

2、Client能通路server1的FTP服務。

華為IPsec Vpn手動模式典型配置案例,親測eNsp

3、R4的G0/0/1網絡出口抓包,資料協定為ESP加密。

華為IPsec Vpn手動模式典型配置案例,親測eNsp

4、pc能正常通路外網。

華為IPsec Vpn手動模式典型配置案例,親測eNsp

三、實驗拓撲:

華為IPsec Vpn手動模式典型配置案例,親測eNsp

案例拓撲

四:配置資訊:

R4配置資訊:

<R4>di cu

#

acl number 2000 (定義ACL上網使用者t的感興趣流量)

rule 1 permit source 10.1.1.0 0.0.0.255

#

acl number 3000 (重要配置:定義VPN的感興趣流量)

rule 1 permit ip source 1.1.1.1 0 destination 172.16.1.0 0.0.0.255

rule 2 permit ip source 10.1.1.0 0.0.0.255 destination 2.2.2.1 0

#

ipsec proposal toHY (IPsec 提議一配置)

esp authentication-algorithm sha2-256 (配置認證算法,兩端保持一緻)

esp encryption-algorithm aes-256 (配置加密算法、兩端保持一緻)

#

ipsec policy p1 1 manual (配置政策P1,手動配置)

security acl 3000 (比對acl)

proposal toHY (比對提議一)

tunnel local 1.1.1.1 (定義隧道本端位址)

tunnel remote 2.2.2.1 (定義隧道對端位址)

sa spi inbound esp 123456 (配置spi 進方向,對應對端出方向)

sa string-key inbound esp cipher binbin (配置入方向sa認證密鑰,密文)

sa spi outbound esp 654321 (配置spi出方向,對應對端入方向)

sa string-key outbound esp cipher binbin (配置出方向sa認證密鑰,密文)

#

interface GigabitEthernet0/0/0

ip address 10.1.1.254 255.255.255.0

#

interface GigabitEthernet0/0/1

ip address 1.1.1.1 255.255.255.0

ipsec policy p1 (引用政策P1)

nat outbound 2000 (nat配置)

#

ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 (預設出口路由)

return

<R4>

------我---是---分---割---線----------

R5配置資訊:

<R5>di cu

#

acl number 2000 (定義ACL上網使用者t的感興趣流量)

rule 1 permit source 172.16.1.0 0.0.0.255

#

acl number 3000 (重要配置:定義VPN的感興趣流量)

rule 1 permit ip source 2.2.2.1 0 destination 10.1.1.0 0.0.0.255

rule 2 permit ip source 172.16.1.0 0.0.0.255 destination 1.1.1.1 0

#

ipsec proposal toCS (IPsec 提議一配置)

esp authentication-algorithm sha2-256 (配置認證算法,兩端保持一緻)

esp encryption-algorithm aes-256 (配置加密算法、兩端保持一緻)

#

ipsec policy p2 1 manual (配置政策P2,手動配置)

security acl 3000 (比對acl)

proposal toCS (比對提議一)

tunnel local 2.2.2.1 (定義隧道本端位址)

tunnel remote 1.1.1.1 (定義隧道對端位址)

sa spi inbound esp 654321 (配置spi 進方向,對應對端出方向)

sa string-key inbound esp cipher binbin(配置入方向sa認證密鑰,密文)

sa spi outbound esp 123456 (配置spi出方向,對應對端入方向)

sa string-key outbound esp cipher binbin(配置出方向sa認證密鑰,密文)

#

interface GigabitEthernet0/0/0

ip address 2.2.2.1 255.255.255.0

ipsec policy p2 (引用政策P2)

nat outbound 2000 (nat配置)

#

interface GigabitEthernet0/0/1

ip address 172.16.1.254 255.255.255.0

#

ip route-static 0.0.0.0 0.0.0.0 2.2.2.2 (預設出口路由)

return

<R5>

-----------完結-------------

繼續閱讀