频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

CCIE实验笔记之- 第1章 WAN协议(HDLC)

来源: 作者: 出处:巧巧读书 2006-11-06 进入讨论组
下一页 1 2 3 4 
第 1 章    WAN协议(HDLC)
1.1         HDLC协议概述
高级数据链路控制(HDLC)是一种高效协议,Cisco版的HDLC协议和各厂商均不兼容,主要有以下特点:
  • 与其它厂商不兼容
  • 快速,高效
  •  支持keepalive机制
  •  支持SLARP
  •  支持STAC
Cisco路由器默认的串口封装即为HDLC,可以通过show interface serial 1/0的输出看到默认的设置:
例1-1 通过show interface serial 1/0的输出结果:
Serial1/1 is administratively down, line protocol is down
 Hardware is M4T
 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
 Encapsulation HDLC, crc 16, loopback not set
 Keepalive set (10 sec)
 Restart-Delay is 0 secs
 Last input never, output never, output hang never
 Last clearing of "show interface" counters never
 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
 Queueing strategy: weighted fair
 Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations 0/0/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 1158 kilobits/sec
 5 minute input rate 0 bits/sec, 0 packets/sec
 5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 output buffer failures, 0 output buffers swapped out
     1 carrier transitions     DCD=down DSR=down DTR=up RTS=up CTS=down
接口的详细参数可以参考本人blog上的《通过串行接口的信息获得故障诊断帮助》一文。
HDLC需要的控制开销很小,1个位和一个结束标志字段,一个可变地址字段,一个控制字段和一个信息长度字段。整个数据帧长度控制在7-12个byte。
利用keepalive机制验证连接完整性,DCE端发送序列号到DTE端,DTE按顺序返回,如果序列号连续丢失3次,即关闭此链路。例1-2中可以看到链路由于没有收到keepalive信号返回而断开。使用debug serial interface 命令看到相关的keepalive信息。
例1-2 HDLC帧上没有收到keepalive
R1#debug serial interface
Serial network interface debugging is on
01:05:47: Serial1/0: HDLC myseq 6, mineseen 6, yourseen 2, line up ßkeepalive KA 
01:12:11: Serial1/0: HDLC myseq 7, mineseen 6, yourseen 2, line up  ßKA not received
01:12:21: Serial1/0: HDLC myseq 8, mineseen 6, yourseen 2, line down   ßstill not KA
01:12:31: Serial1/0: HDLC myseq 9, mineseen 6, yourseen 2, line down
01:12:32: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
01:12:41: Serial1/0: HDLC myseq 10, mineseen 6, yourseen 2, line down
例1-2中,序列号myseq字段与mineseen字段不匹配,相差大于3,表明keepalive已经丢失3次以上,即重新初始化该链路。另一台路由器的keepalive在yourseen字段中显示。例1-3显示了解决些问题后的调试结果:
例1-3         正常工作时的HDLC链路调试结果
01:20:11: Serial1/0: HDLC myseq 55, mineseen 0*, yourseen 1, line up
01:20:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
01:20:21: Serial1/0: HDLC myseq 56, mineseen 56*, yourseen 2, line up
01:20:31: Serial1/0: HDLC myseq 57, mineseen 57*, yourseen 3, line up
01:20:41: Serial1/0: HDLC myseq 58, mineseen 58*, yourseen 4, line up
01:20:51: Serial1/0: HDLC myseq 59, mineseen 59*, yourseen 5, line up
01:21:01: Serial1/0: HDLC myseq 60, mineseen 60*, yourseen 6, line up
01:21:11: Serial1/0: HDLC myseq 61, mineseen 61*, yourseen 7, line up
01:21:21: Serial1/0: HDLC myseq 62, mineseen 62*, yourseen 8, line up
01:21:31: Serial1/0: HDLC myseq 63, mineseen 63*, yourseen 9, line up
 
只有链路的layer 1正常工作时,交换keepalive机制才有效。如果DCD=up DSR=up DTR=up RTS=up CTS=up这些项中有一项是down状态,keepalive就不工作。
  HDLC通过使用STAC压缩算法支持有效载荷压缩。使用的是压缩技术是Lempel-Ziv压缩算法,能提供良好压缩率,但是占用CPU资源。也适用于LAPB、X.25和帧中继。
1.1.1           HDLC设置
HDLC是串口的默认封装,可以分为3个步骤:
第1步 encapsulation hdlc   配置数据封装格式为HDLC
第2步 clock rate clock_speed   对DCE端设备设置时钟,在背背实验时设置
第3步 compression stac       配置压缩(可选)
打开: http://www.qqread.com/network/tech/p273307.html 更多文章 更多内容请看TCP/IP协议SIP协议---NGN网络的核心协议协议大全专题,或进入讨论组讨论。
下一页 1 2 3 4 
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
最新论坛文章
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章