Packet Tracer 5.0建构CCNA实验攻略——帧中继Frame Relay

  Packet Tracer 5.0是一款非常不错的Cisco(思科)网络设备模拟器,对于想考思科初级认证(如CCNA)的朋友们来说,Packet Tracer 5.0是非常不错的选择。通常我们周围并没有那么多思科的设备供我们学习调试,参加培训费用很贵,上机实践的机会还是有限的,利用Packet Tracer 5.0练习思科IOS操作命令很不错的。近日,在网上下载了思科CCNA640-802指导用书,打算根据此教程与诸位网友共同分享Packet Tracer 5.0的使用方法与技巧,也借此抛砖引玉。

  帧中继是一种用于连接计算机系统的面向分组的通信方法。它主要用在公共或专用网上的局域网互联以及广域网连接。大多数公共电信局都提供帧中继服务,把它作为建立高性能的虚拟广域连接的一种途径。帧中继是进入带宽范围从56Kbps到1.544Mbps的广域分组交换网的用户接口。帧中继是从综合业务数字网中发展起来的,并在1984年推荐为国际电话电报咨询委员会(CCITT)的一项标准,另外,由美国国家标准协会授权的美国TIS标准委员会也对帧中继做了一些初步工作。

  数据链路连接标识符(DLCI) 这个信息包含标识号,它标识多路复用到通道的逻辑连结。帧中继交换机将两端的DLCI关联起来,它是帧中继帧格式中地字段的一个重要部分之一,这是个6位标识,表示正在进行的客户和服务器之间的连接,用于RFCOMM 层。 帧中继使用DLCI来标识DTE和服务商交换机之间的虚电路。DLCI字段的长度一般为10bit,但也可扩展为16bit,前者用二字节地址字段,后者是三字节地址字段。23bit用四字节地址字段。DLCI值用于标识永久虚电路(PVC),呼叫控制或管理信息。DLCI只具有本地意义。

  一、使用Packet Tracer 5.0构建帧中继仿真
  添加三个2811路由器和一个云


图一

图二 给2811添加一个具有串口的模块

图三

图四 把路由器2811的串口与云的串口相连,路由器的串口为DTE

图五 实验拓扑图及IP地址、DLCI分配

  二、配置Frame Relay
以Router2为例,其它两个路由器相似,\\后是人为添加的注释,在实际配置时不存在
Router>en   \\进入特权配置模式
Router#conf t  \\进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain-lookup \\取消名称解析
Router(config)#hostname Router2  \\配置路由器的名字
Router2(config)#int fa0/1      \\进入接口配置模式
Router2(config-if)#ip address 172.18.1.1 255.255.255.0  \\配置ip地址
Router2(config-if)#no shut  \\激活端口

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router2(config-if)#int serial0/3/0
Router2(config-if)#encapsulation frame-relay  \\对串口serial0/3/0进行frame-relay封装
Router2(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/3/0, changed state to up
Router2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0, changed state to up
Router2(config-if)#interface serial0/3/0.1 point-to-point  \\进入串口的子接口配置模式

%LINK-5-CHANGED: Interface Serial0/3/0.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0.1, changed state to upRouter2

(config-subif)#ip address 192.168.1.1 255.255.255.0 \\为子接口配置IP地址
Router2(config-subif)#description Link Router1 DLCI 30  \\为子接口添加描述
Router2(config-subif)#frame-relay interface-dlci 40     \\配置DLCI
Router2(config-subif)#interface serial0/3/0.2 point-to-point

%LINK-5-CHANGED: Interface Serial0/3/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0.2, changed state to upRouter2

(config-subif)#ip address 192.168.3.1 255.255.255.0
Router2(config-subif)#description link to Router0 DLCI20
Router2(config-subif)#frame-relay interface-dlci 41
Router2(config-subif)#end
%SYS-5-CONFIG_I: Configured from console by console
Router2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#router eigrp 100      \\在路由器上启用EIGRP路由协议
Router2(config-router)#network 172.18.0.0  \\通告与自己直接想连的网段
Router2(config-router)#network 192.168.3.0
Router2(config-router)#network 192.168.1.0
Router2(config-router)#
%SYS-5-CONFIG_I: Configured from console by console
Router2#copy running-config startup-config  \\保存配置
Destination filename [startup-config]?
Building configuration...
[OK]
Router2#

路由器Router0的配置:

Router0#sh running-config
Building configuration...

Current configuration : 830 bytes
!
version 12.4
no service password-encryption
!
hostname Router0
!
!
!
!
!
ip ssh version 1
no ip domain-lookup
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/3/0
no ip address
encapsulation frame-relay
!
interface Serial0/3/0.1 point-to-point
description Link to Router 2
ip address 192.168.3.2 255.255.255.0
frame-relay interface-dlci 20
!
interface Serial0/3/0.2 point-to-point
description Link to Router1
ip address 192.168.2.2 255.255.255.0
frame-relay interface-dlci 21
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 172.16.0.0
network 192.168.3.0
network 192.168.2.0
auto-summary
!
ip classless
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
end
路由器Router1的配置
Router1#sh running-config
Building configuration...

Current configuration : 843 bytes
!
version 12.4
no service password-encryption
!
hostname Router1
!
!
!
!
!
ip ssh version 1
no ip domain-lookup
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
ip address 172.17.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/3/0
no ip address
encapsulation frame-relay
!
interface Serial0/3/0.1 point-to-point
description link to Router2 DLCI40
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 30
!
interface Serial0/3/0.2 point-to-point
description link to router0 DLCI21
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 31
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 192.168.1.0
network 192.168.2.0
network 172.17.0.0
auto-summary
!
ip classless
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
end

路由器Router2的配置

Router2#sh running-config
Building configuration...

Current configuration : 841 bytes
!
version 12.4
no service password-encryption
!
hostname Router2
!
!
!
!
!
ip ssh version 1
no ip domain-lookup
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
ip address 172.18.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/3/0
no ip address
encapsulation frame-relay
!
interface Serial0/3/0.1 point-to-point
description Link Router1 DLCI 30
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 40
!
interface Serial0/3/0.2 point-to-point
description link to Router0 DLCI20
ip address 192.168.3.1 255.255.255.0
frame-relay interface-dlci 41
!
interface Vlan1
no ip address
shutdown
!
router eigrp 100
network 172.18.0.0
network 192.168.3.0
network 192.168.1.0
auto-summary
!
ip classless
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
end

路由器配置完毕后,还需要配置Cloud0。


图六 根据路由器的相关配置,给Cloud0的serial0配置DLCI及LMI类型

图七 根据路由器的相关配置,给Cloud0的serial1配置DLCI及LMI类型

图八 根据路由器的相关配置,给Cloud0的serial2配置DLCI及LMI类型

图九 根据路由器的相关配置,配置Cloud0的Frame Relay

  三、配置各个计算机,并使用ping命令校验网络的连通性

pc0

PC>ipconfig

IP Address......................: 172.16.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 172.16.1.1

PC>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time=141ms TTL=254
Reply from 192.168.1.1: bytes=32 time=110ms TTL=254
Reply from 192.168.1.1: bytes=32 time=143ms TTL=254
Reply from 192.168.1.1: bytes=32 time=110ms TTL=254

Ping statistics for 192.168.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 143ms, Average = 126ms

PC>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=62ms TTL=255
Reply from 192.168.2.2: bytes=32 time=62ms TTL=255
Reply from 192.168.2.2: bytes=32 time=47ms TTL=255
Reply from 192.168.2.2: bytes=32 time=63ms TTL=255

Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 47ms, Maximum = 63ms, Average = 58ms

PC>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:

Reply from 192.168.3.1: bytes=32 time=109ms TTL=254
Reply from 192.168.3.1: bytes=32 time=125ms TTL=254
Reply from 192.168.3.1: bytes=32 time=93ms TTL=254
Reply from 192.168.3.1: bytes=32 time=94ms TTL=254

Ping statistics for 192.168.3.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 93ms, Maximum = 125ms, Average = 105ms


PC>ping 172.17.1.1

Pinging 172.17.1.1 with 32 bytes of data:

Reply from 172.17.1.1: bytes=32 time=110ms TTL=254
Reply from 172.17.1.1: bytes=32 time=112ms TTL=254
Reply from 172.17.1.1: bytes=32 time=123ms TTL=254
Reply from 172.17.1.1: bytes=32 time=110ms TTL=254

Ping statistics for 172.17.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 123ms, Average = 113ms

PC>ping 172.18.1.1

Pinging 172.18.1.1 with 32 bytes of data:

Reply from 172.18.1.1: bytes=32 time=140ms TTL=254
Reply from 172.18.1.1: bytes=32 time=109ms TTL=254
Reply from 172.18.1.1: bytes=32 time=110ms TTL=254
Reply from 172.18.1.1: bytes=32 time=125ms TTL=254

Ping statistics for 172.18.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 109ms, Maximum = 140ms, Average = 121ms

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Packet Tracer 5.0是Cisco Systems开发的一款网络模拟器软件,可用于CCNA实验和模拟网络构建。在这个实验攻略的第14部分中,我们将学习如何配置Port Address Translation(PAT)。 PAT是一种网络地址转换技术,用于将多个内部IP地址映射到单个公共IP地址。这在企业网络中非常常见,因为它允许多个内网设备通过单个公网IP地址访问外部Internet。 在Packet Tracer中,我们可以使用两台路由器和两台PC来模拟这个实验。以下是一些步骤来配置PAT: 1. 在Packet Tracer中创建一个新的实验并添加两台路由器和两台PC。将路由器连接到互联网,并将PC连接到路由器的局域网接口。 2. 配置路由器的基本设置,如主机名、密码和路由。确保路由器能够访问互联网。 3. 配置路由器的局域网接口,分配私有IP地址(例如192.168.1.0/24)。 4. 配置路由器的广域网接口,使用公共IP地址。这个IP地址将用于PAT。 5. 在路由器上启用NAT(Network Address Translation)。使用以下命令: ``` Router(config)# ip nat inside source list 1 interface <interface> overload ``` 这里的`<interface>`是连接到互联网的接口。列表1是一个包含要进行PAT的内部地址范围的访问列表。 6. 创建访问列表,指定要进行NAT转换的内部地址范围。使用以下命令: ``` Router(config)# access-list 1 permit <ip range> ``` 这里的`<ip range>`是内部IP地址范围。 7. 最后,测试连接。从PC1上启动一个Web浏览器,并尝试访问外部Internet。你应该能够成功访问,并且在路由器的NAT转换表中看到相应的PAT条目。 通过以上步骤,你将成功地配置了PAT,并能够实现多个内部设备通过单个公共IP地址访问互联网。这是CCNA考试中一个重要的主题,而Packet Tracer的使用可以帮助我们更好地理解和实践这个概念。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值