GRE和 GRE over IPsec VPN(gre和雅思哪个难度大)

网友投稿 276 2022-10-03


GRE和 GRE over IPsec VPN(gre和雅思哪个难度大)

GRE

GRE概述

GRE(Generic Routing Encapsulation,通用路由封装),是简单的VPN。GRE是第三层隧道协议,采用Tunnel(隧道)技术。

优点:支持IP网络作为承载网络、支持多种协议、支持IP组播,配置简单,容易部署缺点:缺少保护功能,不能执行如认证、加密以及数据完整性检查这些任务因为安全上的限制,GRE通常不能用作一个完整的VPN解决方案然而它可以和其他解决方案结合在一起,例如IPsec,来产生一个极强大的、具有扩展性的VPN实施方案

GRE工作原理

隧道起点路由查找-->封装-->承载协议路由转发-->公网转发-->解封装-->隧道终点路由查找

配置命令

R1interface Tunnel0/0/0 # 创建Tunnel隧道 ip address 192.168.3.1 255.255.255.0 # 隧道IP tunnel-protocol gre # 配置隧道协议 source 100.1.1.1 # 隧道源地址 destination 100.1.1.2 # 隧道目的地址ip route-staic 192.168.2.0 24 Tunnel 0/0/0 # 配置静态路由让数据报文从tunnel走

R2interface Tunnel0/0/0 # 创建Tunnel隧道 ip address 192.168.3.2 255.255.255.0 # 隧道IP tunnel-protocol gre # 配置隧道协议 source 100.1.1.2 # 隧道源地址 destination 100.1.1.1 # 隧道目的地址ip route-staic 192.168.1.0 24 Tunnel 0/0/0 # 配置静态路由让数据报文从tunnel走

GRE over IPsec VPN

GRE实现了隧道的功能,但是GRE不支持认证、不支持加密、无法确保数据的安全性。IPsec能够对数据进行加密传输。所以IPsec VPN既满足了隧道的功能同时也能对隧道中传输的数据进行加密。但是IPsec VPN目前只支持IPv4 Unicast(IPv4 单播),不支持其他任何协议。二者结合,既能支持组播(路由协议等),又能保证数据的安全

GRE将组播报文加上一层新IP头部,封装成单播提供给IPsec封装,就能安全的传递组播报文

配置逻辑

确保公网、内网通配置GRE(隧道口互通通过OSPF实现)

interface Tunnel0/0/0 ip address 192.168.79.7 255.255.255.0 tunnel-protocol gre source 78.1.1.7 destination 89.1.1.9

配置IPsec

1. 匹配感兴趣流acl number 3000 rule 5 permit ip source 78.1.1.7 0 destination 89.1.1.9 0 # 因为已经被封装上了新的IP头 2. 第一阶段IKE SA/第二阶段IPsec SAike proposal 10 encryption-algorithm 3des-cbc authentication-algorithm md5 ike peer R9 v1 pre-shared-key cipher %$%$}H"z!S,^u*;l(AQmOU4+,.2n%$%$ remote-address 89.1.1.9 ipsec proposal tran1 encapsulation-mode transport esp encryption-algorithm 3des 3. 配置安全策略(关联感兴趣流+第一阶段+第二阶段)ipsec policy vpn 10 isakmp security acl 3000 ike-peer R9 proposal tran1

应用安全策略

interface GigabitEthernet0/0/1 ip address 78.1.1.7 255.255.255.0 ipsec policy vpn

完整配置

R7

dis cu[V200R003C00]# sysname R7# snmp-agent local-engineid 800007DB03000000000000 snmp-agent # clock timezone China-Standard-Time minus 08:00:00#portal local-server load portalpage.zip# drop illegal-mac alarm# set cpu-usage threshold 80 restore 75#acl number 3000 rule 5 permit ip source 78.1.1.7 0 destination 89.1.1.9 0 #ipsec proposal tran1 encapsulation-mode transport esp encryption-algorithm 3des#ike proposal 10 encryption-algorithm 3des-cbc authentication-algorithm md5#ike peer R9 v1 pre-shared-key cipher %$%$}H"z!S,^u*;l(AQmOU4+,.2n%$%$ remote-address 89.1.1.9#ipsec policy vpn 10 isakmp security acl 3000 ike-peer R9 proposal tran1#aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$ local-user admin service-type zone Local priority 15#interface GigabitEthernet0/0/0 ip address 37.1.1.7 255.255.255.0 #interface GigabitEthernet0/0/1 ip address 78.1.1.7 255.255.255.0 ipsec policy vpn#interface GigabitEthernet0/0/2#interface NULL0#interface Tunnel0/0/0 ip address 192.168.79.7 255.255.255.0 tunnel-protocol gre source 78.1.1.7 destination 89.1.1.9#ospf 1 router-id 7.7.7.7 default-route-advertise always area 0.0.0.0 network 37.1.1.7 0.0.0.0 network 192.168.79.7 0.0.0.0 #ospf 2 area 0.0.0.0 network 78.1.1.7 0.0.0.0 #user-interface con 0 authentication-mode passworduser-interface vty 0 4user-interface vty 16 20#wlan ac#return

R9

dis cu[V200R003C00]# sysname R9# snmp-agent local-engineid 800007DB03000000000000 snmp-agent # clock timezone China-Standard-Time minus 08:00:00#portal local-server load portalpage.zip# drop illegal-mac alarm# set cpu-usage threshold 80 restore 75#acl number 3000 rule 5 permit ip source 89.1.1.9 0 destination 78.1.1.7 0 #ipsec proposal tran1 encapsulation-mode transport esp encryption-algorithm 3des#ike proposal 10 encryption-algorithm 3des-cbc authentication-algorithm md5#ike peer R7 v1 pre-shared-key cipher %$%$}H"z!S,^u*;l(AQmOU4+,.2n%$%$ remote-address 78.1.1.7#ipsec policy vpn 10 isakmp security acl 3000 ike-peer R7 proposal tran1#aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$ local-user admin service-type zone Local priority 15#interface GigabitEthernet0/0/0 ip address 89.1.1.9 255.255.255.0 ipsec policy vpn#interface GigabitEthernet0/0/1 ip address 49.1.1.9 255.255.255.0 #interface GigabitEthernet0/0/2#interface NULL0#interface Tunnel0/0/0 ip address 192.168.79.9 255.255.255.0 tunnel-protocol gre source 89.1.1.9 destination 78.1.1.7#ospf 1 router-id 9.9.9.9 default-route-advertise always area 0.0.0.0 network 49.1.1.9 0.0.0.0 network 192.168.79.9 0.0.0.0 #ospf 2 area 0.0.0.0 network 89.1.1.9 0.0.0.0 #user-interface con 0 authentication-mode passworduser-interface vty 0 4user-interface vty 16 20#wlan ac#return


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Java实现定时备份文件
下一篇:关于HTTP和HTTPS六大常见问题
相关文章

 发表评论

暂时没有评论,来抢沙发吧~