1 / 41

第十六章 PPP 製作:林錦財

基礎網路管理. 第十六章 PPP 製作:林錦財. 大綱. WAN 概述 High-Level Data Link Control (HDLC) PPP 綜述 PPP 認證 配置 PPP. WAN 概述. Service Provider. 廣域網連接的場所 根據用戶不同的需求提供不同的連接方案. 廣域網連接類型 : 實體層. 同步 序列埠. 專線. 非同步 序列埠. Telephone Company. 電路交換. 同步 序列埠. 封 包交換. Service Provider. 序列通訊.

jewell
Download Presentation

第十六章 PPP 製作:林錦財

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. 基礎網路管理 第十六章 PPP 製作:林錦財

  2. 大綱 • WAN 概述 • High-Level Data Link Control (HDLC) • PPP 綜述 • PPP 認證 • 配置 PPP

  3. WAN 概述 Service Provider • 廣域網連接的場所 • 根據用戶不同的需求提供不同的連接方案

  4. 廣域網連接類型: 實體層 同步序列埠 專線 非同步序列埠 Telephone Company 電路交換 同步序列埠 封包交換 Service Provider

  5. 序列通訊 • WAN 技術是基於在實體層的序列通訊 • 常見的訊號編碼法包括 Nonreturn to Zero Level (NRZ-L), High Density Binary 3 (HDB3), 以及 Alternative Mark Inversion (AMI). • 通訊標準包括: • RS-232-E • V.35 • High Speed Serial Interface (HSSI,高速序列介面)

  6. S S S S S S S 廣域網的服務提供 WAN service provider toll network CO Switch Local Loop Demarcation Trunks and switches Point-to-point or circuit-switched connection • 服務商給用戶分配線路的參數

  7. 責任分界點 • 服務提供商與用戶之責任劃分 Netwrok Terminating Unit

  8. PPP 的序列埠連接 Router connections End user device DTE DCE Service Provider EIA/TIA-232 EIA/TIA-449 V.35 X.21 EIA-530 Network connections at the CSU/DSU

  9. 廣域網連接類型: 資料連結層 HDLC, PPP, SLIP 專線 X.25, Frame Relay, ATM 電路交換 Service Provider PPP, SLIP, HDLC 封包交換 Telephone Company

  10. HDLC的沿革 • 早期,序列通訊是基於以字元為主的協定,而位元為主的協定 (Bit-oriented protocols)較具效率,但為專有的 • 在1979年,ISO 同意 HDLC 為在同步序列鏈路上以位元為主封裝資料的資料鏈結協定標準,導致其他委員會採用並加以延伸。 • 從 1981 起,ITU-T 已經發展了一系列的 HDLC 衍生的協定,以下是稱為鏈結存取協定 (link access protocols)的衍生協定範例: • Link Access Procedure, Balanced (LAPB) for X.25 • Link Access Procedure on the D channel (LAPD) for ISDN • Link Access Procedure for Modems (LAPM) and PPP for modems • Link Access Procedure for Frame Relay (LAPF) for Frame Relay

  11. HDLC 訊框格式 Cisco HDLC Flag Address Control Proprietary Data FCS Flag • Cisco的 HDLC 具有proprietary 位元組提供對多協定環境的支援 HDLC Flag Address Control Data FCS Flag • 支援單一的協定環境

  12. HDLC訊框分類與控制欄

  13. HDLC 命令 Router(config-if)#encapsulation hdlc • 啟用HDLC封裝 • HDLC是同步序列埠的預設封裝格式

  14. PPP 綜述 Multiple protocol encapsulations using NCPs in PPP PPP Encapsulation TCP/IP Novell IPX AppleTalk Link setup and control using LCP in PPP • PPP 可以通過 NCP 攜帶多個協定的資料包 • PPP 可以通過 LCP 建立和控制連接

  15. PPP之狀態轉移圖

  16. PPP 分層結構 • PPP—具有網路層服務之資料鏈結 IP IPX Layer 3 Protocols Network Layer IPCP IPXCP 許多其他者 PPP Network Control Protocol Data Link Layer Authentication, 其他選項 Link Control Protocol Synchronous or Asynchronous Physical Media Physical Layer

  17. PPP的訊框格式

  18. PPP Protocol 欄位名稱

  19. LCP 封裝於訊框中

  20. LCP 的 Code 欄位

  21. PPP LCP 配置選項 How It Operates Protocol Feature 需一個密碼 PAP 認證 Authentication 執行 Challenge Handshake CHAP 在來源壓縮資料; 在目的重生資料 Stacker 或 Predictor 壓縮 Compression 錯誤偵測 Error Detection 監控鏈路上被丟失之資料 Magic Number 避免訊框迴路 跨多鏈路做負載平衡 (load balance) Multilink Protocol (MP) 多鏈路 Multilink

  22. PPP 封裝格式選項 • PPP 使用 LCP 自動協商封裝格式選項,例如: • Authentication • Compression • Error detection • Multilink • PPP Callback

  23. IPCP 封裝

  24. IPCP 的 Code 欄位

  25. PPP 認證概述 Dialup or Circuit-Switched Network PPP 會話的建立1 鏈路建立 2 認證階段 3 網路層協定連接 • 兩種 PPP 認證協定: PAP 和 CHAP

  26. 選擇 PPP 認證協定 PAP 2-Way Handshake Remote Router (SantaCruz) Central-Site Router (HQ) “santacruz, boardwalk” Accept/Reject username santacruz password boardwalk Hostname: santacruz Password: boardwalk • 密碼明文傳輸 • 認證兩端是同等的

  27. 選擇 PPP 認證協定 CHAP 3-Way Handshake Remote Router (SantaCruz) Central-Site Router (HQ) Challenge Response Accept/Reject username santacruz password boardwalk Hostname: santacruz Password: boardwalk • 密碼是加密的

  28. PAP 封包

  29. CHAP 封包

  30. PPP 連接過程範例

  31. ü ü ü ü ü ü ü ü 設定 PPP 認證總述 驗證您是誰 ServiceProvider Authenticating Router (收到呼叫的路由器.) ppp encapsulation hostname username / password ppp authentication Router to Be Authenticated (發起呼叫的路由器.) ppp encapsulation hostname username / password ppp authentication Enabling PPP Enabling PPP Authentication Enabling PPP Authentication

  32. 設定PPP • PPP 可配置在下列的實體介面上: • 非同步序列 (Asynchronous serial) • 同步序列(Synchronous serial) • 高速序列介面(High-Speed Serial Interface, HSSI) • 整合服務數位網 (Integrated Services Digital Network, ISDN) Router(config-if)#encapsulation ppp 啟動 PPP 認證

  33. 設定PPP 認證 Router(config)#hostname name • 給路由器命名 Router(config)#username name password password • 提供需要認證的路由器的名稱和密碼

  34. 設定PPP 認證 Router(config-if)#ppp authentication{chap | chap pap | pap chap | pap} 啟動 PAP 或 CHAP 認證

  35. PAP 配置舉例 Leftrouter Right router PSTN/ISDN hostname left username right password sameone ! int serial 0 ip address 10.0.1.1 255.255.255.0 encapsulation ppp ppp authentication PAP ppp pap sent-username Left password someone hostname right username left password sameone ! int serial 0 ip address 10.0.1.2 255.255.255.0 encapsulation ppp ppp authentication PAP ppp pap sent-username Right password someone

  36. CHAP 配置舉例 Leftrouter Right router PSTN/ISDN hostname left username right password sameone ! int serial 0 ip address 10.0.1.1 255.255.255.0 encapsulation ppp ppp authentication CHAP hostname right username left password sameone ! int serial 0 ip address 10.0.1.2 255.255.255.0 encapsulation ppp ppp authentication CHAP

  37. 查看 HDLC 和 PPP 的封裝 Router#show interface s0 Serial0 is up, line protocol is up Hardware is HD64570 Internet address is 10.140.1.2/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation PPP, loopback not set, keepalive set (10 sec) LCP Open Open: IPCP, CDPCP Last input 00:00:05, output 00:00:05, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 38021 packets input, 5656110 bytes, 0 no buffer Received 23488 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 38097 packets output, 2135697 bytes, 0 underruns 0 output errors, 0 collisions, 6045 interface resets 0 output buffer failures, 0 output buffers swapped out 482 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up

  38. 利用 debug ppp authentication 命令查看PPP 認證 Service Provider Leftrouter Right router • 4d20h: %LINK-3-UPDOWN: Interface Serial0, changed state to up • 4d20h: Se0 PPP: Treating connection as a dedicated line • 4d20h: Se0 PPP: Phase is AUTHENTICATING, by both • 4d20h: Se0 CHAP: O CHALLENGE id 2 len 28 from ”left" • 4d20h: Se0 CHAP: I CHALLENGE id 3 len 28 from ”right" • 4d20h: Se0 CHAP: O RESPONSE id 3 len 28 from ”left" • 4d20h: Se0 CHAP: I RESPONSE id 2 len 28 from ”right" • 4d20h: Se0 CHAP: O SUCCESS id 2 len 4 • 4d20h: Se0 CHAP: I SUCCESS id 3 len 4 • 4d20h: dialer Protocol up for Se0 • 4d20h: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up

  39. 配置其他選項 • 配置壓縮選項 Router(config-if)# compress {stac | predictor} • 配置錯誤偵測品質 Router(config-if)# ppp quality <1-100> • 配置多鏈路 Router(config-if)# ppp multilink

  40. 其他 debug ppp 選項 • debug ppp packet • debug ppp negotiation • debug ppp error • debug ppp chap

  41. 問題回顧 1.在Cisco路由器上有哪三種廣域網連接類型? 2.PPP有哪兩種封裝協定,它們有哪些優、缺點? 3.PPP LCP 有哪些選項?

More Related