在我的上一篇博文(IPSEC VXN配置实例)中,简单介绍了IPSEC VXN的配置过程,在这种配置方式下,IPSEC VXN需要指名对端的IP地址,但是如果一方采取的是PPPoE的方式上互联网,那么此时他的对端就不能使用该方式配置IPSEC VXN了,因为该端口的IP地址不确定,在这样的情况下该如何配置IPSEC VXN呢,今天带大家了解一下。
一、实验需求及拓扑图

实验拓扑如上所示,要求两个私网之间建立IPSEC VXN,R3和R2之间采取拨号的形式上网,并远程获取IP地址。
二、实验配置思路
与上篇文章相比,在PPPoE客户端上,因为知道对端的IP地址,其配置命令与上篇文章中完全相同,在这里就不叙述了,不知道这一步怎么配置的同学可以参考我的上一篇文章。这里主要讲解一下PPPoE客户端上的配置,并且着重介绍与上一篇文章配置ISPEC不同的方面
1、配置IPSEC proposal
IPSEC proposal配置与上篇文章相同,配置如下:
ipsec proposal IPSEG
transform esp
esp authentication-algorithm md5
esp encryption-algorithm 3des
注意,上述有些代码可能是默认配置,因此执行后不会显示。
2、配置IKE 相关内容
ike proposal 10
encryption-algorithm 3des-cbc
dh group2
authentication-algorithm md5
#
ike peer R3 v1
pre-shared-key cipher admin
ike-proposal 10
#
在本实例中,因为不知道对方IP地址,因此在IKE peer配置中,就不用配置该项。在这种情况下,该端只能等待对方发起IPSEC链接。
3、配置IPSEC policy相关内容
ipsec policy-template IPSEC_TEM 10
ike-peer R3
proposal IPSEC_PRO
#
ipsec policy IPSEC_POL 10 isakmp template IPSEC_TEM
#
与之前的配置不同,在这里IPSEC POLICY要使用模板,将ipsec proposal和Ike的相关配置放在模板中,然后把模板和ipsec policy绑定。
三、实验验证
完成上述配置后,发现可以互相PING通:


其他验证命令与上一实例相似
四、附录——路由器配置合辑
R1:
ipsec proposal IPSEC_PRO
esp encryption-algorithm 3des
#
ike proposal 10
encryption-algorithm 3des-cbc
dh group2
authentication-algorithm md5
#
ike peer R3 v1
pre-shared-key cipher admin
ike-proposal 10
#
ipsec policy-template IPSEC_TEM 10
ike-peer R3
proposal IPSEC_PRO
#
ipsec policy IPSEC_POL 10 isakmp template IPSEC_TEM
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 21.1.1.1 255.255.255.0
ipsec policy IPSEC_POL
#
ospf 1
area 0.0.0.0
network 21.1.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 21.1.1.2
#
R3:
acl number 3000
rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
#
ipsec proposal IPSEC_PRO
esp encryption-algorithm 3des
#
ike proposal 10
encryption-algorithm 3des-cbc
dh group2
authentication-algorithm md5
#
ike peer R1 v1
pre-shared-key simple admin
ike-proposal 10
remote-address 21.1.1.1
#
ipsec policy IPSEC_POL 10 isakmp
security acl 3000
ike-peer R1
proposal IPSEC_PRO
#
interface Dialer1
link-protocol ppp
ppp ipcp default-route
ppp chap user user
ppp chap password cipher admin
mtu 1492
ip address ppp-negotiate
dialer user user
dialer bundle 1
ospf enable 1 area 0.0.0.0
ipsec policy IPSEC_POL
#
interface GigabitEthernet0/0/0
pppoe-client dial-bundle-number 1
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
ospf 1
area 0.0.0.0
原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200/article/details/118531980
1527

被折叠的 条评论
为什么被折叠?



