一.要求
R2为ISP路由器,其上只能配置ip地址,不得再进行其他的任何配置
PC1-PC2可以ping通客户平板和DNS服务器;
客户端可以通过域名访问http1,通过地址访问HTTP2
R1为边界路由器,!其上只有一个公有ip地址
拓扑图:
子网划分:
192.168.1.0/24
192.168.2.0/24 主干
192.168.3.0/24
二.底层--所有节点拥有合法ip地址
r1:
r1上配置dhcp服务:
pc1:
pc2:
http1:
http2:
dns:
平板:
三.nat配置
r1:
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80 in
side 192.168.1.10 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]nat server protocol tcp global current-interface 8888
inside 192.168.1.20 80
[r1-GigabitEthernet0/0/1]q
[r1]acl 2000
[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]nat outbound 2000
[r1-GigabitEthernet0/0/1]q
[r1]ip route-static 0.0.0.0 0 192.168.2.2
pc1 ping平板和dns:
pc2?ping平板和dns:
平板访问HTTP1和HTTP2: