dmvpn &ospf配置实例

来源:互联网 发布:unity3d特效 编辑:程序博客网 时间:2024/04/27 15:22


center r1配置:

!         
crypto isakmp policy 10
 hash md5 
 authentication pre-share
 group 2  
crypto isakmp key cisco address 0.0.0.0 0.0.0.0/*使用动态vpn,因此对端通信点不确定*/
!         
!         
crypto ipsec transform-set trans esp-des esp-md5-hmac 
!         
crypto ipsec profile ipsecprof
 set transform-set trans  
!         
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!         
interface Tunnel0
 ip address 172.16.1.1 255.255.255.0
 no ip redirects
 ip nhrp map multicast dynamic /*配置hub,使其可以接收组播包*/
 ip nhrp network-id 10/*同一个nhrp网络需要使用相同网络id*/

ip mtu 1440/1436/*建议修改接口MTU*/

 ip ospf network broadcast/*为了使ospf正常使用组播包通信,链路需要设置成广播网络*/
 ip ospf priority 2/*调整hub端,使其同时为nhrp server和ospf的DR*/

 tunnel source Ethernet0/0
 tunnel mode gre multipoint/*启用gre多点模式*/
 tunnel key 12345/*同一组多点GRE需要相同的tunnel key*/
 tunnel protection ipsec profile ipsecprof

!         
interface Ethernet0/0
 ip address 202.100.1.1 255.255.255.0
 half-duplex
!         

!         
router ospf 1
 log-adjacency-changes
 network 1.1.1.0 0.0.0.255 area 0
 network 172.16.1.0 0.0.0.255 area 0


--------------------------------------------------------------------------------------------------------


branch2 配置:

!         
crypto isakmp policy 10
 hash md5 
 authentication pre-share
 group 2  
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
!         
!         
crypto ipsec transform-set trans esp-des esp-md5-hmac 
!         
crypto ipsec profile ipsecprof
 set transform-set trans 
   
!         
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!         
interface Tunnel0
 ip address 172.16.1.2 255.255.255.0
 no ip redirects
 ip nhrp map 172.16.1.1 202.100.1.1/*配置到nhrp服务器的静态映射,否则到达不了服务器就无法进行下面的地址解析,多点tunnel层面的虚拟地址在前,真实物理接口地址始终在后*/
 ip nhrp map multicast 202.100.1.1/*使多播分组通过nhrp服务器来转发*/
 ip nhrp network-id 10
 ip nhrp nhs 172.16.1.1/*nhs为虚拟的多点隧道层面的地址*/

 ip ospf network broadcast
 ip ospf priority 0/*调整DR的位置*/

ip mtu 1440/1436/*建议修改接口MTU*/
 tunnel source Ethernet0/0
 tunnel mode gre multipoint
 tunnel key 12345
 tunnel protection ipsec profile ipsecprof

!         
interface Ethernet0/0
 ip address 202.100.1.2 255.255.255.0
 half-duplex
!         
router ospf 1
 log-adjacency-changes
 network 2.2.2.0 0.0.0.255 area 0
 network 172.16.1.0 0.0.0.255 area 0



--------------------------------------------------------------------------------


branch3:


!         
crypto isakmp policy 10
 hash md5 
 authentication pre-share
 group 2  
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
!         
!         
crypto ipsec transform-set trans esp-des esp-md5-hmac 
!         
crypto ipsec profile ipsecprof
 set transform-set trans 
!         
!         
!         
!         
!         
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!         
interface Tunnel0
 ip address 172.16.1.3 255.255.255.0
 no ip redirects
 ip nhrp map 172.16.1.1 202.100.1.1
 ip nhrp map multicast 202.100.1.1
 ip nhrp network-id 10
 ip nhrp nhs 172.16.1.1

 ip ospf network broadcast
 ip ospf priority 0

ip mtu 1440/1436/*建议修改接口MTU*/
 tunnel source Ethernet0/0
 tunnel mode gre multipoint
 tunnel key 12345
 tunnel protection ipsec profile ipsecprof

!         
interface Ethernet0/0
 ip address 202.100.1.3 255.255.255.0
 half-duplex
!         
router ospf 1
 log-adjacency-changes
 network 3.3.3.0 0.0.0.255 area 0
 network 172.16.1.0 0.0.0.255 area 0

原创粉丝点击