拓扑图如上
以下是配置:
总公司:
#
ike local-name r4 //指明本地ike名字
#
ipsec proposal 1 //IPSEC提议
#
ike peer r21 v1 //创建IKE对等体
exchange-mode aggressive //IKE交换模式为野蛮模式
pre-shared-key simple 123 //创建预分享的密码
local-id-type name //选择使用主机名作为验证方式
#
ipsec policy-template a 10 //创建IKE协商ipsec 策略模板
ike-peer name //绑定本地IKE对等体
proposal 1 //绑定IPSEC提议
#
ipsec policy 1 10 isakmp template a
#
interface Serial4/0/0
link-protocol ppp
ip address 200.1.236.2 255.255.255.0
ipsec policy 1 //将IKE协商ipsec 策略应用到接口上
#
interface LoopBack0
ip address 192.168.236.1 255.255.255.255 #
#
ospf 1
area 0.0.0.0
network 200.1.236.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 200.1.236.1 //默认路由(也可以使用指定目的地的静态路由)
#
分公司1:
#
ike local-name r2 //指明本地ike名字
#
acl number 3000 //设置安全ACL过滤需要进入VPN的IP地址及其目的地
rule 5 permit ip source 192.168.237.1 0 destination 192.168.236.1 0
#
ipsec proposal 1 //IPSEC提议
#
ike peer r21 v1 //创建IKE对等体
exchange-mode aggressive //IKE交换模式为野蛮模式
pre-shared-key simple 123 //创建预分享的密码
local-id-type name //选择使用主机名作为验证方式
remote-name r4 //IKE对等体对端主机名
remote-address 200.1.236.2 //IKE对等体对端IP地址
#
ipsec policy 1 10 isakmp //IKE协商ipsec 策略
security acl 3000 //绑定ACL
ike-peer r21 //绑定本地IKE对等体
proposal 1 //绑定IPSEC提议
#
interface Serial4/0/0
link-protocol ppp
ip address 200.2.236.1 255.255.255.0
ipsec policy 1 //将IKE协商ipsec 策略应用到接口上
#
interface LoopBack0
ip address 192.168.237.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 200.2.236.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 200.2.236.2 //默认路由(也可以使用指定目的地的静态路由)
#
分公司2:
ike local-name r3
#
acl number 3000
rule 5 permit ip source 192.168.238.1 0 destination 192.168.236.1 0
#
ipsec proposal 1
#
ike peer r31 v1
exchange-mode aggressive
pre-shared-key simple 123
local-id-type name
remote-name r4
remote-address 200.1.236.2
#
ipsec policy 1 10 isakmp
security acl 3000
ike-peer r31
proposal 1
#
interface Serial4/0/0
link-protocol ppp
ip address 200.3.236.2 255.255.255.0
ipsec policy 1
#
interface LoopBack0
ip address 192.168.238.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 200.3.236.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 200.3.236.1
#
配置没有问题,就是想问问为什么总公司没有像分公司那样指明souce和destination的ACL也能到达私网,其中机制是什么样的呢?希望前辈们能指点一二。