Packet Tracer(第二期)--7NAT

NAT–PKA下载地址
拓扑图
在这里插入图片描述

地址分配表

在这里插入图片描述

VLAN 和端口分配表

在这里插入图片描述
场景

本总结练习包括您在本课程中获得的许多技能。首先,您将完成对网络的文档化。所以,请确保您有说明的打印版本。在实施期间,您需要配置交换机上的 VLAN、中继、端口安全和 SSH 远程访问。接下来,您将在路由器上实施 VLAN 间路由和 NAT。最后,您将使用文档通过测试端到端的连接来检验实施。

文档

您需要完整记录网络。您需要打印该指令集,其中包括一个未标记的拓扑图:

  • 标记所有设备名称、网络地址以及 Packet Tracer 生成的其他重要信息。
  • 完成“地址分配表 ”和“VLAN 和端口分配表 ”。
  • 填写实施 和检验 步骤中的任何空白。当您开始 Packet Tracer 练习时,将为您提供信息。
    实施

注意:拓扑中的所有设备,除 Central 、Cnt-Sw 和 NetAdmin 外,均已配置完全。您无权访问其他路由器。为了便于测试,您可以访问所有服务器和 PC。

使用您的文档实施以下要求:

Cnt-Sw

· 配置远程管理访问(包括 IP 编址和 SSH):

  • 域为 cisco.com
Cnt-Sw(config)#ip domain-name cisco.com
  • 用户 CAdmin ,密码为 itsasecret
Cnt-Sw(config)#username CAdmin password itsasecret
  • 加密密钥长度为 1024
Cnt-Sw(config)#crypto key generate rsa
How many bits in the modulus [512]: 1024
  • SSH 第 2 版,限制为 2 次身份验证尝试和 60 秒的超时时间
Cnt-Sw(config)#ip ssh version 2
Cnt-Sw(config)#ip ssh authentication-retries 2
Cnt-Sw(config)#ip ssh time-out 60
  • 应加密明文密码。
Cnt-Sw(config)#service password-encryption

· 配置、命名和分配 VLAN。端口应手动配置为接入端口。
vlan 60的ip地址加2,网关地址加1

Cnt-Sw(config)#vlan 15
Cnt-Sw(config-vlan)#name service
Cnt-Sw(config-vlan)#vlan 30
Cnt-Sw(config-vlan)#name PCs
Cnt-Sw(config-vlan)#vlan 45
Cnt-Sw(config-vlan)#name native
Cnt-Sw(config-vlan)#vlan 60
Cnt-Sw(config-vlan)#Name management
Cnt-Sw(config-vlan)#int rang f0/11-20
Cnt-Sw(config-if-range)#sw mod acc
Cnt-Sw(config-if-range)#sw acc vl 15
Cnt-Sw(config-if-range)#int rang f0/1-10
Cnt-Sw(config-if-range)#sw mod acc
Cnt-Sw(config-if-range)#sw acc vl 30
Cnt-Sw(config-if)#int vl 60
Cnt-Sw(config-if)#ip add 10.10.10.146 255.255.255.240
Cnt-Sw(config-if)#ip default-gateway 10.10.10.145

· 配置中继。

Cnt-Sw(config-if-range)#int g0/1
Cnt-Sw(config-if)#sw mod tr
Cnt-Sw(config-if)#sw tr native vl 45

· 实施端口安全:

  • 在 Fa0/1 上,当检测到 MAC 地址时,允许 2 个 MAC 地址自动添加到配置文件中。不应禁用端口,但当发生违规时,应捕获 syslog 消息。
Cnt-Sw(config)#int f0/1
Cnt-Sw(config-if)#sw mod acc
Cnt-Sw(config-if)#sw port-security
Cnt-Sw(config-if)#sw port-security max 2
Cnt-Sw(config-if)#sw port-security mac-address sticky
Cnt-Sw(config-if)#sw port-security violation restrict
  • 禁用其他所有未使用的端口。
Cnt-Sw(config-if)#int range fa0/21-24,g1/2
Cnt-Sw(config-if)#sh

Central

· 配置 VLAN 间路由。

Central(config-subif)#int g0/0.15
Central(config-subif)#en dot1q 15
Central(config-subif)#ip add 10.10.10.161 255.255.255.224
Central(config-subif)#ip nat inside
Central(config-subif)#int g0/0.30
Central(config-subif)#en dot1q 30
Central(config-subif)#ip add 10.10.10.193 255.255.255.192
Central(config-subif)#ip nat inside
Central(config-subif)#int g0/0.45
Central(config-subif)#en dot1q 45 native
Central(config-subif)#ip add 10.10.10.129 255.255.255.240
Central(config-subif)#int g0/0.60
Central(config-subif)#en dot1q 60
Central(config-subif)#ip add 10.10.10.145 255.255.255.240
Central(config-subif)#ip nat inside

· 配置 VLAN 30 中的 DHCP 服务。将 LAN 用作区分大小写的池名称。
在这里插入图片描述

Central(config)#ip dhcp pool LAN
Central(dhcp-config)#net 10.10.10.192 255.255.255.192
Central(dhcp-config)#default-router 10.10.10.193

· 实施路由:

  • 使用 OSPF 进程 ID 1 和路由器 ID 1.1.1.1
Central(config-subif)#router ospf 1
Central(config-router)#router-id 1.1.1.1
  • 为整个 10.10.10.0/24 地址空间配置一条 network 语句
Central(config-router)#net 10.10.10.0 0.0.0.255 area 0
  • 禁用不应发送 OSPF 消息的接口。
Central(config-router)#passive-interface g0/0
Central(config-router)#passive-interface g0/0.15
  • 配置通往互联网的默认路由。
Central(config)#ip route 0.0.0.0 0.0.0.0 Serial0/1/0

· 实施 NAT:

  • 配置一个只含一条语句,编号为 1 的标准 ACL。允许所有属于 10.10.10.0/24 地址空间的 IP 地址。
Central(config)#access-list 1 permit 10.10.10.0 0.0.0.255
Central(config)#ip nat pool TEST 198.133.219.128 198.133.219.129 netmask 255.255.255.252
  • 参考您的文档,为文件服务器配置静态 NAT。
Central(config)#ip nat inside source static 10.10.10.162 198.133.219.130
Central(config)#ip nat inside source list 1 pool TEST overload
  • 通过 PAT 使用您选择的池名称和这两个公有地址配置动态 NAT: 64.100.32.56 and 64.100.32.57

NetAdmin
检验 NetAdmin 是否已收到来自 Central 的完整编址信息。

验证
所有设备现在应能够对所有其他设备执行 ping 操作。否则,请对配置进行故障排除以隔离和解决问题。测试包括:

· 从 PC 使用 SSH 检验对 Cnt-Sw 的远程访问。
· 检验 VLAN 是否已分配给适当的端口,端口安全是否生效。
· 检验 OSPF 邻居和完整的路由表。
· 检验 NAT 转换和静态路由。

  • 外部主机 应该可以通过公有地址访问文件服务器 。
  • 内部 PC 应该可以访问 Web 服务器 。

交换机Cnt-Sw配置

Cnt-Sw>enable
Cnt-Sw#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Cnt-Sw(config)#ip domain-name cisco.com
Cnt-Sw(config)#username CAdmin password itsasecret
Cnt-Sw(config)#crypto key generate rsa
The name for the keys will be: Cnt-Sw.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024
Cnt-Sw(config)#ip ssh version 2
Cnt-Sw(config)#ip ssh authentication-retries 2
Cnt-Sw(config)#ip ssh time-out 60
Cnt-Sw(config)#line vty 0 15
Cnt-Sw(config-line)#login local
Cnt-Sw(config-line)#transport input ssh
Cnt-Sw(config-line)#service password-en
Cnt-Sw(config)#vlan 15
Cnt-Sw(config-vlan)#name service
Cnt-Sw(config-vlan)#vlan 30
Cnt-Sw(config-vlan)#name PCs
Cnt-Sw(config-vlan)#vlan 45
Cnt-Sw(config-vlan)#name native
Cnt-Sw(config-vlan)#vlan 60
Cnt-Sw(config-vlan)#Name management
Cnt-Sw(config-vlan)#int rang f0/11-20
Cnt-Sw(config-if-range)#sw mod acc
Cnt-Sw(config-if-range)#sw acc vl 15
Cnt-Sw(config-if-range)#int rang f0/1-10
Cnt-Sw(config-if-range)#sw mod acc
Cnt-Sw(config-if-range)#sw acc vl 30
Cnt-Sw(config-if-range)#int g0/1
Cnt-Sw(config-if)#sw mod tr
Cnt-Sw(config-if)#sw tr native vl 45
Cnt-Sw(config-if)#int vl 60
Cnt-Sw(config-if)#ip add 10.10.10.146 255.255.255.240
Cnt-Sw(config-if)#ip default-gateway 10.10.10.145
Cnt-Sw(config)#int f0/1
Cnt-Sw(config-if)#sw mod acc
Cnt-Sw(config-if)#sw port-security
Cnt-Sw(config-if)#sw port-security max 2
Cnt-Sw(config-if)#sw port-security mac-address sticky
Cnt-Sw(config-if)#sw port-security violation restrict
Cnt-Sw(config)#int f0/21
Cnt-Sw(config-if)#sh
Cnt-Sw(config-if)#int g0/2
Cnt-Sw(config-if)#sh

路由器Central配置

Central>enable
Central#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Central(config)#ip dhcp pool LAN
Central(dhcp-config)#net 10.10.10.192 255.255.255.192
Central(dhcp-config)#default-router 10.10.10.193
Central(dhcp-config)#int g0/0
Central(config-if)#no sh
Central(config-subif)#int g0/0.15
Central(config-subif)#en dot1q 15
Central(config-subif)#ip add 10.10.10.161 255.255.255.224
Central(config-subif)#ip nat inside
Central(config-subif)#int g0/0.30
Central(config-subif)#en dot1q 30
Central(config-subif)#ip add 10.10.10.193 255.255.255.192
Central(config-subif)#ip nat inside
Central(config-subif)#int g0/0.45
Central(config-subif)#en dot1q 45 native
Central(config-subif)#ip add 10.10.10.129 255.255.255.240
Central(config-subif)#int g0/0.60
Central(config-subif)#en dot1q 60
Central(config-subif)#ip add 10.10.10.145 255.255.255.240
Central(config-subif)#ip nat inside
Central(config-subif)#router ospf 1
Central(config-router)#router-id 1.1.1.1
Central(config-router)#passive-interface g0/0
Central(config-router)#net 10.10.10.0 0.0.0.255 area 0
Central(config-router)#int s0/0/0
Central(config-if)#ip nat inside
Central(config-if)#int s0/0/1
Central(config-if)#ip nat inside
Central(config-if)#int s0/1/0
Central(config-if)#ip nat outside
Central(config)#ip nat pool TEST 198.133.219.128 198.133.219.129 netmask 255.255.255.252
Central(config)#ip nat inside source list 1 pool TEST overload
Central(config)#ip nat inside source static 10.10.10.162 198.133.219.130
Central(config)#ip route 0.0.0.0 0.0.0.0 Serial0/1/0
Central(config)#access-list 1 permit 10.10.10.0 0.0.0.255
Central(config)#end
  • 16
    点赞
  • 45
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值