实验名称
数据在私网与公网的传输(NAPT)
实验拓扑图如下
实验要求
1.配置IP地址,公网地址100.1.1.1/24;
2.私网A通过NAPT,使R1接入到互联网,私网B通过EASY IP,使R3接入到互联网;
3.私网A配置NAT SERVER把Telnet server的Telnet server服务发布到公网,使PC2可以访问。
实验思路
1.配置IP。
2.配置远程服务。
3.配置路由和ACL,实现全网通。
4.检查。
实验步骤
一
配置IP
PC Telnet server
[Telnet server]int g0/0/0
[Telnet server server-GigabitEthernet0/0/0]ip addressress 192.168.1.2 24
AR1
[AR 2220 NO.1]int g0/0/0
[AR 2220 NO.1-GigabitEthernet0/0/0]ip address 192.168.1.254 24
[AR 2220 NO.1-GigabitEthernet0/0/0]int g0/0/1
[AR 2220 NO.1-GigabitEthernet0/0/1]ip address 100.1.1.1 24
AR2
[AR 2220 NO.1]int g0/0/0
[AR 2220 NO.2-GigabitEthernet0/0/0]ip address 100.1.1.2 24
[AR 2220 NO.1-GigabitEthernet0/0/0]int g0/0/1
[AR 2220 NO.2-GigabitEthernet0/0/1]ip address 100.2.2.1 24
AR3
[AR 2220 NO.3]int g0/0/0
[AR 2220 NO.3-GigabitEthernet0/0/0]ip address 100.2.2.2 24
[AR 2220 NO.3-GigabitEthernet0/0/0]int g0/0/1
[AR 2220 NO.3-GigabitEthernet0/0/1]ip address 192.168.1.3 24
AR4
[AR 2220 NO.4]int g0/0/0
[AR 2220 NO.4-GigabitEthernet0/0/0]ip address 192.168.1.4 24
二
配置远程服务
[Telnet server]aaa
[Telnet server-aaa]local-user 1 privilege level 15 password cipher 1
[Telnet server-aaa]local-user 1 service-type Telnet server
[Telnet server]user-interface vty 0 4
[Telnet server-ui-vty0-4]authentication-mode aaa
三
配置路由做网关
[Telnet server]ip route-static 0.0.0.0 0 192.168.1.254
[AR 2220 NO.1]ip route-static 0.0.0.0 0 100.1.1.2
[AR 2220 NO.3]ip route-static 0.0.0.0 0 100.2.2.1
[AR 2220 NO.4]ip route-static 0.0.0.0 0 192.168.1.3
四
配置ACL命令
AR1
[AR 2220 NO.1]acl 2001
[AR 2220 NO.1-acl-basic-2001]rule permit source 192.168.1.0 0.0.0.255
[AR 2220 NO.1]nat addressress-group 1 100.1.1.3 100.1.1.254
[AR 2220 NO.1-GigabitEthernet0/0/1]nat outbound 2001 addressress-group 1
[AR 2220 NO.1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.2 23
AR3
[AR 2220 NO.3]acl 2002
[AR 2220 NO.3-acl-basic-2002]rule permit source 192.168.1.0 0.0.0.255
[AR 2220 NO.3-GigabitEthernet0/0/0]nat outbound 2002
五
检查
实验结束
基于eNSP的私网与公网的传输(NAPT)配置实验
于 2024-01-20 16:33:10 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)