Upload
savea
View
191
Download
8
Embed Size (px)
DESCRIPTION
PPPOE (Point to Point Protocol over Ethernet). April.2002. ISR System Hyunjong Lee [email protected]. Introduction. Point to Point Protocol Standard method for transporting multi protocol datagrams over ppp links components Encapsulation method - PowerPoint PPT Presentation
Citation preview
2
Simple and Flexible
2
Introduction
Point to Point Protocol Standard method for transporting multi protocol datagrams over ppp links
components Encapsulation method 데이터 링크 연결의 설정 , 구성 , 시험을 위한 Link Control Protocol(LCP) 서로 다른 망계층 프로토콜의 설정 , 구성을 위한 Network Control Protocol(NCP)
Encapsulation 동일 링크에 서로 다른 network layer protocol 의 다중화 제공 Encapsulation Octets : HDLC-like frame 내에 사용될 때에는 부가적인 8 octets 만 필요 , 대역폭이
중요한 곳에서는 2 또는 4 octets 으로 축소 가능
Link Control Protocol Portability : 다양한 환경에 적응 Encapsulation 포맷 옵션 교섭 , 다양한 크기의 패킷 처리 , 오류 검출 , 링크 종단
Network Control Protocol 망 계층 프로토콜들의 여러가지 문제점 해소 Network protocol 에 종속
3
Simple and Flexible
3
PPP Encapsulation Default encapsulation is HDLC Protocol Field
1 또는 2 octet Information field 내에 encapsulation 된 데이터 그램 식별 0x0*** ~ 0x3*** : network layer protocol (ex : 0x0021 – IP) 0x8*** ~ 0xb*** : NCP(ex : 0x8021 – IPCP) 0xC*** ~ 0xF*** : link – layer control protocol (ex : 0xC021 – LCP)
Information Field 0 이상의 octet 프로토콜 필드에 규정된 프로토콜에 대한 데이터그램 포함 정보 필드에 대한 최대 길이 (MRU) 는 1500octets 가 기본
Padding Field 교섭에 의해 합의한 PPP 들은 다른 MRU 사용 가능 실제 정보와 padding 를 구별하는 것은 각 프로토콜의 책임
Protocol Information Padding
Encapsulation
4
Simple and Flexible
4
Dead Establish Authenticate
NetworkTerminate
UP OPEN
FAIL
DOWNCLOSING
FAIL
SUCCESS/NONE
Link Operation (phase diagram)
5
Simple and Flexible
5
Link Dead 링크는 필수적으로 이 단계를 시작하고 끝난다 . Carrier 검출 , 망 관리자가 구성과 같은 외부 사건이 물리 계층이 사용될 준비임을 표시하면 링크 설정 단계로 진행
Link Establishment LCP 의 configure packets 의 교환을 통해 연결 설정 Configure-Ack 패킷이 보내지거나 수신되면 LCP opened state 로 진입 Network layer protocol 과 무관 Network layer protocol configure 은 Network layer protocol 의 NCP 에 의해처리
Authentication 인증은 기본적으로 필수요소가 아니다 . PAP : Password Authentication Protocol CHAP : Challenge Handshake Authentication protocol
Network-layer Protocol 이전 단계가 모두 성공적으로 끝나면 각 network-layer protocol (ex : IP, IPX, AppleTalk…) 에 관계된 NCP 가 동작 이 단계에서는 LCP, NCP 및 networks layer protocol 을 수용한다 .
Link Termination PPP 는 임의의 시간에 링크를 종료할 수 있다 . Carrier 상실 , 인증 장애 , 링크 품질 장애 , 유휴 기간 timer 의 종료 혹은 관리 closing LCP 는 terminate 패킷들의 교환을 통해 링크를 닫음
Phase of Link Operation
6
Simple and Flexible
6
user NAS Phase
Setup
Connect
LCP Configuration-RequestConfigure-Ack
IPCP Configure-Request
Configuration-Ack
Datagram
IPCP Terminate-RequestTerminate-Ack
LCP Terminate -RequestTerminate-Ack
ClearDisconnect
< Link Dead >
< Link Establishment >
< Network Layer Protocol >
< Link Termination >
< Link Dead >
< Authentication >
Phase sequence
7
Simple and Flexible
7
concept of Operation 사건 (event), 상태 (state), 작용 (action) 간의 관계
상태 A 상태 B
사건 (event)
작용 (action)
상태 천이(state transition)
Concept of Operation
8
Simple and Flexible
8
State Diagram
closed closingopened
stopped stopping
Req-sent
Ack-Rcvd
Ack-Sent
* Initial, Starting state
initial
starting
9
Simple and Flexible
9
State Transition Table
10
Simple and Flexible
10
Event & Action
11
Simple and Flexible
11
LCP Packet 분류 링크를 설정하고 구성하는데 사용되는 link configure packet (configure-Request, Configure-Aak, Configure-
Nak, Configure-Reject) 링크를 졸료하는데 사용되는 link termination packet(Terminate-Request, Terminate-Ack) 링크를 유지하고 debug 하는데 사용되는 link maintenance packet(Code-Reject, Protocol-Reject, Echo-Req
uest, Echo-Reply, Discard-Request)
LCP Packet Format
Code : LCP Packet 종류 식별 1 : Configure-Request, 2 : Configure-Ack, 3 : Configure-Nak, 4 : Configure-Reject 5 : Terminate-Request, 6 : Terminate-Ack, 7 : Code-Reject, 8 : Protocol-Reject 9 : Echo-Request, 10 : Echo-Reply, 11 : Discard-Request, 12 : Identification 13 : Time-Remaining
Identifier : 요구 패킷과 응답 패킷의 일치 Length : Code + Identifier + Length + Data Data : 0 이상의 데이터 octets
Code(1) Identifier(1) Lendth(1) Data or Option
LCP Packet Format
12
Simple and Flexible
12
LCP 형상 옵션 Configuration packet format
Type : 1 octet. 0 : Reserved, 1 : Maximum Receive Unit, 3 : Authentication Protocol, 4 : Quality protocol 5 : Magic-Number, 7 : Protocol Field Compression, 8 : Address and Control Field
compression 9 : FCS Alternatives, 10 : Self Describing Padding, 13 : Callback, 15 : Compound Frames
Length : 1 octet, Type + Length + Data Data : 0 이상의 octet, 형상 옵션에 특정한 정보를 포함
Type Length Data
LCP configuration option
13
Simple and Flexible
13
IP 를 위한 PPP Network Control Protocol P to P 링크의 양 단에서 IP 프로토콜 모듈을 구성하고 동작하게 하고 정지하게 한다 . LCP 와 동일한 패킷 교환 방식을 사용 IPCP 패킷들은 PPP 가 network layer protocol 단계에 도달할 때까지 교환되지 않음 IPCP 예외 (LCP 와 다른 점 )
데이터 링크 계층 프로토콜 필드 : 정확하게 하나의 IPCP 패킷은 프로토콜 필드가 0x8021을 표시하는 PPP 데이터 맃크 계층 프레임의 정보 필드에 encapsulation 됨
Code 필드 : Code 1~7 만 사용 , 다른 Code 는 Code-Reject 됨 Configuration option field : IPCP 는 별도의 configuration option 사용
IP 데이터그램의 송신 PPP 는 network layer protocol 단계에 도달해야 하며 , IPCP 는 열림 상태에 있어야 한다 . 정확하게 하나의 IP 패킷은 Protocol Field 가 0x0021 을 표시하는 PPP 데이터 링크 계층
프레임의 정보 필드에 encapsulation 된다 . PPP 링크상에 전송되는 IP 패킷의 최대 길이는 PPP 데이터 링크 계층 프레임의 information filed
의 최대 길이와 같다 . 보다 큰 IP 데이터 그램은 필요에 따라 분할되어야 한다 . 시스템이 분할 및 재조립을 피하여 한다면 RFC879 의 TCP Maximum Segment Size 옵션과 RFC1
191 의 MTU Discovery 를 사용해야 한다 .
IPCP
14
Simple and Flexible
14
LCP Authentication-Protocol Configuration option format [type + len + Authentication-Protocol] Type (1 octet) : 3 Len (1 octet) : 4 Authentication-Protocol (2 octet) : 0xC023
PPP Protocol ID : 0xC023
PAP packet format [type + identifier + len + data] Code (1octet) : 1(Authentication-Request), 2(Authentication-Ack),
3(Authentication-Nak) Identifier (1octet) : request 와 reply 간의 match Len (2 octet) : PAP packet length Data (0 octet 이상 ) : 다음 장
Password Authentication Protocol -1
15
Simple and Flexible
15
Authentication-Request packet [code + identifier + len + peerID-len + passwd-len + passwd] peerID-len (1 octet) : peerID Field Length peerID (0 octet 이상 ) : 인증될 peer 의 ID Passwd-len (1 octet) : passwd Field Length Passwd (0 octet 이상 ) : 인증될 passwd
Authentication-Ack/Nak packet [code + identifier + len + msg-len + msg] Msg-len ( 1octet) : msg field length Msg (0 octet 이상 ) : implementation dependent ( ASCII 로 된 plain text)
Password Authentication Protocol -2
16
Simple and Flexible
16
user NASSetup
Connect
< Link Establishment >
PAP-Authentication-Request
PAP-Authentication-Ack
Network Layer Protocol
< Link Termination >
Clear
Disconnect
Authentication-Protocol ConfigurationOption with 0xC023
ID/Password message
Password Authentication Protocol -3
17
Simple and Flexible
17
3-way handshake protocol
Link 가 설정된 이후에 임의의 시간에 반복될 수 있다 .
LCP Authentication Protocol Configuration option format
[type + len + Authentication-Protocol + algorithm] Type (1 octet) : 3 Len (1 octet) : 5 Authentication-Protocol (2 octet) : 0xC223 Message (1 octet) : 5 (CHAP with MD5)
PPP Protocol ID : 0xC223
Change Handshake Authentication Protocol -
1
18
Simple and Flexible
18
CHAP packet format [code + identifier + len + data] Code (1octet) : 1(Challenge), 2(Response), 3(Success), 4(Failure) Identifier (1 octet) : challenge, response 간의 match Len (2 octet) : CHAP packet 길이 Data (0 octet 이상 ) : 아래 참조
Challenge/Response [code + identifier + len + value-size + value + name] Value-size (1 octet) : value field length Value (1 octet 이상 ) : challenge value or response value
Challenge value : a variable stream of octets Response value : the one-way hash calculated over a stream of ‘identifier + secret + challeng
e value’ Name (1 octet 이상 ) : 패킷을 전송하는 시스템을 식별
Success/Failure [code + identifier + len + msg] Msg (0 octet 이상 ) : implementation dependent(ASCII plain text)
Change Handshake Authentication Protocol -
2
19
Simple and Flexible
19
< peer >User
< authenticator >NAS
Setup
Connect
< Link Establishment >
Challenge
Response
Ack< Authentication >
One-way hash
A random interval
A random interval
Change Handshake Authentication Protocol -
3
20
Simple and Flexible
20
PPPOE introduction
Point to Point Protocol over Ethernet Network host(client) 가 simple bridging 을 통해서 remote access concentrator(server) 를 access
할 수 있는 기능제공 Access control, billing, type of service 를 기본적으로 site 단위 보다는 user 단위로 제공
Protocol overview Two distinct state : Discovery stage, PPP Session stage Discovery stage : 처음 PPPoE Session 실행시 peer 의 ether MAC address 를 identify 하고
PPPoE 의 Session ID 를 establish 한다 . (server 와 client relationship) PPP Session stage : PPP Session start (Dead phase Establish phase)
21
Simple and Flexible
21
PPPoE encapsulation
Destination ADRS
Source ADRS
Ether type
payload
Checksum
Ether type : 0x8863 ->Discovery stage 0x8864 -> PPP Session stage
ver codetypeSession ID
length
payload
TAG_typeTAG_length
TAG_value
Protocol
padding
information
Ether type : Discovery Stage (0x8863)
Ether type : PPP Session Stage (0x8864)Code : 0x00
22
Simple and Flexible
22
Discovery stage
< host >client
< concentrator >server
Four steps of Discovery Stage
Broadcasting Initiation packet
One of more concentrator send Offer packet
Session request packet (unicast)
Confirmation packet
PPP session stage
PADI(PPPoE Active Discovery Initiation)
Terminate packet
PADO(PPPoE Active Discovery Offer)
PADR(PPPoE Active Discovery Request)
PADS(PPPoE Active Discovery Session-confirmation)
PADT(PPPoE Active Discovery Termination)
23
Simple and Flexible
23
LCP Consideration on PPPoE
Recommend Magic Number LCP configuration
Not Recommend Protocol Field Compression(PFC)
Must reject Field Check Sequence(FCS) Alternatives Address – and – Control Field compression (FCFC) Asynchronous – Control – Character – Map(ACCM)
Must fixed PPP MTU Must Not be greater than 1492 When LCP terminates, the Host and Access concentrator MUST stop using that PP
PoE Session. To restart, it MUST return to the PPPoE Discovery stage
24
Simple and Flexible
24
Time out & Resend packet If host does not receive PADO& PADS packet for time out period, host resend PADI
& PADR packet(extend double of waiting time).
Security AC – Cookie TAG : To protect against DOS(Denial of Service) attacks.
Other Consideration on PPPoE