当前位置: 首页> 娱乐> 八卦 > 4钻淘宝店铺转让价格表_跳转链接_重庆seo网站收录优化_公司做个网站多少钱

4钻淘宝店铺转让价格表_跳转链接_重庆seo网站收录优化_公司做个网站多少钱

时间:2025/7/9 23:23:28来源:https://blog.csdn.net/qq_64050217/article/details/143217372 浏览次数:0次
4钻淘宝店铺转让价格表_跳转链接_重庆seo网站收录优化_公司做个网站多少钱

DMVPN(Dynamic Multipoint VPN)动态多点VPN

对于分公司和分总公司内网实现通信环境下,分公司是很多的。我们不可能每个分公司和总公司都挨个建立ipsec隧道 ,而且如果是分公司和分公司建立隧道,就会很麻烦。此时我们需要在分公司和分公司之间建立按需链路(一旦只有数据传输的时候才会建立,没有数据传输的时候不建立隧道)

注意:DMVPN是思科私有的协议技术

DMVPN基于tunnel

  • tunnel:也叫做GRE(GRE:通用路由封装,是一个模型),VPN的模型,隧道的模型,内网到内网的模型,双IP报头的模型

  • image.png

  • 内网数据经过隧道口来进行一个二次封装,这个隧道口也可以起路由协议

  • 配置案列:封装双IP报头
    image.png

    en
    conf ter
    ip route 0.0.0.0 0.0.0.0 100.1.1.1
    int tunnel 0
    ip add 123.1.1.1 255.255.255.0
    tunnel source 100.1.1.2
    tunnel destination 200.1.1.2
    tunnel mode ipip //我们现在是处于封装双IP报头的形式
    exit
    router ospf 100
    router-id 2.2.2.2
    network 123.1.1.0 0.0.0.255 a 0
    network 172.16.1.1 0.0.0.0 a 0
    end
    
    en
    conf ter
    ip route 0.0.0.0 0.0.0.0 200.1.1.1
    int tunnel 0
    ip add 123.1.1.2 255.255.255.0
    tunnel source 200.1.1.2
    tunnel destination 100.1.1.2
    tunnel mode ipip //封装双IP报头
    exit
    router ospf 100
    router-id 1.1.1.1
    network 123.1.1.0 0.0.0.255 a 0
    network 192.168.1.1 0.0.0.0 a 0
    end
    

DMVPN基于NHRP(重点)

  • NHRP:下一条解析解析(有点像ARP)

    NHRP运用场景

  • Spoke 1和Spoke 2会把tunnel口的ip和连接运营商的公网ip做一个映射并且发给Hub,Hub此时收到两个映射关系
  • 但此时Spoke 1和Spoke 2都只有Hub的映射关系,假设Spoke 1去访问123.1.1.1,它会自动映射到11.1.1.2,但是如果Spoke 1去访问Spoke 2(Spoke 1里面并没有123.1.1.3映射的表),它会去找Hub发送请求(请求123.1.1.3,Hub端会把123.1.1.3的映射发给Spoke 1),此时Spoke 1获取的这个表项长时间没用是会超时的,下次要继续发送的时候会重新申请,Spoke 2访问Spoke 1同理

NHRP的配置案例(隧道之间使用RIP协议)

要求:彼此之间的环回口地址可以互通(环回口模拟内网)
image.png

Hub
en
conf ter
int tunnel 0
ip add 123.1.1.1 255.255.255.0
tunnel source 11.1.1.2 //不需要写tunnel destination(因为我们使用的是DMVPN,我们再这里面不知到是有多少个Spoke客户端的,不可能每个都去写)
tunnel mode gre multipoint //把隧道模式改为多点隧道模式(隧道模式默认情况下是点对点模式,而我们现在的环境是点对多点)//配置NHRP
ip nhrp network-id 111 //用于DMVPN的组的一个划分(有点像vtp里面的domain功能,大家都在这个网络号里面才是一个组)
ip nhrp authentication cisco //DMVPN不需要配置destination,防止有人知道我们的预共享密钥冒充连接上来,做一个身份认证)//开启DMVPN的组播功能
ip nhrp map multicast dynamic //让接收到的组播地址自动形成映射关系,因为Spoke端会自动刚给Hub端发送自己的映射(等下会在三台设备上面运行RIP协议,RIP协议是基于组播的,相当于ip nhrp map 224.0.0.9 22.1.1.2的作用,在DMVPN下组播和单播是分开处理的,DMVPN默认情况下是不支持组播的)
exit//隧道上起动态协议
router rip
version 2
no auto-summary
network 123.0.0.0
network 1.0.0.0
exit
//Hub
show ip nhrp

image.png

//Hub
show ip route

image.png

Spoke 1
en
conf ter
int tunnel 0
ip add 123.1.1.2 255.255.255.0
tunnel source 22.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1 //配置NHRP的server端的tunnel口地址(他们是基于tunnel口来建立DMVPN的,确定谁是Hub端)//单播映射
ip nhrp map 123.1.1.1 11.1.1.2 //Hub端不会把自己的123.1.1.1对应11.1.1.2的映射发给Spoke端的,仅仅是Spoke端给Hub端发,只有在Spoke端请求的时候才会给他发//组播映射
ip nhrp map multicast 11.1.1.2 //只要是去往组播地址的数据,外面都会加一层公网IP的报头11.1.1.2,Hub端和Spoke端的流量分两种:1.组播流量:组播发送的,一般是服务于路由协议的;2.单播流量(业务流量):一对一发送的
exit//隧道上起动态协议
router rip
version 2
no auto-summary
network 123.0.0.0
network 2.0.0.0
exit
//Spoke 1
show ip nhrp

image.png

//Spoke 1
show ip route

image.png

为什么Hub的内网地址收到了,对端Sopke 2 的内网地址怎么没收到?

RIP的水平分割机制:从一个接口收到的路由不会再从这个接口发送出去(用于防环措施)

此时我们需要关闭RIP协议的水平分割机制

en
conf ter
int tu 0
no ip split-horizon
end
Spoke 2
en
conf ter
int tunnel 0
ip add 123.1.1.3 255.255.255.0
tunnel source 33.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1
ip nhrp map 123.1.1.1 11.1.1.2
ip nhrp map multicast 11.1.1.2
exit//隧道上起动态协议
router rip
version 2
no auto-summary
network 123.0.0.0
network 1.0.0.0
exit
//Spoke 2
show ip nhrp

image.png

Spoke 1 ping Spoke 2 的内网地址查表过程

ping 3.3.3.3

//Spoke 1
show ip route

image.png

//Spoke 1
show ip nhrp

image.png

  1. Spoke1 ping 3.3.3.3,先查路由表,看到去往3.3.3.3的下一跳为123.1.1.1,去往123.1.1.1从tunnel 0口出去
  2. 进入tunnel 0口之后开始查NHRP表,123.1.1.3对应的是33.1.1.2的一个映射封装
验证

当Spoke 1 ping Spoke 2的tunnel口时候,此时你就能看见动态获得映射关系
image.png

show ip nhrp

image.png

NHRP的配置案例(隧道之间使用EIGRP协议)

要求:彼此之间的环回口地址可以互通(环回口模拟内网)
image.png

Hub
en
conf ter
int tunnel 0
ip add 123.1.1.1 255.255.255.0
tunnel source 11.1.1.2
tunnel mode gre mutipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp map multicast dynamic
exit//在隧道上起动态协议
router EIGRP 100
no auto-summary
network 123.1.1.0 0.0.0.255
network 1.1.1.0 0.0.0.255
exit//关闭EIGRP的水平分割
int tunnel 0
no ip split-horizon eigrp 100 //关闭EIGRP 100的水平分割
exit//关闭EIGRP承载下一跳功能
int tunnel 0
no ip next-hop-self eigrp 100 //关闭EIGRP 100的承载下一跳
//Hub
show ip route

image.png

  • 此时Hub端收到了Spoke 1和Spoke 2的路由条目
Spoke 1
en
conf ter
int tunnel 0
ip add 123.1.1.2 255.255.255.0
tunnel source 22.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1
ip nhrp map 123.1.1.1 11.1.1.2
ip nhrp map multicast 11.1.1.2
exit//隧道上起动态协议
router EIGRP 100
no auto-summary
network 123.1.1.0 0.0.0.255
network 2.2.2.0 0.0.0.255
exit
//Spoke 1
show ip route

image.png

  • 此时Spoke 1上只收到了Hub的路由条目,没有收到对端Spoke 2的路由条目,和RIP的情况相同
  • 解决方法:在Hub的tunnel口上把EIGRP100的水平分割关掉
  • 水平分割关掉之后接着查看路由表
//Spoke 1
show ip route

image.png

  • 此时会发现去往3.3.3.3条目的下一条为123.1.1.1(Spoke1去往Spoke2的3.3.3.3得经过Hub端),出现了次优路径,不可能下面的分布去往任何一个分布,数据都得经过总部
  • 这个就是是EIGRP的特性:Spoke2把自己3.3.3.3的路由条目发给了Hub端,Hub端接收到了这个路由条目又发给Spoke1,路由按正常来说,谁发给我的,我收到的这个条目的下一跳地址就是谁(按道理来说没问题,但是在我们这个环境中就有问题了)
  • 为了解决这个问题,需要在Hub上面关闭承载下一跳功能(让它恢复原有的下一跳功能)
  • 关闭承载下一跳功能之后接着查看路由表
//Spoke 1
show ip route

image.png

  • 此时发现Spoke1去往3.3.3.3的下一条为123.1.1.3了
Spoke 2
en
conf ter
int tunnel 0
ip add 123.1.1.3 255.255.255.0
tunnel source 33.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1
ip nhrp map 123.1.1.1 11.1.1.2
ip nhrp map multicast 11.1.1.2
exit//隧道上起动态协议
router EIGRP 100
no auto-summary
network 123.1.1.0 0.0.0.255
network 3.3.3.0 0.0.0.255
exit
//Spoke 2
show ip route

image.png

  • 此时Spoke 2上只收到了Hub的路由条目,没有收到对端Spoke 1的路由条目

NHRP的配置案例(隧道之间使用OSPF协议)

要求:彼此之间的环回口地址可以互通(环回口模拟内网)
image.png

Hub
en
conf ter
int tunnel 0
ip add 123.1.1.1 255.255.255.0
tunnel source 11.1.1.2
tunnel mode gre mutipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp map multicast dynamic
exit//在隧道上起动态协议
router ospf 100
router-id 1.1.1.1
net 1.1.1.0 0.0.0.255 a 0
net 123.1.1.0 0.0.0.255 a 0
exit//更改接口的网络类型
int tunnel 0
ip ospf network broadcast //更改tunnel 0接口的网络类型为广播
exit
  • 此时会发现每台设备上面都会有大量的报错信息
    image.png

  • 并且查看邻居时,邻居会不停的变换
    image.png
    image.png

  • 查看tunnel 0接口的状态

//Hub
show ip ospf interface tunnel 0

image.png | 900
参数信息查看

  • Network Type POINT-TO-POTIN(tunnel口的默认网络类型为点对点的网络类型,只能一次性建立一个邻居)
  • 但此时Hub端需要建立多个邻居关系,不能是点对点的网络类型
  • 解决方法,更改tunnel口的网络类型(建立ospf邻居的设备都要修改,因为ospf建立邻居需要都在同一个网络类型结构)
  • 在Hub和Spoke这种网络结构的情况下,需要让Hub为DR,这就需要设备其他Spoke不参与选举DB和BD(因为Spoke端都得把路由信息发给Spoke端,由Hub端去做同步),把建立邻居的端口的优先级设置为0就不会参与选举了
  • 如果Hub的tunnel口为广播类型,Spoke1和Spoke2的tunnel为点对点类型,此时会发现邻居起来了,但是没有路由条目
  • 查看ospf数据库的1类LSA
//Spoke 1
show ip ospf 100 database router

image.png

参数说明

  • Adv Router is not-reachable //表示通告路由器是不可达的(如果看一类条目有这个错误信息,大多数都是网络类型不同导致的)

  • 最后查看邻居建立的情况
    image.png

  • 此时会发现Hub已经是DR了,并且Spoke1和Spoke2不参与选举

Spoke 1
en
conf ter
int tunnel 0
ip add 123.1.1.2 255.255.255.0
tunnel source 22.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1
ip nhrp map 123.1.1.1 11.1.1.2   
ip nhrp map multicast 11.1.1.2
exit//在隧道上起动态协议
router ospf 100
router-id 2.2.2.2
net 2.2.2.0 0.0.0.255 a 0
net 123.1.1.0 0.0.0.255 a 0
exit//更改接口的网络类型
int tunnel 0
ip ospf network broadcast //更改tunnel 0接口的网络类型为广播
exit//设置接口优先级,不参与选举DR和BDR
int tunnel 0
ip ospf priority 0
exit

最后查看建立邻居的情况

//Spoke 1
show ip ospf neighbors

image.png

Spoke 2
en
conf ter
int tunnel 0
ip add 123.1.1.3 255.255.255.0
tunnel source 33.1.1.2
tunnel mode gre multipoint
ip nhrp network-id 111
ip nhrp authentication cisco
ip nhrp nhs 123.1.1.1
ip nhrp map 123.1.1.1 11.1.1.2
ip nhrp map multicast 11.1.1.2
exit//在隧道上起动态协议
router ospf 100
router-id 3.3.3.3
net 3.3.3.0 0.0.0.255 a 0
net 123.1.1.0 0.0.0.255 a 0
exit//更改接口的网络类型
int tunnel 0
ip ospf network broadcast //更改tunnel 0接口的网络类型为广播
exit//设置接口优先级,不参与选举DR和BDR
int tunnel 0
ip ospf priority 0
exit

最后查看建立邻居的情况

//Spoke 2
show ip ospf neighbors

image.png

基于IPSEC

基于上面的配置开始做IPSec

image.png

Hub
en
conf ter
crypto isakmp policy 10
encryption 3des
hash md5
authentication pre-share
group 2
exit
crypto isakmp key 0 cisco address 0.0.0.0 //配置PSK(此时不能能够确定Spoke端是多少,假设有100个Spoke端,照之前的配置就跟做L2L差不多)
crypto ipsec transform-set X esp-md5-hmac esp-3des//创建一个IPSec简档,名为DMVPN
crypto ipsec profile DMVPN
set transform-set X
exit//挂载接口
int tunnel 0
tunnel protection ipsec profile DMVPN
end
//Spoke 1
show crypto engine connections active

image.png
此时我都没有发送数据,从哪里来的加密解密的数据?(RIP的周期跟新,30/s更新一次)

Spoke 1
en
conf ter
crypto isakmp policy 10
encryption 3des
hash md5
authentication pre-share
group 2
exit
crypto isakmp key 0 cisco address 0.0.0.0
crypto ipsec transform-set X esp-md5-hamc esp-3des
exit
crypto ipsec profile DMVPN
set transform-set X
exit
int tunnel 0
tunnel protection ipsec profile DMVPN
end
//Spoke1
show crypto isakmp sa

image.png

Spoke 2
en
conf ter
crypto isakmp policy 10
encryption 3des
hash md5
authentication pre-share
group 2
exit
crypto isakmp key 0 cisco address 0.0.0.0
crypto ipsec transform-set X esp-md5-hamc esp-3des
exit
crypto ipsec profile DMVPN
set transform-set X
exit
int tunnel 0
tunnel protection ipsec profile DMVPN
end

说说DMVPN是一个怎么样的形态

image.png

  • 分公司和总公司之间都建立隧道,但是分公司和分公司之间也可能有数据传输,此时总公司是固定的,分公司不是固定的,所有分公司和分公司之间不可能每一个都要建立隧道(数量太多了),所以让分公司和分公司之间一旦有需要的时候才建立按需链路
  • 分公司和分公司之间没有数据传输的时候是不建立隧道的,有数据传输的时候才动态的建立一条隧道
  • 这条隧道又是如何产生的呢?
    • 分公司和总公司之间有连接,从总公司这里获取到另外一个分公司的tunnel对应的公网IP(这里牵扯到一个map映射关系,这个映射关系就是总公司有所有分公司tunnel口对应的公网IP),一旦分公司有响应要跟另外一个分公司建立按需链路的时候,就要向总公司去请求这个的一个映射关系
    • 这时数据再传输的时候,数据就是通过DMVPN来建立的,通过IPSec来加密的,这个就是动态多点VPN
  • 这个按需链路的请求又怎么配置呢?
    • 这就需要用到NHRP(下一跳解析协议)
    • NHRP最主要的作用:总公司和分公司之间如何进行map的一个响应关系
关键字:4钻淘宝店铺转让价格表_跳转链接_重庆seo网站收录优化_公司做个网站多少钱

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: