实验名称:思科路由静态NAT配置
实验拓扑:思科路由静态NAT配置_第1张图片
实验环境:1、3台路由器,
2、一台交换机
Router 0 边界路由器(内网和外网)
Router 1 边界路由器(公网的内网和外网)
Pouter 2 内网路由器 (公网的内部网络)
3、一台PC

实验步骤:
1、 配置PC机地址:
IP : 192.168.10.1/24
网关:192.168.10.25
2、 配置Router 0
Continue with configuration dialog? [yes/no]: n

Press RETURN to get started!
Router>
Router>
Router>enable
Router#
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#
Router(config-if)#ip add 19.168.10.254 255.255.255.0
Router(config-if)#q
^
% Invalid input detected at '^' marker.
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#ip add 100.1.1.1 255.255.255.0
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#
Router(config-if)#
Router(config-if)#e
Router(config)#int g0/0
Router(config-if)#ip nat inside
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#ip nat outside
Router(config-if)#e
Router(config)#ip nat i
Router(config)#ip nat inside s
Router(config)#ip nat inside source s
Router(config)#ip nat inside source static 192.168.10.1 100.1.1.1
Router(config)#int g0/0
Router(config-if)#ip add 192.168.10.254 255.255.255.0
Router(config-if)#e
Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2
Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2
Router(config)#
3、 配置Router1
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>
Router>
Router>
Router>enable
Router#
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#
Router(config-if)#ip add 100.1.1.2 255.255.255.0
Router(config-if)#e
Router(config)#int g0/2
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

Router(config-if)#ip add 200.1.1.1 255.255.255.0
Router(config-if)#e
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

Router(config)#
Router(config)#
Router(config)#route rip
Router(config-router)#net
Router(config-router)#network 100.1.1.0
Router(config-router)#net
Router(config-router)#network 200.1.1.0
Router(config-router)#pa
Router(config-router)#passive-interface g0/1
Router(config-router)#
4、 配置Router 2
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>
Router>
Router>
Router>enable
Router#
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#int g0/2
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

Router(config-if)#ip add 200.1.1.2 255.255.255.0
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#e
Router(config)#route rip
Router(config-router)#net
Router(config-router)#network 200.1.1.0
Router(config-router)#
5、 验证测试:

思科路由静态NAT配置_第2张图片

思科路由静态NAT配置_第3张图片

思科路由静态NAT配置_第4张图片

思科路由静态NAT配置_第5张图片

思科路由静态NAT配置_第6张图片