NAT的双出口_备份

说明:当R2-R3-R5做为主线路时,R2loo 0 去访问R5的时候,地址会转换为R2f0/0的接口地址,当R2-R3-R5线路出现问题的时候,R2会往R2-R4-R5的线路去走,loo 0 的地址就会转换为R2f0/1接口地址

基本配置:R2 R4 R5,实现R2 R4 R5之间的相互通信,R5上要有去R2 R4的路由

NAT的双出口_NAT_02

 

NAT配置:

第一步:先写两条静态路由

R2(config)#ip route 0.0.0.0 0.0.0.0 23.1.1.3

R2(config)#ip route 0.0.0.0 0.0.0.0 24.1.1.4 10

第二步:做两个route-map

R2(config)#route-map 2-4

R2(config-route-map)match interface fastEthernet 0/0

R2(config)#route-map 2-3

R2(config-route-map)match interface fastEthernet 0/1

第三步:做地址转换

R2(config)#ip nat inside source route-map 2-3 interface f0/1 overload

R2(config)#ip nat inside source route-map 2-4 interface f0/0 overload

 

验证:

NAT的双出口_双出口_03

 

断开F0/1后:

 

NAT的双出口_双出口_04