5-V P N:动态Map VS 静态Map

一、实验拓扑:
5-V P N:动态Map VS 静态Map
二、实验要求:
两边都是动态的话,不可能通,因为没有人发起会话。
鸡肋技术
show ip nat translations //转换列表,ASA叫做转换槽位
三、命令部署:
步骤一:
1、基本配置部署:IP地址等:
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0

R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config)#int f1/0
R2(config-if)#no shutdown
R2(config-if)#ip add 23.1.1.2 255.255.255.0

R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip add dhcp
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
2、R2部署DHCP Pool
R2(config)#ip dhcp pool abc
R2(dhcp-config)#network 23.1.1.0 255.255.255.0
R2(dhcp-config)#default-router 23.1.1.2
R2(config)#ip dhcp excluded-address 23.1.1.1 23.1.1.2 //除去1.1、1.2的地址
查看验证:
R3#
ASSIGN: Interface FastEthernet0/0 assigned DHCP address 23.1.1.1, mask 255.255.255.0, hostname R3

重新获取地址,让R3获取到1.3的地址:
R3(config)#int f0/0
R3(config-if)#shutdown
R3(config-if)#no shutdown
R3(config-if)#
ASSIGN: Interface FastEthernet0/0 assigned DHCP address 23.1.1.3, mask 255.255.255.0, hostname R3
查看R3网关:因为是DHCP,所以R3生成一条默认路由指向R2
R3#show ip route
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [254/0] via 23.1.1.2 //AD值为254,华为这里就叫做优先级是:245
3、R1为解决路由问题,部署默认路由:
R1(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.2
测试:
R1#ping 23.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:..!!!
步骤二:Branch站点配置
1、R3配置×××
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#authentication pre-share
R3(config)#crypto isakmp key 0 cisco address 12.1.1.1
配置转换集:
R3(config)#crypto ipsec transform-set cisco esp-aes esp-md5-hmac
配置感兴趣流:
R3(config)#ip access-list extended ***
R3(config-ext-nacl)#permit ip host 3.3.3.3 host 1.1.1.1
配置Map:
R3(config)#crypto map aa 10 ipsec-isakmp
R3(config-crypto-map)#set peer 12.1.1.1
R3(config-crypto-map)#set transform-set cisco
R3(config-crypto-map)#match address ***
接口下调用Map:
R3(config)#int f0/0
R3(config-if)#crypto map aa
步骤三:Center站点配置
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#authentication pre-share
R1(config)#crypto isakmp key 0 cisco address 0.0.0.0 0.0.0.0 // 由于远端地址为动态,所以只能使用八个零的配置方式
配置转换集:
R1(config)#crypto ipsec transform-set cisco esp-aes esp-md5-hmac
配置Map:
R1(config)#crypto dynamic-map aa 10
R1(config-crypto-map)#set transform-set cisco//由于不清楚对端地址,也不清楚感兴趣流,所以只配置转换集;具体peer和感兴趣流协商决定
R1(config)#crypto map cisco 10 ipsec-isakmp dynamic aa //静态Map调用动态Map
接口下调用静态Map:
R1(config)#int f0/0
R1(config-if)#crypto map cisco
测试:
R3#ping 1.1.1.1 source loopback 0 //R1先去PingR3肯定是不行的
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3 .!!!!
R3#show crypto engine connections active //查看数据包加密、解密数量

R1#show crypto ipsec sa //这个也肯定是有的,此处不黏贴了
R1#show crypto isakmp sa //如果Branch站点不主动发起的话,这个sa是不可能建立成功的
dst src state conn-id slot status
12.1.1.1 23.1.1.3 QM_IDLE 1 0 ACTIVE
R1#show crypto engine connections active //查看加密、解密个数,和R3一样同样是4个

猜你喜欢

转载自blog.51cto.com/13856092/2138537
今日推荐