1 / 24

PPPOE (Point to Point Protocol over Ethernet)

PPPOE (Point to Point Protocol over Ethernet). April.2002. ISR System Hyunjong Lee hjlee@corecess.com. Introduction. Point to Point Protocol Standard method for transporting multi protocol datagrams over ppp links components Encapsulation method

savea
Télécharger la présentation

PPPOE (Point to Point Protocol over Ethernet)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PPPOE(Point to Point Protocol over Ethernet) April.2002 ISR System Hyunjong Lee hjlee@corecess.com

  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. Protocol Information Padding Encapsulation • 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를 구별하는 것은 각 프로토콜의 책임

  4. SUCCESS /NONE Dead UP Establish OPEN Authenticate FAIL FAIL DOWN Terminate Network CLOSING Link Operation (phase diagram)

  5. Phase of Link Operation • 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 패킷들의 교환을 통해 링크를 닫음

  6. Phase sequence user NAS Phase Setup < Link Dead > Connect LCP Configuration-Request < Link Establishment > Configure-Ack < Authentication > IPCP Configure-Request Configuration-Ack Datagram < Network Layer Protocol > IPCP Terminate-Request Terminate-Ack LCP Terminate -Request < Link Termination > Terminate-Ack Clear < Link Dead > Disconnect

  7. 사건(event) 상태 A 상태 B 작용(action) 상태 천이 (state transition) Concept of Operation • concept of Operation • 사건(event), 상태(state), 작용(action)간의 관계

  8. State Diagram closed closing opened stopped stopping initial starting Req- sent Ack- Rcvd Ack- Sent * Initial, Starting state

  9. State Transition Table

  10. Event & Action

  11. Code(1) Identifier(1) Lendth(1) Data or Option LCP Packet Format • 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-Request, 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

  12. Type Length Data LCP configuration option • 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, 형상 옵션에 특정한 정보를 포함

  13. IPCP • 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 옵션과 RFC1191의 MTU Discovery를 사용해야 한다.

  14. Password Authentication Protocol -1 • 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 이상) : 다음 장

  15. Password Authentication Protocol -2 • 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)

  16. Password Authentication Protocol -3 user NAS Setup Connect Authentication-Protocol Configuration Option with 0xC023 < Link Establishment > PAP-Authentication-Request ID/Password message PAP-Authentication-Ack Network Layer Protocol < Link Termination > Clear Disconnect

  17. Change Handshake Authentication Protocol -1 • 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

  18. Change Handshake Authentication Protocol -2 • 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 + challenge value’ • Name (1 octet 이상) : 패킷을 전송하는 시스템을 식별 • Success/Failure • [code + identifier + len + msg] • Msg (0 octet 이상) : implementation dependent(ASCII plain text)

  19. Change Handshake Authentication Protocol -3 < peer > User < authenticator > NAS Setup Connect < Link Establishment > Challenge One-way hash Response < Authentication > Ack A random interval A random interval

  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. PPPoE encapsulation Ether type : 0x8863 ->Discovery stage 0x8864 -> PPP Session stage Destination ADRS Source ADRS Ether type payload ver type code Checksum Session ID length Ether type : Discovery Stage (0x8863) Ether type : PPP Session Stage (0x8864) Code : 0x00 payload TAG_type Protocol TAG_length information TAG_value padding

  22. Discovery stage Four steps of Discovery Stage < host > client < concentrator > server Broadcasting Initiation packet PADI (PPPoE Active Discovery Initiation) One of more concentrator send Offer packet PADO (PPPoE Active Discovery Offer) Session request packet (unicast) PADR (PPPoE Active Discovery Request) Confirmation packet PADS (PPPoE Active Discovery Session-confirmation) PPP session stage Terminate packet PADT (PPPoE Active Discovery Termination)

  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 PPPoE Session. To restart, it MUST return to the PPPoE Discovery stage

  24. Other Consideration on PPPoE • 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.

More Related