配置HDLC——通过HDLC协议实现RTA与RTB广域网互通

1、HDLC配置命令

配置HDLC协议要先进入接口视图,然后用link-protocol将HDLC配置为链路层协议。配置的时候需要注意的是,链路两端的设备(路由器的接口)都需要配置为HDLC,否则无法通信。

设置HDLC协议轮询时间间隔,也应该进入接口视图,然后用timer hold seconds(0~32767)命令配置时间间隔,单位为秒。默认情况,接口的HDLC协议轮询时间间隔为10s.

2、HDLC示例

实验组网图如下:

首先配置RTA

<RT1>sys
System View: return to User View with Ctrl+Z.
[RT1]dis inter br
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface            Link Protocol Main IP         Description
GE0/0/0              DOWN DOWN     --
GE0/0/1              DOWN DOWN     --
GE0/0/2              DOWN DOWN     --
GE0/0/3              DOWN DOWN     --
NULL0                UP   UP(s)    --
S0/1/0               UP   UP       --
S0/1/1               DOWN DOWN     --
S0/1/2               DOWN DOWN     --
S0/1/3               DOWN DOWN     --

The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description
Eth0/4/0             DOWN 100M    A      A    1
Eth0/4/1             DOWN 100M    A      A    1
Eth0/4/2             DOWN 100M    A      A    1
Eth0/4/3             DOWN 100M    A      A    1
Eth0/4/4             DOWN 100M    A      A    1
Eth0/4/5             DOWN 100M    A      A    1
Eth0/4/6             DOWN 100M    A      A    1
Eth0/4/7             DOWN 100M    A      A    1

[RT1]inte s0/1/0
[RT1-Serial0/1/0]dis this(该命令是查看该接口是何协议)
#
interface Serial0/1/0
 link-protocol ppp
#
return
[RT1-Serial0/1/0]link-protocol hdlc
[RT1-Serial0/1/0]timer hold 15
[RT1-Serial0/1/0]ip add 1.1.1.1 30
[RT1-Serial0/1/0]quit  

然后RTB同样配置

<RT2>sys
System View: return to User View with Ctrl+Z.
[RT2]dis int br
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface            Link Protocol Main IP         Description
GE0/0/0              DOWN DOWN     --
GE0/0/1              DOWN DOWN     --
GE0/0/2              DOWN DOWN     --
GE0/0/3              DOWN DOWN     --
NULL0                UP   UP(s)    --
S0/1/0               UP   DOWN     --
S0/1/1               DOWN DOWN     --
S0/1/2               DOWN DOWN     --
S0/1/3               DOWN DOWN     --

The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface            Link Speed   Duplex Type PVID Description
Eth0/4/0             DOWN 100M    A      A    1
Eth0/4/1             DOWN 100M    A      A    1
Eth0/4/2             DOWN 100M    A      A    1
Eth0/4/3             DOWN 100M    A      A    1
Eth0/4/4             DOWN 100M    A      A    1
Eth0/4/5             DOWN 100M    A      A    1
Eth0/4/6             DOWN 100M    A      A    1
Eth0/4/7             DOWN 100M    A      A    1

[RT2]inter s0/1/0
[RT2-Serial0/1/0]dis this
#
interface Serial0/1/0
 link-protocol ppp
#
return
[RT2-Serial0/1/0]link-protocol hdlc
[RT2-Serial0/1/0]
%Oct 25 21:39:41:376 2018 RT2 IFNET/3/LINK_UPDOWN: Serial0/1/0 link status is DOWN.
%Oct 25 21:39:41:376 2018 RT2 IFNET/3/LINK_UPDOWN: Serial0/1/0 link status is UP.
[RT2-Serial0/1/0]timer hold 15
[RT2-Serial0/1/0]ip add 1.1.1.2 30
[RT2-Serial0/1/0]quit

检查路由器广域网之间的互通性

在RTA上同ping命令检查RTA与RTB之间的互通性

<RT1>ping 1.1.1.2
  PING 1.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=255 time=11 ms
    Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=255 time=4 ms
    Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=255 time=25 ms
    Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=255 time=140 ms
    Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=255 time=140 ms

  --- 1.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/64/140 ms

<RT1>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值