LAPB configuration example
Network requirements
As shown in Figure 135, run IP on the interfaces to transmit IP datagrams.
Figure 135: Network diagram
![](images/image131.png)
Configuration procedure
Configure Router A:
# Enter interface view.
<RouterA> system-view [RouterA] interface serial 2/0
# Assign an IP address for the interface.
[RouterA-Serial2/0] ip address 10.1.1.2 255.0.0.0
# Configure the link layer protocol of the interface as LAPB, and specify it to operate in DTE mode.
[RouterA -Serial2/0] link-protocol lapb dte
# Configure other LAPB parameters.
[RouterA-Serial2/0] lapb modulo 128 [RouterA-Serial2/0] lapb window-size 127 [RouterA-Serial2/0] shutdown [RouterA-Serial2/0] undo shutdown
Configure Router B:
# Enter interface view.
<RouterB> system-view [RouterB] interface serial 2/0
# Assign an IP address for the interface.
[RouterB-Serial2/0] ip address 10.1.1.1 255.0.0.0
# Configure the link layer protocol of the interface as LAPB, and specify it to operate in DCE mode.
[RouterB-Serial2/0] link-protocol lapb dce
# Configure other LAPB parameters.
[RouterB-Serial2/0] lapb modulo 128 [RouterB-Serial2/0] lapb window-size 127 [RouterB-Serial2/0] shutdown [RouterB-Serial2/0] undo shutdown
The IP addresses of the two connected interfaces must be on the same network segment. If they are not on the same network segment, configure a static route in between and make sure the traffic control parameters of both sides are the same.
Verifying the configuration
# Display information about interface Serial 2/0 on Router A.
[RouterA-Serial2/0] display interface serial 2/0 Serial2/0 current state: UP Line protocol current state: UP Description: Serial2/0 Interface The Maximum Transmit Unit is 1500, Hold timer is 10(sec) Internet Address is 10.1.1.2/8 Primary Link-protocol is LAPB LAPB DTE, module 128, window-size 127, max-frame 12032, retry 10 Timer: T1 3000, T2 1500, T3 0 , T4 0 (milliseconds), IP-protocol state CONNECT, VS 6, VR 0, Remote VR 6 IFRAME 0/6, RR 6/0, RNR 0/0, REJ 0/0 FRMR 0/1, SABM 3/19, DM 0/1, UA 0/1 DISC 0/0, invalid ns 0, invalid nr 0, link resets 0 Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0 Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0 Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0 Physical layer is synchronous, Virtual baudrate is 64000 bps Interface is DTE, Cable type is V24, Clock mode is DTECLK1 Last clearing of counters: Never Last 300 seconds input rate 2.26 bytes/sec, 18 bits/sec, 0.19 packets/sec Last 300 seconds output rate 2.54 bytes/sec, 20 bits/sec, 0.22 packets/sec Input: 627 packets, 7462 bytes 0 broadcasts, 0 multicasts 0 errors, 0 runts, 0 giants 0 CRC, 0 align errors, 0 overruns 0 dribbles, 0 aborts, 0 no buffers 0 frame errors Output:633 packets, 7737 bytes 0 errors, 0 underruns, 0 collisions 0 deferred DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP
# Display information about interface Serial 2/0 on Router B.
[RouterB-Serial2/0] display interface serial 2/0 Serial2/0 current state: UP Line protocol current state: UP Description: Serial2/0 Interface The Maximum Transmit Unit is 1500, Hold timer is 10(sec) Internet Address is 10.1.1.1/8 Primary Link-protocol is LAPB LAPB DCE, module 128, window-size 127, max-frame 12032, retry 10 Timer: T1 3000, T2 1500, T3 0 , T4 0 (milliseconds), IP-protocol state CONNECT, VS 66, VR 112, Remote VR 66 IFRAME 240/194, RR 1/44, RNR 0/0, REJ 0/0 FRMR 1/0, SABM 0/3, DM 1/0, UA 1/0 DISC 0/0, invalid ns 0, invalid nr 0, link resets 1 Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0 Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0 Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0 Physical layer is synchronous, Baudrate is 64000 bps Interface is DCE, Cable type is V24, Clock mode is DCECLK Last clearing of counters: Never Last 70 seconds input rate 6.69 bytes/sec, 53 bits/sec, 0.10 packets/sec Last 70 seconds output rate 0.30 bytes/sec, 2 bits/sec, 0.10 packets/sec Input: 865 packets, 20440 bytes 0 broadcasts, 0 multicasts 0 errors, 0 runts, 0 giants 0 CRC, 0 align errors, 0 overruns 0 dribbles, 0 aborts, 0 no buffers 0 frame errors Output:861 packets, 17678 bytes 0 errors, 0 underruns, 0 collisions 0 deferred DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP