HDLC配置<高级数据链路控制>

H3C设备之 HDLC_HDLC

配置路由器使用广域网封装协议:HDLC

[RTA]int e0/0

[RTA-Ethernet0/0]ip add 192.168.1.1 24

[RTA]int s0/0

[RTA-s0/0]ip add 10.1.1.1 24

[RTB]int e0/0

[RTB-Ethernet0/0]ip add 192.168.2.1 24

[RTB]int s0/0

[RTB-s0/0]ip add 10.1.1.2 24

PCA:192.168.1.2 255.255.255.0 GT:192.168.1.1

PCB:192.168.2.2 255.255.255.0 GT:192.168.2.1

[RTA]ip route-static 192.168.2.0 255.255.255.0 10.1.1.2

[RTB]ip route-static 192.168.1.0 255.255.255.0 10.1.1.1

此时PCAPCB可以互访:

C:\Documents and Settings\xiaofei>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=2ms TTL=254

Reply from 192.168.2.2: bytes=32 time<1ms TTL=254

Ping statistics for 192.168.2.2:

    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 2ms, Average = 1ms

Control-C

RTA S0/0接口上启用HDLC协议:

RTA]int s0/0

[RTA-s0/0]link-protocol hdlc

[RTA-s0/0]buadrate 9600

此时PCAPCB已经无法互访:

C:\Documents and Settings\xiaofei>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Request timed out.

Request timed out.

Request timed out.

Request timed out.

Ping statistics for 192.168.2.2:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

已经H3C 路由器默认封装是PPP协议,所以需要将RTBS0/0也配置为HDLC才行:
[RTB]int s0/0

[RTB-s0/0]link-protocol hdlc

此时接口都启用HDLC协议,PCAPCB又可以正常互访了:

[RTA] disp int s0/0

Serial0/0/0 current state: UP  

Line protocol current state: UP

Description: Serial0/0/0 Interface

The Maximum Transmit Unit is 1500, Hold timer is 10(sec) 

Internet Address is 10.1.1.1/24 Primary

Link layer protocol is HDLC

Output queue : (Urgent queuing : Size/Length/Discards)  0/50/0

Output queue : (Protocol queuing : Size/Length/Discards)  0/500/0 

Output queue : (FIFO queuing : Size/Length/Discards)  0/75/0

Interface is V35

    525 packets input,  7860 bytes

508 packets output,  7584 bytes

C:\Documents and Settings\xiaofei>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=15ms TTL=254

Reply from 192.168.2.2: bytes=32 time=1ms TTL=254

Reply from 192.168.2.2: bytes=32 time=1ms TTL=254

Reply from 192.168.2.2: bytes=32 time<1ms TTL=254

Ping statistics for 192.168.2.2:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 15ms, Average = 4ms