当前位置:网站首页>HCIA_NAT实验
HCIA_NAT实验
2022-07-17 00:16:00 【 ᝰꫛꫀꪝ】
1、实验需求
1、R2为ISP设备,只能在该设备上配置IP地址,不得在进行其他的任何配置
2、1.1.1.0/24网段代表整个互联网的所有网段
3、PC1可以正常pingPC2
4、R1仅拥有一个公有IP地址,在G0/0/1接口上
5、CLIENT可以通过http访问到两台server
6、client在访问其他一台server通过域名
2、实验拓扑
3、分析过程
1、PC1能ping通PC2,且1.1.1.0/24代表整个互联网的所有网段,所以需要在R1上写一条缺省指向ISP路由器,然后单单一条缺省是不够的,还需要在R1上配置NAT,首先书写ACL抓取感兴趣的流量,然后进行NAT的转换,将私有地址转换为公有地址12.1.1.1,然后进行对互联网的访问。
2、client可以通过HTTP访问到两台HTTP的server,需要在R1上进行端口与端口的映射,使得cilent使用http服务的80端口的时候访问到的是HTTP1,在使用http的8888的接口时,对应到HTTP2,这样就可以实现对两台不同server的分别访问
3、client在访问其中一台server时使用域名进行访问,暂时将HTTP1的对应关系写到DNS服务器中,使得client在使用域名访问时,对应到HTTP1的服务器。
4、配置内容
R1:
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 12.1.1.1 255.255.255.0
[r1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
[r1]acl 2000
[r1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 inside 192.168.1.10 80
Warning:The port 80 is well-known port. If you continue it may cause function failure.
Are you sure to continue?[Y/N]:y
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 8888 inside 192.168.1.20 80
R2:
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 255.255.255.0
[r2]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip address 1.1.1.1 255.255.255.0
5、结果验证
1、PC1可以正常ping通PC2
2、CLIENT可以通过http访问到两台server
3、client在访问其他一台server通过域名
边栏推荐
- VLAN and trunk port configuration
- 静态路由(详)
- How to do a good job of test case review
- Test knowledge preparation
- How to add software shortcuts to the right mouse button list
- Detailed explanation of metauniverse public chain caduceus: a creative platform specially built for metauniverse application
- Sigaga
- Traversal of binary tree
- SSH远程控制与访问
- jmeter连接数据库的方法
猜你喜欢
Leetcode buckle classic topic - 82 Maximum rectangle in column chart
Inverse yuan (I'll add these words if there are too many people using the name)
Sword finger offer 53 - I. find the number I in the sorted array
ctfhub--ssrf
网络一般知识(详)
VLAN and trunk port configuration
Project Performance Optimization Practice: solve the white screen problem of the home page, customize the loading animation to optimize the first screen effect
The difference between cookies and sessions
[unity development tips] unity mixer mixer controls global volume
Network layer transmission protocol (detailed)
随机推荐
逆元(名字太多人用我就加这几个字)
rsync远程同步(增量备份)
The JMeter BeanShell implementation writes the parameterized data generated by the request to the file
Leetcode buckle classic question - 42 Connect rainwater
Analysis of the paradise of metauniverse developers the ecological value of the metauniverse protocol caduceus
Use JMeter to test services based on websocket protocol
module_init函数底层原理
时间管理方法的反思与探讨
"Visual C # from getting started to mastering" personal learning arrangement
Detailed explanation of caduceus project of metauniverse public chain (I): project concept and technical framework of caduceus metaverse protocol
Understanding: what is interface and the concept of interface
Keep two decimal places and take values upward
[antv G2] how to solve the memory leak caused by G2
正则表达式
Gzip的动态压缩和静态压缩详解
全链路压测
[hsjframework] unity time management timemanger timer
InnoDB, MySQL structure, and the difference between the three kinds of deletion
流量回放工具gor使用经验
Shell脚本for、while循环语句、猜价格小游戏