Router:sam-i-am(VPN Server)
Current configuration:
!
version 12.2
service timestamps debug uptime
service timestamps log up time
no service password-encryption
!
hostname sam-i-am
!
ip subnet-zero
!--- IKE配置
sam-i-am(config)#crypto isakmp policy 1 //定义策略为1
sam-i-am(isakmp)#hash md5 //定义MD5散列算法
sam-i-am(isakmp)#authentication pre-share //定义为预共享密钥认证方式
sam-i-am(config)#crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
!--- 配置预共享密钥为cisco123,对等端为所有IP
!--- IPSec协议配置
sam-i-am(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac
!--- 创建变换集 esp-des esp-md5-hmac
sam-i-am(config)#crypto dynamic-map rtpmap 10 //创建动态保密图rtpmap 10
san-i-am(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset
san-i-am(crypto-map)#match address 115 //援引访问列表确定受保护的流量
sam-i-am(config)#crypto map rtptrans 10 ipsec-isakmp dynamic rtpmap
!--- 将动态保密图集加入到正规的图集中
!
interface Ethernet0
ip address 10.2.2.3 255.255.255.0
no ip directed-broadcast
ip nat inside
no mop enabled
!
interface Serial0
ip address 99.99.99.1 255.255.255.0
no ip directed-broadcast
ip nat outside
crypto map rtptrans //将保密映射应用到S0接口上
!
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.2.2.0到10.1.1.0的访问不进行地址翻译
!--- 到其他网络的访问都翻译成SO接口的IP地址
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议
no ip http server
!
access-list 115 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 115 deny ip 10.2.2.0 0.0.0.255 any
!
access-list 120 deny ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 120 permit ip 10.2.2.0 0.0.0.255 any
!
sam-i-am(config)#route-map nonat permit 10 //使用路由策略
sam-i-am(router-map)#match ip address 120
!
line con 0
transport input none
line aux 0
line vty 0 4
password ww
login
!
end
Router:dr_whoovie(VPN Client)
Current configuration:
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname dr_whoovie
!
ip subnet-zero
!
dr_whoovie(config)#crypto isakmp policy 1 //定义策略为1
dr_whoovie(isakmp)#hash md5 //定义MD5散列算法
dr_whoovie(isakmp)#authentication pre-share //定义为预共享密钥认证方式
dr_whoovie(config)#crypto isakmp key cisco123 address 99.99.99.1
!--- 配置预共享密钥为cisco123,对等端为服务器端IP99.99.99.1
!--- IPSec协议配置
dr_whoovie(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac
!--- 创建变换集 esp-des esp-md5-hmac
dr_whoovie(config)#crypto map rtp 1 ipsec-isakmp
!--- 使用IKE创建保密图rtp 1
dr_whoovie(crypto-map)#set peer 99.99.99.1 //确定远程对等端
dr_whoovie(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset
dr_whoovie(crypto-map)#match address 115 //援引访问列表确定受保护的流量
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
no ip directed-broadcast
ip nat inside
no mop enabled
!
interface Serial0
ip address negotiated //IP地址自动获取
no ip directed-broadcast
ip nat outside
encapsulation ppp //S0接口封装ppp协议
no ip mroute-cache
no ip route-cache
crypto map rtp //将保密映射应用到S0接口上
!
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.1.1.0到10.2.2.0的访问不进行地址翻译
!--- 到其他网络的访问都翻译成SO接口的IP地址
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议
no ip http server
!
access-list 115 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
access-list 115 deny ip 10.1.1.0 0.0.0.255 any
access-list 120 deny ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
access-list 120 permit ip 10.1.1.0 0.0.0.255 any
!
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
route-map nonat permit 10 //使用路由策略
match ip address 120
!
line con 0
transport input none
line aux 0
line vty 0 4
password ww
login
!
end
screen.width-255) {this.width=screen.width-255;this.alt='本图片已被缩小,点击查看原大小图片。';}" border=0>
Current configuration:
!
version 12.2
service timestamps debug uptime
service timestamps log up time
no service password-encryption
!
hostname sam-i-am
!
ip subnet-zero
!--- IKE配置
sam-i-am(config)#crypto isakmp policy 1 //定义策略为1
sam-i-am(isakmp)#hash md5 //定义MD5散列算法
sam-i-am(isakmp)#authentication pre-share //定义为预共享密钥认证方式
sam-i-am(config)#crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
!--- 配置预共享密钥为cisco123,对等端为所有IP
!--- IPSec协议配置
sam-i-am(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac
!--- 创建变换集 esp-des esp-md5-hmac
sam-i-am(config)#crypto dynamic-map rtpmap 10 //创建动态保密图rtpmap 10
san-i-am(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset
san-i-am(crypto-map)#match address 115 //援引访问列表确定受保护的流量
sam-i-am(config)#crypto map rtptrans 10 ipsec-isakmp dynamic rtpmap
!--- 将动态保密图集加入到正规的图集中
!
interface Ethernet0
ip address 10.2.2.3 255.255.255.0
no ip directed-broadcast
ip nat inside
no mop enabled
!
interface Serial0
ip address 99.99.99.1 255.255.255.0
no ip directed-broadcast
ip nat outside
crypto map rtptrans //将保密映射应用到S0接口上
!
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.2.2.0到10.1.1.0的访问不进行地址翻译
!--- 到其他网络的访问都翻译成SO接口的IP地址
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议
no ip http server
!
access-list 115 permit ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 115 deny ip 10.2.2.0 0.0.0.255 any
!
access-list 120 deny ip 10.2.2.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 120 permit ip 10.2.2.0 0.0.0.255 any
!
sam-i-am(config)#route-map nonat permit 10 //使用路由策略
sam-i-am(router-map)#match ip address 120
!
line con 0
transport input none
line aux 0
line vty 0 4
password ww
login
!
end
Router:dr_whoovie(VPN Client)
Current configuration:
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname dr_whoovie
!
ip subnet-zero
!
dr_whoovie(config)#crypto isakmp policy 1 //定义策略为1
dr_whoovie(isakmp)#hash md5 //定义MD5散列算法
dr_whoovie(isakmp)#authentication pre-share //定义为预共享密钥认证方式
dr_whoovie(config)#crypto isakmp key cisco123 address 99.99.99.1
!--- 配置预共享密钥为cisco123,对等端为服务器端IP99.99.99.1
!--- IPSec协议配置
dr_whoovie(config)#crypto ipsec transform-set rtpset esp-des esp-md5-hmac
!--- 创建变换集 esp-des esp-md5-hmac
dr_whoovie(config)#crypto map rtp 1 ipsec-isakmp
!--- 使用IKE创建保密图rtp 1
dr_whoovie(crypto-map)#set peer 99.99.99.1 //确定远程对等端
dr_whoovie(crypto-map)#set transform-set rtpset //使用上面的定义的变换集rtpset
dr_whoovie(crypto-map)#match address 115 //援引访问列表确定受保护的流量
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
no ip directed-broadcast
ip nat inside
no mop enabled
!
interface Serial0
ip address negotiated //IP地址自动获取
no ip directed-broadcast
ip nat outside
encapsulation ppp //S0接口封装ppp协议
no ip mroute-cache
no ip route-cache
crypto map rtp //将保密映射应用到S0接口上
!
ip nat inside source route-map nonat interface Serial0 overload
!--- 这个NAT配置启用了路由策略,内容为10.1.1.0到10.2.2.0的访问不进行地址翻译
!--- 到其他网络的访问都翻译成SO接口的IP地址
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0 //配置静态路由协议
no ip http server
!
access-list 115 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
access-list 115 deny ip 10.1.1.0 0.0.0.255 any
access-list 120 deny ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
access-list 120 permit ip 10.1.1.0 0.0.0.255 any
!
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
route-map nonat permit 10 //使用路由策略
match ip address 120
!
line con 0
transport input none
line aux 0
line vty 0 4
password ww
login
!
end
screen.width-255) {this.width=screen.width-255;this.alt='本图片已被缩小,点击查看原大小图片。';}" border=0>
【相 关 文 章】
相关专题
- (1225篇文章)VPN技术
- (1225篇文章)SSL VPN详细知识介绍专题
- (266篇文章)VPN解决方案
- (147篇文章)VPN解决方案
- (279篇文章)vpn解决方案
论坛精华
阅读排行榜
- (6123次浏览)cisco 命令手册--精选文章
- (4677次浏览)网络命令一览表(新版)
- (2738次浏览)共享上网:如何实现ADSL宽带多机共享?
- (2696次浏览)Cisco系列网络设备测试命令大全
- (2667次浏览)网络基础:子网掩码的设置和作用
- (2583次浏览)CISCO交换机命令全集加说明
- (2542次浏览)VPN实例配置方案-中文注解
- (1761次浏览)Cisco VPN解决方案
- (1646次浏览)思科企业网络解决方案(图)
- (1615次浏览)IP地址和子网掩码的基础知识
最新技术文档
- 07-09看异地分支机构如何实现多链路负载均衡
- 07-08PBR(策略路由)的几种使用方式
- 06-18重新认识:TRUNK
- 05-24IP电话方案选择及设计原则
- 04-28业务中断有事故隐患!看广西电网保证业务连续性
- 03-23高速网络接入 如何判断你的宽带性价比
- 03-18思科宣布加利福尼亚计划 进军数据中心市场
- 02-02博科、思科推出新产品 加剧数据中心网络竞争
- 02-01小型网吧组网设计(实践)
- 01-08分析:IP包头TTL字段在网络分析中的应用
热门关键字导读
