Packet Tracer实现DHCPDNSNAT的实验
2011-08-01 10:02
411 查看
本实验使用PT来完成DHCP,NAT,DNS的一个实验集合,个人感觉很好玩的一个实验,虽然实验很简单,但是能够明确的表达出DHCP运行的过程,以及DNS运作同时还有NAT的转换。好了,开始:
实验拓扑
配置要点
PC0使用动态获取地址:
路由器DHCP的相关配置:
ip dhcp excluded-address 192.168.1.1 192.168.1.10
ip dhcp pool A
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 172.16.10.2
看下两个路由器的路由表:
R1#show ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/3/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.10.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 12.1.1.2
R2#show ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/3/0
C 202.102.224.0/24 is directly connected, FastEthernet0/0
R1上做了NAT:
ip nat pool A 12.1.1.1 12.1.1.1 netmask 255.255.255.0
ip nat inside source list 1 pool A overload
ip classless
ip route 0.0.0.0 0.0.0.0 12.1.1.2
access-list 1 permit 192.168.1.0 0.0.0.255
所以PC0可以和Server1通信:
PC>ping 202.102.224.68
Pinging 202.102.224.68 with 32 bytes of data:
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Reply from 202.102.224.68: bytes=32 time=93ms TTL=126
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Ping statistics for 202.102.224.68:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 93ms, Maximum = 94ms, Average = 93ms
查看R1的dubug信息:
R1#debug ip nat
IP NAT debugging is on
NAT: s=192.168.1.11->12.1.1.1, d=202.102.224.68 [17]
NAT*: s=202.102.224.68, d=12.1.1.1->192.168.1.11 [27]
最后看下Server0设置:
前边截图可以看到,PC0的DNS指向Server0,最后访问一下www.google.com:
看下Server1上的设置:
很好玩吧!
本文出自 “没兴趣” 博客,转载请与作者联系!
实验拓扑
配置要点
PC0使用动态获取地址:
路由器DHCP的相关配置:
ip dhcp excluded-address 192.168.1.1 192.168.1.10
ip dhcp pool A
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 172.16.10.2
看下两个路由器的路由表:
R1#show ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/3/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.10.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 12.1.1.2
R2#show ip route
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/3/0
C 202.102.224.0/24 is directly connected, FastEthernet0/0
R1上做了NAT:
ip nat pool A 12.1.1.1 12.1.1.1 netmask 255.255.255.0
ip nat inside source list 1 pool A overload
ip classless
ip route 0.0.0.0 0.0.0.0 12.1.1.2
access-list 1 permit 192.168.1.0 0.0.0.255
所以PC0可以和Server1通信:
PC>ping 202.102.224.68
Pinging 202.102.224.68 with 32 bytes of data:
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Reply from 202.102.224.68: bytes=32 time=93ms TTL=126
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Reply from 202.102.224.68: bytes=32 time=94ms TTL=126
Ping statistics for 202.102.224.68:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 93ms, Maximum = 94ms, Average = 93ms
查看R1的dubug信息:
R1#debug ip nat
IP NAT debugging is on
NAT: s=192.168.1.11->12.1.1.1, d=202.102.224.68 [17]
NAT*: s=202.102.224.68, d=12.1.1.1->192.168.1.11 [27]
最后看下Server0设置:
前边截图可以看到,PC0的DNS指向Server0,最后访问一下www.google.com:
看下Server1上的设置:
很好玩吧!
本文出自 “没兴趣” 博客,转载请与作者联系!
相关文章推荐
- Linux下的iptable实现nat网关。(DNS,DHCP,外网,内部局域网)
- 静态NAT、DHCP、标准ACL实验配置
- DNS,DHCP的备份恢复(批处理自动实现)
- 路由交换笔记(28)--ACL-NAT-VLAN-DHCP综合实验配置
- Packet Tracer 5.0 构建CCNA实验(3)—— 路由器实现vlan间通信
- DNS,DHCP的备份恢复(批处理自动实现)
- 【实验】通过DHCP服务器来实现不同VLAN间PC的IP自动获取
- 基于DNS的WEB负载均衡的两种方案实现及动静分离实验分析
- 服务器作为防火墙、NAT路由网关、DHCP、DNS最终配置
- win 2003 DC DHCP DNS WEB 集成实验
- 基本网络实验(DHCP、DNS、WINS)
- 实验:模拟实现智能DNS
- Packet Tracer 5.0建构CCNA实验攻略(11)――路由器实现Vlan间通信
- H3CNE实验(Vlan/Ftp/DHCP/DNS部分)
- CCNP实验:三层交换实现VLAN间DHCP中继代理
- NFS共享web资源,DNS轮询实现Web负载均衡的小实验
- 虚拟技术我做主之一: Vmware实现dhcp实验
- dhcp&dns&ftp实验文档
- nat实现dns转发
- Packet Tracer 5.0建构CCNA实验攻略(14)――PAT(基于端口的NAT)