NAT的负载均衡
实验目的:了解NAT的代理配置
实验环境:如下图所示的实验环境
通过NAT代理技术使得R1 telnet  195.1.1.1会登录到R4
R2  telnet  195.1.1.1会登录到R5
NAT的负载均衡_职场
实验步骤:
1:进入第一台路由进行如下配置
R1(config)#  no  ip  routing     关闭路由功能
R1(config)#  ip  default-gateway  193.1.1.1  设置网关
R1(config)#  int  fa0/0
R1(config-if)#  ip  add  193.1.1.2  255.255.255.0
R1(config-if)#  no  shut
R1(config-if)#  duplex   full   定义接口为全双工
R1(config-if)#  end
R1#
2:进入第二台路由进行如下配置
 
R2(config)#  no  ip  routing
R2(config)#  ip  default-gateway  193.1.1.1
R2(config)#  int  fa0/0
R2(config-if)#  ip  add  193.1.1.3  255.255.255.0
R2(config-if)#  no  shut
R2(config-if)#  duplex  full
R2(config-if)#  end
R2#
3:进入第一台交换机进行如下配置
 
S1(config)#  int  range  f0/1  -  3
S1(config-if-range)#  no  shut
S1(config-if-range)#  speed  10
S1(config-if-range)#  duplex  full
S1(config-if-range)#  end
 
4:进入R3进行如下配置
 
R3(config)#  int  fa0/0
R3(cnnfig-if)#  ip   add  193.1.1.1  255.255.255.0
R3(cnnfig-if)#  no  shut
R3(cnnfig-if)#  duplex  full
R3(cnnfig-if)#  int  fa0/0
R3(cnnfig-if)#  ip  add  192.168.1.1  255.255.255.0
R3(cnnfig-if)#  no  shut
R3(cnnfig-if)#  duplex  full
R3(cnnfig-if)#  exit
R3(config)#  access-list  1  permit  195.1.1.1
R3(config)#  ip  nat  pool  tom  192.168.1.2  192.168.1.3  netmask  255.255.255.0  type  rotarry
R3(config)#  ip  nat  inside  source  list  1  pool  tom
R3(config)#  int  fa0/0
R3(config-if )#  ip  nat  inside
R3(config-if )#  int  fa1/0
R3(config-if )#  ip  nat  outside
R3(config-if )#  end
R3#
 
5:进入第二台交换机进行如下配置
 
 
S2(config)#  int  range  f0/1  -  3
S2(config-if-range)#  no  shut
S2(config-if-range)#  speed  10
S2(config-if-range)#  duplex  full
S2(config-if-range)#  end
 
6:进入R4进行如下配置
 
R4(config)#  enable  password  123
R4(config)#  line  vty  0  4
R4(config-line)#  password  123
R4(config-line)#  login
R4(config-line)#  exit
R4(config)#  no  ip  routing
R4(config)#  ip  default-gateway  192.168.1.1
R4(config)#  int  fa0/0
R4(config-if)#  ip  add  192.168.1.2  255.255.255.0
R4(config-if)#  no  shut
R4(config-if)#  duplex   full
R4(config-if)#  end
R4#
 
7:进入R5进行如下配置
 
R5(config)#  enable  password  123
R5(config)#  line  vty  0  4
R5(config-line)#  password  123
R5(config-line)#  login
R5(config-line)#  exit
R5(config)#  no  ip  routing
R5(config)#  ip  default-gateway  192.168.1.1
R5(config)#  int  fa0/0
R5(config-if)#  ip  add  192.168.1.3  255.255.255.0
R5(config-if)#  no  shut
R5(config-if)#  duplex   full
R5(config-if)#  end
R5#
 
 
 
验证:
(1)       R1telnet  195.1.1.1会登录到R4
(2)       R2telnet  195.1.1.1会登录到R5