温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

动态PNAT配置

发布时间:2020-07-14 10:27:25 来源:网络 阅读:3878 作者:贪恋你的莼 栏目:系统运维

实验名称:思科路由动态PNAT配置
实验拓扑:
实验环境:1、3台路由器,
2、一台交换机
Router 0 边界路由器(内网和外网)
Router 1 边界路由器(公网的内网和外网)
Pouter 2 内网路由器 (公网的内部网络)
3、两台PC
Pc2 pc3

实验思路:先把三台路由器的地址配置好,
Router0 g0/0口是内网网关 192.168.1.254/24
Router0 g0/1口是公网地址 100.1.1.1/24

                                 Router1   g0/0是公网外网地址 100.1.1.2/24
                                 Router1   g0/1 是公网内网网关 200.1.1.1/24

                                 Router2 g0/0 是公网内网地址  200.1.1.2/24

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

Press RETURN to get started!

Router>enable
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 shtdown
^
% Invalid input detected at '^' marker.
Router(config-if)#
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)#ip address 192.168.10.254 255.255.255.0
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#no shutdown

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

Router(config-if)#ip address 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)#e
Router(config)#int g0/0
Router(config-if)#ip nat i
Router(config-if)#ip nat inside
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#ip nat o
Router(config-if)#ip nat outside
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#e
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#acce
Router(config)#access-list 1 p
Router(config)#access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)#ip nat i
Router(config)#ip nat inside s
Router(config)#ip nat inside source l
Router(config)#ip nat inside source list 1 interface g0/1
Router(config)#
Router(config)#
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>enable
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)#ip address 100.1.1.2 255.255.255.0
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#no shutdown

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

Router(config-if)#ip address 200.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)#e
Router(config)#route rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 200.1.1.0
Router(config-router)#network 100.1.1.0
Router(config-router)#p
Router(config-router)#passive-interface g0/0
Router(config-router)#
4、 配置Router 2
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable
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)#ip address 200.1.1.2 255.255.255.0
Router(config-if)#e
Router(config)#route rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 200.1.1.0
Router(config-router)#
5、验证思路:
全部配置好先ping自己的网关在一步一步ping到公网的内网

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI