第一步·实现网络可达
1.在除了R2以外所有的路由去配一条缺省指向 R2 实现网络可达。
2.配置好后检验网络是否可达,避免第二步配置隧道的时候导致问题的堆积无法查找
3.网络接口的地址如图所示,x代表路由器的编号 如R1 的 x 代表 1
4.其中图结构为R1为心 ,R3,R6 为分支 第一级MGRE ;之后R3为中心,R4,R5为分支;R6为中心 R7,R8为分支 的第二级MGRE。
第二步:实现以R1为中心的MGRE
1.R1的配置如下
R1
interface Tunnel0/0/0
ip address 10.0.0.1 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
nhrp authentication cipher pt123
nhrp redirect
nhrp entry multicast dynamic
nhrp network-id 100
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.1.1.0 0.0.0.255
2.R3的配置如下
R3
interface Tunnel0/0/0
ip address 10.0.0.3 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
ospf dr-priority 0
nhrp authentication cipher pt123
nhrp shortcut
nhrp network-id 100
nhrp entry 10.0.0.1 100.1.21.1 register
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.1.1.0 0.0.0.255
3.R6的配置如下
R6
interface Tunnel0/0/0
ip address 10.0.0.6 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
ospf dr-priority 0
nhrp authentication cipher pt123
nhrp shortcut
nhrp network-id 100
nhrp entry 10.0.0.1 100.1.21.1 register
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.6.6.0 0.0.0.255
第三步:配置R3,R6为中心的第二级 MGRE
R3,R6的配置如下: 添加配置
interface Tunnel0/0/0
nhrp redirect
nhrp entry multicast dynamic
R4的配置如下:
interface Tunnel0/0/0
ip address 10.0.0.4 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
nhrp authentication cipher pt123
nhrp shortcut
nhrp network-id 100
nhrp entry 10.0.0.3 100.1.23.1 register
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.4.4.0 0.0.0.255
R5的配置如下:
interface Tunnel0/0/0
ip address 10.0.0.5 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
nhrp shortcut
nhrp authentication cipher pt123
nhrp network-id 100
nhrp entry 10.0.0.3 100.1.23.1 register
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.5.5.0 0.0.0.255
R7的配置如下:
interface Tunnel0/0/0
ip address 10.0.0.7 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
nhrp shortcut
nhrp authentication cipher pt123
nhrp network-id 100
nhrp entry 10.0.0.6 100.1.26.1 register
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.7.7.0 0.0.0.255
R8的配置如下:
interface Tunnel0/0/0
ip address 10.0.0.8 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
gre key 1
ospf network-type p2mp
nhrp shortcut
nhrp authentication cipher pt123
nhrp network-id 100
nhrp entry 10.0.0.6 100.1.26.1 register
ospf 1 router-id 8.8.8.8
area 0.0.0.0
network 10.0.0.0 0.255.255.255
network 10.8.8.0 0.0.0.255
第四步配置 IPSec
.1,每个路由器的配置相同 (每一段命令需要早视图模式下(sysname下))
ike proposal 1
encryption-algorithm aes-cbc-128
dh group5
authentication-algorithm md5
ike peer dsvpn v1
exchange-mode aggressive
pre-shared-key cipher key123
ike-proposal 1
remote-name dsvpn
ike local-name dsvpn 本地名字
ipsec proposal dsvpn
encapsulation-mode transport
transform ah-esp
ah authentication-algorithm sha1
esp encryption-algorithm aes-128
esp authentication-algorithm md5 (默认)
ipsec profile dsvpn
ike-peer dsvpn
proposal dsvpn
interface Tunnel0/0/0
ipsec profile dsvpn
2.加密结果
理论总结
1.什是数据认证,有什么作用,有哪些技术手段实现
验证数据的完整性,可以判断在传输的过程中数据是否被他人篡改,通常可以用比对摘要之的方法来判断数据是否完整,通过算法(hash)等来将数据进行摘要后加密,传输完成过后将使用相同的算法解密来判断数据是否完整
2.什么是身份认证,又什么作用,有哪些实现的技术手段?
身份认证就是,来判断对方发送给你的数据是否可靠,是否是通过他人伪造发送而来的数据,通常可以申请CA证书来确保传输人的身份信息
3.什么是VPN技术
是一种虚拟隧道的技术,通过隧道的技术可以通过公网将通信双方隔离开来,不需要搭建硬件设施,来达到端对端的通信
4.IPSEC技术能够提供那些安全服务
保证数据的完整性,机密性,可用性,重传保护
5.VPN有哪些分类
用户到服务器
服务器到服务器
6.IPSEC的技术架构有那些
1.AH 和 ESP两种架构
2.AH可以保证数据的 完整性和可用性
3.ESP可以保证数据的机密性,完整性,可用性
4.所以AH只有鉴别算法,没有加密算法,为ESP有加密和鉴别算法
7.AH的ESP的封装异同
AH与ESP传输模式上的异同
1.AH通过摘要算法 将原始数据的全部都进行计算 得到AH认证头摘要后 插到数据IP头后 发送
2.ESP则是 原始数据和 ESP尾 进行加密 后在 使用 摘要算法 将 加密范围内的数据和ESP头一起 进行摘要 得到ESP认证 加到数据的最后 IP头会将数据 携带发送
AH与ESP隧道模式上的异同
1.AH先将新的 IP头加到原始IP头前 ,之后通过摘要算法将 整个数据摘要计算 得到认证信息 插到 新IP头后 发送
2.ESP则是 原始数据和 填充(便于计算) 进行加密 后在 使用 摘要算法 将 加密范围内的数据和ESP头一起 进行摘要 得到ESP认证 加到数据的最后 新的 IP头会将数据 携带发送
8 .IKE的作用是什么
1.为ipsec通信双方,动态的建立安全联盟SA,对SA进行管理与维护。
2.为ipsec生成密钥,提供AH/ESP加解密和验证使用
9.IKE的工作原理
1。使用IKE进行密钥协商后的到密钥为AH和ESP提供密钥,进行数据的加解密
10.IKE第一阶段有哪些模式,有什么区别,使用场景是那些
1.野蛮模式
只有发三个数据包就可以进行传输,速度较快
2.主动模式
需要发送6个数据包才能进行数据的发送,更安全