Redundancy ×××

拓扑:

=====================初始化配置==========================

spoke

interface FastEthernet0/0

 ip address 192.168.1.10 255.255.255.0

 

interface FastEthernet1/0

 ip address 202.1.1.10 255.255.255.0

 

ip route 0.0.0.0 0.0.0.0 202.1.1.1

GW

interface FastEthernet0/0

 ip address 202.1.1.1 255.255.255.0

interface FastEthernet1/0

 ip address 10.1.1.10 255.255.255.0

ip route 10.1.2.0 255.255.255.0 10.1.1.254

ip route 192.168.1.0 255.255.255.0 202.1.1.10

HUB1

interface FastEthernet0/0

 ip address 10.1.1.1 255.255.255.0

 

interface FastEthernet1/0

 ip address 10.1.2.1 255.255.255.0

ip route 0.0.0.0 0.0.0.0 10.1.1.10

HUB2

interface FastEthernet0/0

 ip address 10.1.1.2 255.255.255.0

interface FastEthernet1/0

 ip address 10.1.2.2 255.255.255.0

 

ip route 0.0.0.0 0.0.0.0 10.1.1.1

Server

interface FastEthernet0/0

 ip address 10.1.2.10 255.255.255.0

===================L2L配置==============================

Spoke

crypto isakmp policy 10

 encr 3des

 hash md5

 authentication pre-share

 group 2

crypto isakmp key cisco address 10.1.1.254

crypto isakmp keepalive 10 periodic                      //配置DPD

crypto ipsec transform-set cisco esp-des esp-md5-hmac 

crypto map cisco 10 ipsec-isakmp 

 set peer 10.1.1.254                                  //指对端HSRP虚拟IP

 set transform-set cisco 

 match address ***

int f0/0

Crypto map cisco

Hub1

crypto isakmp policy 10

 encr 3des

 hash md5

 authentication pre-share

 group 2

crypto isakmp key cisco address 202.1.1.10

crypto isakmp keepalive 10 periodic                     //配置DPD

crypto ipsec transform-set cisco esp-des esp-md5-hmac 

crypto map cisco 10 ipsec-isakmp 

 set peer 202.1.1.10

 set transform-set cisco 

 match address ***

 reverse-route tag 10                                //反向路由注入tag 10

ip access-list extended ***

 permit ip host 10.1.2.10 host 192.168.1.1               //感兴趣流

interface FastEthernet0/0

 standby delay reload 120 //                          //配置初始化HSRP组的延迟

 standby track FastEthernet1/0

 standby 1 ip 10.1.1.254

 standby 1 priority 105

 standby 1 preempt

 standby 1 name ***-redundancy

 crypto map cisco redundancy ***-redundancy

route-map *** permit 10

 match tag 10

router ospf 110

 redistribute static subnets route-map ***

 network 10.1.2.0 0.0.0.255 area 0

 default-information originate always                 //下发OSPF默认路由

Hub2

crypto isakmp policy 10

 encr 3des

 hash md5

 authentication pre-share

 group 2

crypto isakmp key cisco address 202.1.1.10

crypto isakmp keepalive 10 periodic

crypto ipsec transform-set cisco esp-des esp-md5-hmac 

crypto map cisco 10 ipsec-isakmp 

 set peer 202.1.1.10

 set transform-set cisco 

 match address ***

 reverse-route tag 10

ip access-list extended ***

 permit ip host 10.1.2.10 host 192.168.1.1

interface FastEthernet0/0

 standby track FastEthernet1/0

 standby 1 ip 10.1.1.254

 standby 1 preempt

 standby 1 name ***-redundancy

 crypto map cisco redundancy ***-redundancy

route-map *** permit 10

 match tag 10

router ospf 110

 redistribute static subnets route-map ***

 network 10.1.2.0 0.0.0.255 area 0

 default-information originate always

测试

HUB1反向路由注入

Server192.168.1.1下一跳10.1.2.1

HUB1 shutdown接口

PC

HUB2产生静态路由

Server192.168.1.1下一跳10.1.2.2