Wiki DE Start in the browser

Wiki › Protocols

Serial lines: HDLC, PPP and PPPoE

Point-to-point links between routers without ARP, the encapsulation HDLC or PPP with LCP and IPCP, and PPPoE with DSL.

Layer
2 (Sicherung)
Standard
RFC 1661, RFC 1662, RFC 1332 …
See an example
See demo

Point to point

A serial line connects exactly two routers. Because there is only one receiver, no MAC addresses and no ARP are needed. Such leased lines used to be the usual WAN connection between sites; the principle lives on in DSL and mobile networks.

Encapsulation

Both ends must use the same encapsulation, otherwise the line stays down:

EncapsulationProperties
HDLC (Cisco)simple, default on many routers, no negotiation
PPPnegotiates the connection: LCP (line), IPCP (IP addresses), optional authentication
Router(config)# interface serial0
Router(config-if)# encapsulation ppp
Router(config-if)# ip address 10.0.0.1/30

The port must first be set to “serial” in the form.

The PPP frame

PPP (RFC 1662)Frame · RFC 1662, RFC 1661
Flag1 bytes0x7E
Address1 bytes0xff
Control1 bytes0x03
Protocol2 bytes0x0021
Information≤ 1500 bytes60 Byte
FCS2 bytes0xef53
Flag1 bytes0x7E
Left to right, in the order the bytes are sent. Grey dashed: never part of a capture (layer 1 or line framing). Point at a field for an explanation.
FieldLengthExample valueMeaning
Flag (framing, not in captures)1 bytes0x7E0x7E marks the start and end of every frame on the line.
Address1 bytes0xffAlways 0xFF (all stations): a point-to-point line has only one other end.
Control1 bytes0x03Always 0x03 (unnumbered information).
Protocol2 bytes0x0021What is inside: 0x0021 IPv4, 0x0057 IPv6, 0xC021 LCP, 0x8021 IPCP (RFC 1661).
Information≤ 1500 bytes60 ByteThe packet or control message, at most 1500 bytes without negotiation (MRU).
FCS2 bytes0xef53Checksum FCS-16 over address to information (FCS-32 on request).
Flag (framing, not in captures)1 bytes0x7EClosing flag 0x7E (can also open the next frame).
Values: Real frame from the demo “Serial WAN link with PPP” (no. 12, 66 bytes), exactly as the packet list in leyoNET shows it.

PPPoE

With DSL, PPP runs over Ethernet: PPPoE. First the modem looks for the provider’s access concentrator (PADI, PADO, PADR, PADS), then LCP, authentication with user and password (PAP) and IPCP follow, which assigns the public address. More under Access technologies: DOCSIS, GPON, DSL and LTE.

How to do it in leyoNET

The same text as in the app’s help (F1 key).

Serial lines

Classic WAN line between two routers. No Ethernet, no MAC addresses; there is only one neighbour, so no ARP is needed.

  • Switch the router port to serial
  • Same encapsulation on both ends: HDLC (Cisco) or PPP
  • PPP negotiates the link with LCP and the addresses with IPCP

In the CLI: interface serial0, encapsulation ppp.

See an example

  • Demo “Serial WAN link with PPP” in leyoNETDemo “Serial WAN link with PPP” in leyoNET
    Serial WAN link with PPP

    Zurich and Bern connected by a serial line.

    LCP and IPCP negotiate the link, then IP packets flow without MAC addresses.

    Watch live Project file

“Watch live” opens the network in leyoNET, the simulation runs in a loop. In the app you find it under File → Demo networks, ready to present.

Practise

  • ★★★★☆ Sites over a serial line · 2 goals · Worksheet (German)

In leyoNET under Tools → Exercise catalogue. Every exercise checks itself.

What leyoNET simplifies

ProtocolLayerSimplification in the simulation
PPP (LCP, IPCP), Cisco HDLC2No authentication on serial lines; FCS-16 in the frame, flags and bit stuffing not (pcap without FCS)
PPPoE2Discovery (PADI/PADO/PADR/PADS) and session; login with PAP

Standards

  • RFC 1661 – The Point-to-Point Protocol (PPP)
  • RFC 1662 – PPP in HDLC-like Framing
  • RFC 1332 – The PPP Internet Protocol Control Protocol (IPCP)
  • RFC 2516 – A Method for Transmitting PPP Over Ethernet (PPPoE)

Read on

Found a mistake or have an idea? Source of this page on GitHub.