配置NAT实现总公司与分公司互相通信
1、需求描述
总公司和分公司内网能够访问Internet。
总公司Web服务器需要公网和分公司访问。
2、拓扑结构

3、实现思路
使用PAT技术实现公司内网访问Internet
使用静态NAT技术实现外网访问总公司服务器
4、实现过程
R1配置
en
conf t
int fa 0/0
ip add 192.168.0.254 255.255.255.0
no shut
ip nat inside
exit
int fa 1/0
ip add 192.168.10.1 255.255.255.0
no shut
exit
int fa 0/1
ip add 192.168.20.1 255.255.255.0
no shut
exit
int fa 1/1
ip add 202.101.100.1 255.255.255.0
no shut
ip nat outside
exit
ip nat inside source statice tcp 192.168.0.1 80 202.101.100.1 80
ip access-list extended acl
permit ip 192.168.0.0 0.0.255.255 any
exit
ip nat inside source list acl interface fa 1/1 overload
ip route 0.0.0.0 0.0.0.0 fa 1/1
ip route 192.168.1.0 255.255.255.0 192.168.20.2
ip route 192.168.2.0 255.255.255.0 192.168.10.2
R2配置
en
conf t
int fa 0/0
ip add 192.168.1.254 255.255.255.0
no shut
exit
int fa 0/1
ip add 192.168.20.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 192.168.20.1
R3配置
en
conf t
int fa 0/0
ip add 192.168.2.254 255.255.255.0
no shut
exit
int fa 0/1
ip add 192.168.10.2 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 192.168.10.1