HCIP-虚拟专用网络

vpn:virtual private network 虚拟专用网络
专线:DDN PTN SDH MSTP 成本高,通信质量好
 
VPN:IPsec 、SSL MPLS-vpn、L2TP 、PPTP 、GRE 、
DSVPN(DMVPN)等等只需要有固定公网ip地址即可,价格便宜,通信质量稍差
 
用途:
① 总部和分支之间对联 site-to-site
② 远程出差人员,通过vpn拨号的方式访问企业内网
 
目前常用vpn:IPsec vpn SSLvpn mplsvpn
http://www.9orange.com/list-128.html
GRE:generic routing encapsulation 通用路由封装
GRE vpn 配置:公网地址可达

HCIP-虚拟专用网络

文章插图
 
① 缺省路由配置:使得两边的公网地址互相通信
R1:
ip route-s 0.0.0.0 0 12.1.1.2
R3:
ip route-s 0.0.0.0 0 23.1.1.2

R1:
interface Tunnel0/0/0
tunnel-protocol gre
source 12.1.1.1
destination 23.1.1.3
ip add 192.168.13.1 24
 
R3:
interface Tunnel0/0/0
tunnel-protocol gre
source 23.1.1.3
destination 12.1.1.1
ip add 192.168.13.3 24
 

R1:ip route-s 192.168.1.0 24 tunnel0/0/0
R3 : ip route-s 192.168.5.0 24 tunnel0/0/0
HCIP-虚拟专用网络

文章插图
 
两层ip包头,外层是公网包头 内层是私网包头
缺点:数据包明文传输,不安全
可选配置:
密码:
HCIP-虚拟专用网络

文章插图
 
有1代表有密码设置
https://tool.oschina.net/hexconvert/在线进制转换
上面数据所得GRE Key:0*0001e240 我们只看1e240(由16进制换成10进制)
可得密码123456
HCIP-虚拟专用网络

文章插图
 
int tunn 0/0/0
keepalive 开启心跳机制 (可选配置 ,5s 3倍)
gre key 123654 配置校验密码(可选配置)
 
可以通过关闭中间的R2 然后shutdown tunn0/0/0
口校验,需让隧道从新建立才可以看到效果!!

【HCIP-虚拟专用网络】


    推荐阅读