NAT网络地址习题

Posted Faith丶信仰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NAT网络地址习题相关的知识,希望对你有一定的参考价值。

第一步

配置ip


打开http服务dns服务

 

 

 

 第二部

给r1进行一对多配置

[r2]acl 2000

[r2-acl-basic-2000]rule  permit source  192.168.0.0 0.0.255.255

[r2-acl-basic-2000]q

[r2]interface GigabitEthernet 0/0/2

[r2-GigabitEthernet0/0/2]nat outbound 2000

r1]acl 2000
[r1-acl-basic-2000]rule per	
[r1-acl-basic-2000]rule permit s	
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]na	
[r1-GigabitEthernet0/0/1]nat out	
[r1-GigabitEthernet0/0/1]nat outbound 2000

第三步

端口映射

[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 in	

[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 ins
ide 192.168.1.3 80
Warning:The port 80 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
[r1-GigabitEthernet0/0/1]
[r1-GigabitEthernet0/0/1]
[r1-GigabitEthernet0/0/1]nat s	
[r1-GigabitEthernet0/0/1]nat server p	
[r1-GigabitEthernet0/0/1]nat server protocol t	
[r1-GigabitEthernet0/0/1]nat server protocol tcp gl	
[r1-GigabitEthernet0/0/1]nat server protocol tcp global c	
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 8888 i
n	
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 8888 i
nside 192.168.1.4 80

pc1正常ping pc2

PC>ping 1.1.1.3

Ping 1.1.1.3: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
From 1.1.1.3: bytes=32 seq=3 ttl=126 time=63 ms
From 1.1.1.3: bytes=32 seq=4 ttl=126 time=94 ms
From 1.1.1.3: bytes=32 seq=5 ttl=126 time=62 ms

--- 1.1.1.3 ping statistics ---
  5 packet(s) transmitted
  3 packet(s) received
  40.00% packet loss
  round-trip min/avg/max = 0/73/94 ms

client访问server

 

 

以上是关于NAT网络地址习题的主要内容,如果未能解决你的问题,请参考以下文章

网络技术:NAT 网络地址转换及原理

华为NAT网络地址转换

NAT 网络地址转换

浅谈NAT概念及原理,配置NAT 网络地址转换---PAT端口地址转换;

网络地址转换(NAT)

网络地址转换NAT