系统城装机大师 - 固镇县祥瑞电脑科技销售部宣传站!

当前位置:首页 > 网络知识 > 网络其他 > 详细页面

eNSP模拟器—IPsec配置实验1

时间:2020-02-13来源:系统城作者:电脑系统城

1 拓扑图

eNSP模拟器—IPsec配置实验1

2 两个PC配置

eNSP模拟器—IPsec配置实验1

3 RouterA配置

#
 sysname RouterA
#
acl number 3101
 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255
#
ipsec proposal tran1
 esp authentication-algorithm sha2-256
 esp encryption-algorithm aes-128 
#
ipsec policy map1 10 manual
 security acl 3101
 proposal tran1
 tunnel local 1.1.1.1
 tunnel remote 2.1.1.1
 sa spi inbound esp 54321
 sa string-key inbound esp cipher %^%#JvZxR2g8c;a9~FPN~n'$7`DEV&=G(=Et02P/%\*!%^%#
 sa spi outbound esp 12345
 sa string-key outbound esp cipher %^%#K{JG:rWVHPMnf;5\|,GW(Luq'qi8BT4nOj%5W5=)%^%#
#
interface GigabitEthernet0/0/0
 ip address 1.1.1.1 255.255.255.0
 ipsec policy map1
#
interface GigabitEthernet0/0/1
 ip address 10.1.1.1 255.255.255.0
#
ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
ip route-static 10.1.2.0 255.255.255.0 1.1.1.2
#
return

4 RouterB配置

#
 sysname RouterB
#
acl number 3101
 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255
#
ipsec proposal tran1
 esp authentication-algorithm sha2-256
 esp encryption-algorithm aes-128 
#
ipsec policy use1 10 manual
 security acl 3101
 proposal tran1
 tunnel local 2.1.1.1
 tunnel remote 1.1.1.1
 sa spi inbound esp 12345
 sa string-key inbound esp cipher %^%#IRFGEiFPJ1$&a'Qy,L*XQL_+*Grq-=yMb}ULZdS6%^%#
 sa spi outbound esp 54321
 sa string-key outbound esp cipher %^%#(3fr1!&6O=)!GN#~{)n,2fq>4#4+%;lMTs5(]:c)%^%#
#
interface GigabitEthernet0/0/0
 ip address 2.1.1.1 255.255.255.0
 ipsec policy use1
#
interface GigabitEthernet0/0/1
 ip address 10.1.2.1 255.255.255.0
#
ip route-static 1.1.1.0 255.255.255.0 2.1.1.2
ip route-static 10.1.1.0 255.255.255.0 2.1.1.2
#
return

5 Internet配置

#
sysname Internet
#
interface  GigabitEthernet  0/0/1
 ip address  2.1.1.2 255.255.255.0
#
interface  GigabitEthernet  0/0/0
 ip address  1.1.1.2 255.255.255.0
#
ip route-static 10.1.2.0 255.255.255.0 2.1.1.1
ip route-static 10.1.1.0 255.255.255.0 1.1.1.1
#
return

注:本例子参照了华为的配置示例,不算全部原创,只是记录下给需要的人参考。

分享到:

相关信息

  • 电脑默认网关是什么详细介绍

    我们在使用电脑的时候,经常遇见很多默认网关的问题,但是对于大多数的新手用户来说,可能都不清楚电脑默认网关是什么,为此我们带来了详细的介绍详细可以帮助你。...

    2022-11-07

  • 0x80131500 无法加载页面

    当我们打开Windows应用商店的时候会发现系统偶尔会出现网络连接错误的提示,比如出现以下代码0x80131500 无法加载页面,那么遇到这种问题该怎么解决呢,现在就给大家带来一篇教程。...

    2022-10-10

系统教程栏目

栏目热门教程

人气教程排行

站长推荐

热门系统下载