實驗拓撲如下
公司內部的一臺服務器爲公網提供服務,同一時間有多臺客戶機同時對該服務器進行訪問,那麼必然造成該服務器的負載過高,我們可以通過創建多臺相同的服務器來進行服務的提供,通過NAT的負載平衡來解決對單一服務器資源的消耗
實驗準備,所有的內網地址都可以和公網上的任何一個IP地址進行通信,方法略
實驗目的 在路由器R3上 telent R1的 s1/0 端口,流量輪詢的被髮送到 server1 以及 server2 兩臺機器
做通整個拓撲的方法,略
R1(config)#ip access-list extended rotary
R1(config-ext-nacl)#permit ip host 12.1.1.1 any
R1(config-ext-nacl)#exit
定義訪問控制列表
R1(config)#ip nat poo
R1(config)#ip nat pool rotary 172.16.1.2 172.16.1.3 ne
R1(config)#ip nat pool rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0?
A.B.C.D
R1(config)#ip nat pool rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0 ?
accounting Specify the accounting
add-route Add special route to Virtual Interface
arp-ping WLAN ARP Ping
type Specify the pool type
<cr>
R1(config)#ip nat pool rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0 ty
R1(config)#ip nat pool rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0 type ?
match-host Keep host numbers the same after translation
rotary Rotary address pool
R1(config)#$ rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0 type ro
R1(config)#$ rotary 172.16.1.2 172.16.1.3 netmask 255.255.255.0 type rotary
R1(config)#
定義內部私有地址的輪詢
R1(config)#ip nat inside destination list rotary pool rotary
將 ACL 和 輪詢地址池關聯
R3#telnet 12.1.1.1
Trying 12.1.1.1 ... Open
User Access Verification
Password:
R5>
R5>
R5>
R5>
R5>
R5>exit
[Connection to 12.1.1.1 closed by foreign host]
R3#telnet 12.1.1.1
Trying 12.1.1.1 ... Open
c
User Access Verification
Password:
Password:
R6>
兩次telnet 分別進入的不同的設備 那麼我們的實驗就成功了
本文出自 “珠海劉碩的博客” 博客,請務必保留此出處http://liushuo890.blog.51cto.com/5167996/1064252