【实验名称】
路由器NAT负载均衡实验过程详解 【实验目的】 学习NAT如何实现负载均衡,掌握NAT原理。
【需求分析】
在R2上做NAT负载,使R1 telnet R2的S1/0接口,分别跳转到模拟内部服务器的R4 、R5
【实验拓扑】
【实验设备】
路由器 (4台)
【实验步骤】
第一步:配置各台路由器用户名和IP地址,并且使用ping命令确认各路由器的直连口的互通性。
第二步:在R3、R4上配置用户密码和虚拟线路密码,为后面的测试telnet服务: R4(config)#enable password 123456 R4(config)#line vty 0 4
R4(config-line)#password 123456 R4(config-line)#login R4(config-line)#exit
R3(config)#enable password 123456 R3(config)#line vty 0 4
R3(config-line)#password 123456 R3(config-line)#login R3(config-line)#exit
第三步:关闭R3、R4上的路由功能,设置默认网关为192.168.1.1 R3(config)#no ip routing
R3(config)#ip default-gateway 192.168.1.1
R4(config)#no ip routing
R4(config)#ip default-gateway 192.168.1.1
第四步:在R2上配置NAT负载均衡 R2(config)#inter s1/0 R2(config-if)#ip nat outside R2(config-if)#inter f0/0 R2(config-if)#ip nat ins R2(config-if)#ip nat inside R2(config-if)#exit
R2(config)#access-list 1 permit 12.1.1.2 0.0.0.0
R2(config)#ip nat pool fuzai 192.168.1.3 192.168.1.4 netmask 255.255.255.0 type rotary R2(config)#ip nat inside destination list 1 pool fuzai R2(config)#
第五步:在R1上telnet R2的S1/0接口,我们分别telnet两次,以观察负载分担的情况 R1#telnet 12.1.1.2
Trying 12.1.1.2 ... Open
User Access Verification Password: R4>en
Password: Password: R4#exit
R1#telnet 12.1.1.2
Trying 12.1.1.2 ... Open
User Access Verification
Password: R3>en Password: Password:
R3#
现在我们在R2上 来用show ip nat tran 看看输出结果:R2#show ip nat translations
Pro Inside global Inside local Outside local tcp 12.1.1.2:23 192.168.1.3:23 12.1.1.1:60551 tcp 12.1.1.2:23 192.168.1.4:23 12.1.1.1:47981
第六步:OK,NAT负载均衡实验到此结束
Outside global
12.1.1.1:60551 12.1.1.1:47981
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务