路由器中常用链路协议实例(ppp和HDLC)

    技术2022-05-19  30

    串行链路上的封装概念HDLC的PPP封装的区别

     

    R1#sh int s2/0Serial2/0 is up, line protocol is up Hardware is M4TInternet address is 192.168.12.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, crc 16, loopback not set--------默认的封装格式是HDLCKeepalive set (10 sec)Restart-Delay is 0 secsLast input 00:00:06, output 00:00:03, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)Available Bandwidth 1158 kilobits/sec5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec113 packets input, 7732 bytes, 0 no bufferReceived 108 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort122 packets output, 8872 bytes, 0 underruns0 output errors, 0 collisions, 3 interface resets0 output buffer failures, 0 output buffers swapped out4 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=upR1#R1#R1#R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int s2/0R1(config-if)#enR1(config-if)#encapsulation ? atm-dxi ATM-DXI encapsulationbstun Block Serial tunneling (BSTUN)frame-relay Frame Relay networkshdlc Serial HDLC synchronouslapb LAPB (X.25 Level 2)ppp Point-to-Point protocolsdlc SDLCsdlc-primary SDLC (primary)sdlc-secondary SDLC (secondary)smds Switched Megabit Data Service (SMDS)stun Serial tunneling (STUN)x25 X.25

    R1(config-if)#encapsulation ppp---------------------实验PPP封装

    ----------------------------------------------

    R2(config-if)#int s2/0R2(config-if)#enR2(config-if)#encapsulation pppR2(config-if)#*Sep 23 09:27:39.315: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2(config-if)#^ZR2#*Sep 23 09:27:44.483: %SYS-5-CONFIG_I: Configured from console by consoleR2#sh int s2/0Serial2/0 is up, line protocol is up Hardware is M4TInternet address is 192.168.12.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation PPP, LCP OpenOpen: IPCP, CDPCP, crc 16, loopback not setKeepalive set (10 sec)Restart-Delay is 0 secsLast input 00:00:31, output 00:00:03, output hang neverLast clearing of "show interface" counters 00:01:36Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)Available Bandwidth 1158 kilobits/sec5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec29 packets input, 1388 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort30 packets output, 1396 bytes, 0 underruns0 output errors, 0 collisions, 0 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=upR2#R2#ping 192.168.12.1--------------同时封装PPP协议测试连通

    Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/83/116 msR2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#int s2/0R2(config-if)#enR2(config-if)#encapsulation hdlc-----------R1封装PPP,R2封装HDLCR2(config-if)#exit*Sep 23 09:30:57.755: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to downR2(config-if)#exit^ZR2#pi*Sep 23 09:30:59.227: %SYS-5-CONFIG_I: Configured from console by console*Sep 23 09:30:59.775: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2#ping 192.168.12.1

    Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:....*Sep 23 09:31:27.795: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to down.Success rate is 0 percent (0/5)R2#sh int s2/0Serial2/0 is up, line protocol is down -----------R1封装PPP,R2封装HDLC时,封装不匹配,造成链路故障Hardware is M4TInternet address is 192.168.12.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, crc 16, loopback not setKeepalive set (10 sec)Restart-Delay is 0 secsLast input 00:00:01, output 00:00:07, output hang neverLast clearing of "show interface" counters 00:00:38Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)Available Bandwidth 1158 kilobits/sec5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec4 packets input, 64 bytes, 0 no bufferReceived 4 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort8 packets output, 502 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets0 output buffer failures, 0 output buffers swapped out2 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=upR2#R2#


    最新回复(0)