NAT

NAT实验

网络拓扑图:
配置要求:
(1)       实现路由互通:
(2)       实现 WEB 服务器能被公网和分公司访问
(3)       配置 PAT 使分公司可以访问 Internet 和总公司服务器
实验步骤:
步骤一:配置基本配置实现各路由互通:
R1 配置:
en
conf t
ho R1
int f0/0
ip add 192.168.0.1 255.255.255.0
no sh
int f1/0
ip add 10.0.1 .2 255.255.255.252
no shut
exit
ip route 0.0.0 .0 0.0.0.0 10.0.1.1
R2 配置:
en
conf t
ho R2
int f0/0
ip add 192.168.1.1 255.255.255.0
no sh
int f1/0
ip add 10.0.2 .2 255.255.255.252
no sh
ip route 0.0.0 .0 0.0.0.0 10.0.2.1
R3 配置:
en
conf t
ho R3
int f0/0
ip add 192.168.2.1 255.255.255.0
no sh
int f1/0
ip add 10.0.0 .2 255.255.255.252
no sh
ip route 0.0.0 .0 0.0.0.0 10.0.0.1
R4 配置:
en
conf t
ho R4
int f0/0
ip add 10.0.0 .1 255.255.255.252
no sh
int f1/0
ip add 10.0.1 .1 255.255.255.252
no sh
int f2/0
ip add 10.0.2 .1 255.255.255.252
no sh
int f3/0
ip add 10.0.3 .1 255.255.255.252
no sh
ip route 20.0.0 .0 255.255.255.240 10.0.1.2
ip route 222.222.222.0 255.255.255.192 10.0.0 .2
ip route 123.0.0.0 255.255.255.240 10.0.2 .2
ip route 10.0.0 .0 255.255.255.240 10.0.3.2
R5 配置:
en
conf t
ho R5
int f0/0
ip add 192.168.3.1 255.255.255.0
no sh
int f1/0
ip add 10.0.3 .2 255.255.255.252
no sh
exit
ip route 0.0.0 .0 0.0.0.0 10.0.3.1
R6 配置:
en
conf t
ho R6
int f0/0
ip add 192.168.0.2 255.255.255.0
no shut
exit
ip default-gateway 192.168.0.1
no ip routing
实验结果:实现各路由器互通
R1 配置NAT
ip nat inside source static 192.168.0.2 20.0.0 .10
int f0/0
ip nat inside
int f1/0
ip nat outside
 
R5 配置NAT
ip nat inside source static 192.168.3.2 10.0.0 .10
int f0/0
ip nat inside
int f1/0
ip nat outside
步骤二:配置PAT 实现分公司可以访问WEB Internet
R3 配置PAT
access-list 1 permit 192.168.2.0 0.0.0 .255
ip nat pool test 222.222.222.1 222.222.222.63 netmask 255.255.255.192
ip nat inside source list 1 pool test overload
int f0/0
ip nat inside
int f1/0
ip nat outside
R2 配置PAT
access-list 1 permit 192.168.1.0 0.0.0 .255
ip nat pool test 123.0.0.1  123.0.0.14 netmask 255.255.255.240
ip nat inside source list 1 pool test overload
int f0/0
ip nat inside
int f1/0
ip nat outside
实验结果:

你可能感兴趣的:(职场,NAT,休闲)