7.Intro to WAN
HDLC | PPP | PPPoE
Layer 2

Principles and configuration of HDLC and PPP

Principles and configuration of PPPoE

in recent uears > serial has been slowly phased out in many parts of all Nets in favor of Ethernet technos
however it still remains ative as legacy tech in great number of enterpise Nets alongside Ethernet
in our Neret we have local and wide area Nets
in local most important tech is Ethernet
in wide which helps us connect to the internet we need to use HDLC and PPP protocols

how Data is carried over a serial based medium

link layer prootocols configs for serial links

Serial Signaling
in serial signaling which is in serial port we have 2 kinds of signaling

Sychronous
in Synchronous Net we have 2 ends > one end is DCE Data CircuitTerminating Equipment and the other end is DTE DataTerminalEquipment
and we must have a clock for the synchronization betwenn the 2 ends
in this Net the Data unit will be the frame soo frame can be whatever size it must be // Flags are used to mark the Start and end of 1 Frame
Frame >> Flag Data Flag

ASychronous
when we send the data > the sending unit is the byte which means every time we can send one byte of data and in these bytes we must mark the start of the byte and the stop >> soo lot of start and stops bits > lot of ports for thiese data >> not very efficient
1 Byte >> Stop Data Start

HDLC High-level Data Link Control protocol
supports asynchronous and synchronous Network
Only the information frame type I is used on AR2200 huawei series

Address (link layer address of the frame)

Control > type of frame > I Information / S Supervisory / U Unnumbered

Flag (start)

Information

FCS

Flag (end)

Basic Configs of HDLC

[RT]>interface Serial 1/0/0
[RT-Serial1/0/0]>link-protocol hdlc (ppp by default)
[RT-Serial1/0/0]>ip address 10.0.1.1 30 (for the interface)

Assigning Unumbered Address in HDLC
when we dont enough ip addresses in our Router > IP addresses can be borrowed from another interface in order to establish connectivity over the serial link

[RT]>interface Serial 1/0/0
[RT-Serial1/0/0]>link-protocol hdlc (ppp by default)
[RT-Serial1/0/0]>ip addres unnumbered interface loopBack 0 (borrow from loopback interface)

Config Validation
the IP address is shown to be borrowed from the loopback interface and assigned to interface serial 1/0/0

[RT]>display ip interface brief

PPP P2P Protocol Application
a multiprotocol standard used as with HDLC to define the link layer operation over a serial medium (default P under Huawei Devices)

Components of PPP
Name > Function

PPP encapsulation Method > format used when supporting upper layer ps such as IP IPX
LCP Link Control P > method of establishing configuring and negotiating and testing the data-link connection
NCP Net Control P > set of Ps for establishing a connction and negotiating params for diffrent Net-layer ps

PPP Link Establishemnt Process

Dead

LInk UP >Establish
using LCP to nego link layer parsms
such as magic number and auth type

FAIL > Dead

Opened > Athenticat

FAIL > Terminate

SUCCESS/NONE > Network
using the NCP to negotiate the Net Layer P
such as IP address

When Closing > Terminate

link is DOWN > Dead

PPP Frame

Address

Control

Protocol

Information

FCS

Flag

Flag

Code

Data

Length

Identifier

Packet Type Used in LCP negotiation
using PacketTypes to Negotiate link layer

Configure-Request
Configure-Ack
Configure-Nck
Configure-Reject


Common Link Params of LCP Negotiations
PArameter (Default)

MRU Maximum Recieve Unit (1500) > total len of the into and padding field for the ppp frame
Authentification Protocol (No Auth) > used by the peer
Magic-Number (Enable) > generated randomly used for link-loop detection


LCP Link Parameter Negotiation

successful PPP negotiations result in a Configure-Ack reply to a Configure-Request packet
Configure-Nak packets are generated where params are recognized but not all are accepted
Configure-Reject packets are generated where not all params are recognized by the peer

PPP

PPP Basic Configuraiton

[RT]>interface Serial 1/0/0
[RT-Serial1/0/0]>link-protocol ppp (ppp by default)
[RT-Serial1/0/0]>ip address 10.0.1.1 30 (for the interface)

PPP Authentification Modes

Authentification

PAP
one side Router B is authenticated and the other side Router B is the Authenticator > Router B sends Authentication Request containing username and passwd in plaintect and Router A check and sends Authenticate Ack / if not Nak

The Password Athentification P relies on the transmission of a passwd over the link for peer authentification

CHAP
more secure uses 3way handshake
Router A Authenticator sends the Challenge packet tp Router B > challenge packet dosent contain any passwd > contains a sequence number which Router B will use with its passwork to md5 calculation that will be sent back as reponse to Router A to check the validity of the Encrypted passwd >> success/Failiure

The Challenge HandShake Authentication Protocol relies on a challenge and challenge response for peer authentication

IPCP Address Negotiation

IPCP Static Address Negotiation
NCP dep on what kind of P is used for ip addressing soo the NCP P will be IPCP p
soo IPCP will help us to negotiate the IP address of each Router btw each other

The internet Protocol Control Protocol IPCP is the Network Control P NCP used for establishing and configuring IP

IPCP Dynamic Address Negotiation
sometimes IPCP can also help us to obtain t he Ip address from the remote site

Configuring PAP Auth
Authenticator

[RT]>aaa
[RTA-aaa]>local-user userName password cipher passwd
[RTA-aaa]>local user userName service-type ppp
[RTA]>interface Serial 1/0/0
[RTA-Serial1/0/0]>link-protocol ppp
[RTA-Serial1/0/0]>ppp authentication-mode pap
[RTA-Serial1/0/0]>ip address 10.1.1.1 30
Authenticated
[RTB]>interface Serial 1/0/0
[RTB-Serial1/0/0]>link-protocol ppp
[RTB-Serial1/0/0]>ppp pap local-user userName password cipher passwd
[RTB-Serial1/0/0]>ip address 10.1.1.2 30
Validation
[RTB]>debugging ppp pap all

CHAP Authentification
Authenticator

[RT]>aaa
[RTA-aaa]>local-user userName password cipher passwd
[RTA-aaa]>local user userName service-type ppp
[RTA]>interface Serial 1/0/0
[RTA-Serial1/0/0]>link-protocol ppp
[RTA-Serial1/0/0]>ppp authentication-mode chap
Authenticated
[RTB]>interface Serial 1/0/0
[RTB-Serial1/0/0]>link-protocol ppp
[RTB-Serial1/0/0]>ppp chap user userName
[RTB-Serial1/0/0]>ppp chap password cipher passwd
Validation
[RTB]>debugging ppp chap all

app of Dsl tech relies strongly on the existing telephone infrastruture
wit continued dev of DSL standards allowing reates of up to 100Mbps > the App of DSL WAN tech for home and enterprise firmly valid
traditional DSL connection are established over legacy ATM Nets however Ethernet has continued to emerge as underlying tech on which many service providers establish their Net > Therfore Tech knowledge of PPPoE remains valued for establishing DSL

Ethernet has disadvantage of the user cannot be authetificated but one benifit of PPP > it can help us auth the users but for PPP link the Bandwidth is very limited soo for that we can use the PPP over Ethernet ensuring the high bandwidth and the authentification for the users >>> PPPoE

PPPoE connection Establishemnt Process

PPPoE session configuration

Digital Subscriber Lines
telephone lnes <DSLAM> ATM/Ethernet <BRAS> ISP
telephone lines conect to the ISP
select telephone line and use PPPoE to connect to DSLAM
Between DSLAM and BRAS > Ethernet link or ATM
DSLAM helps us to transmit our data to the BRAS
and BRAS is the Device that can help us to authenticate users accounts

Successive Broadband tech following dial-up
Data signals carried over copper telephone lines or "local loop"

PPPoE Application in DSL
Enterprise[Hosts <Router> DSL Modem] <> ISP[DSLAM <> PPPeE server] <> Server
Router and PPPoE can do the PPoE connection and authenticate the users and go to the internet

PPPoE P Packets
5 packet types establish and terminate PPPoE sessions
Type > Description

PADI > PPPoE Active Discovery Initiation
PADO > PAD Offer packet
PADR > PAD Request packet
PADS > PAD Session packet
PADT > PAD Terminate packet

PPPoE Session Establishment Process
RT PADI> SW PADI> Servers

  1. PPPoE Negotiation
    DIscoVery Stage
    Router broadcast PADI packet to all servers
    an initiation packet is broadcast to discover access servers
    Servers that are PPPoE servers respond with PADO packet (destination MAC address will be the unicast mac address of thRouter )
    Offers are returned to the Sender by all PPPoE server that can service the received PADI packet
    the Router-Client responds to a chosen server (PPPoE) based on the name or services that are provided by the server
    chosen server sends back PADS packet to confirm
    The Chosen server generates a unique session ID in preparation for the negotiation of the PPP session
    one PPPoE session is setup betw Router and Server
  2. PPP negotiation
    LCP negotation
    3way handshake
    NCP negoatiion

Packet Size Negotiation
An additional six bytes PPPoE header is carried in the frame
The MTU/MRU MaxRecvUnit must supp a lower value to prevent fame loss

Packet

IP

Data

PPP (2 bytes)

TCP

PPPoE (6 bytes)

Ethernet (14 bytes)

FCS (4 bytes)

PPPoE session termination
Router sends PADT to server to terminate the session

Used to notify of the termination of a PPPoE session

Conffiguring a PPP Dialer Interface
Host > Router[PPPoE client] > Router[PPPoE server]
on the Router which is PPPoE client we should create a dialer interface Bicuz it dosent have the physical dialer interface > soo we need a virtual one
dialer-rule 1 in permit >> that means when we want to send packet > ip > we can use this dialer interface link
Router[PPPoE client]

[RT]>dialer-rule
[RT-dialer-rule]>dialer-rule 1 in permit
[RT-dialer-rule]>quit
[RT]>interface dialer 1
[RT-Dialer1]>dialer user enterprise
[RT-Dialer1]>dialer group 1 (combine dialer interface to dilaeerGrp 1)
[RT-Dialer1]>dialer bundle 1 (bind physical if with logical Dialer if)
[RT-Dialer1]>ppp chap user enterpriseUser
[RT-Dialer1]>ppp chap password cipher passwd
[RT-Dialer1]>ip address ppp-negotiate
enables the function of requesting for an IP address from the peer device.
Dialer Interface Configuration Validation
[client]>display interacce Dialer 1

PPPoE Session Binding
A binding is performed of the PPPoE session with the dialer bundle, and associated with PPPoE wAN interface

[RT]>interface GigabitEthernet 0/0/1
[RT-GigabitEthernet0/0/1]>pppoe-client dial-bundle-number 1 on-demand
[RT-GigabitEthernet0/0/1]>quit
[RT]>ip route-static 0.0.0.0 0 dialer 1
PPPoE Session validation
the PPPoE session status can be determined as either IDLE in the discovery stage (PADI/PADR) or UP
[RouterPPPoEClient]>display pppoe-client session summary

PPPoE Application in the Enterprise Nets
PrivateNetDomain[Hosts] <Router-PPPoEClient> PublicNetDomain[Router-PPPoE server]

Privately addressed hosts cannot exist in the public Domain
Addres Translation along with PPPoE necessary
Authentification with the Server Through the PPPoE clinet is necessay in order for hosts to communicate with server