本檔案將說明使用外部資料機的點對點通訊協定(PPP)撥入組態。
您需要為要撥入的每個使用者配置使用者名稱和密碼,因為此配置沒有終端訪問控制器訪問控制器系統(TACACS+)或遠端身份驗證撥入使用者服務(RADIUS)伺服器。所有IP地址都從池傳遞給客戶端。
對於此配置,您需要以下內容:
您想要使用者端使用的使用者名稱和密碼(即使您之後要新增TACACS+或RADIUS,也要在路由器上新增幾個名稱以測試線路)。
用於建立池和用於靜態路由的IP編址方案。
本檔案中的資訊是根據以下軟體和硬體版本。
實驗環境下的思科2511,已清除設定。
路由器上的Cisco IOS®版本12.2(10b)。
四個外部非同步數據機。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果在實際網路中工作,請確保在使用任何命令之前瞭解其潛在影響。
您還可以將此配置用於以下硬體和軟體版本:
具有非同步介面和串列介面的路由器,能夠配置非同步介面。
可以使用WIC-2A/S、8或16個非同步埠串列介面。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本節提供用於設定本文件中所述功能的資訊。
注意:要查詢有關本文檔中使用的命令的其他資訊,請使用命令查詢工具(僅限註冊客戶)。
本檔案會使用下圖中所示的網路設定。
本文檔使用如下所示的配置。
在2511系列路由器上使用Cisco IOS軟體版本12.2(10b)測試了此配置。相同的配置概念將應用於類似的路由器拓撲或從11.0(3)或更高版本開始的其他Cisco IOS版本。
Cisco 2511 |
---|
Current configuration: ! version 12.2 service timestamps debug datetime msec no service password-encryption no service udp-small-servers no service tcp-small-servers ! hostname router1 ! enable secret <deleted> ! username jason password foo username laura password letmein username russ password opensesame username syed password bar username tito password knockknock !--- Usernames and passwords for clients making incoming calls. modemcap entry default !--- Modemcap named "default" is applied to the line 2 and line 3 !--- of Serial interfaces. Refer to the Modem-Router Connection Guide !--- and modemcap entry for more information. ! interface Ethernet0 ip address 192.168.39.1 255.255.255.0 ! interface Serial0 no ip address ! interface Serial1 no ip address ! interface Group-Async1 !--- Async configuration for the external modems. ip unnumbered ethernet0 encapsulation ppp async mode interactive peer default ip address pool dialup !--- Assigns ip address for incoming calls !--- from the "dialup" pool. no cdp enable ppp authentication chap group-range 1 16 !--- Includes lines 1 through 16 in the group-async1 interface. ! ip local pool dialup 192.168.39.239 192.168.39.254 !--- Defines the range of ip addresses available !--- to the "dialup" pool. ! line con 0 login line 1 16 !--- Line configuration for the external modems. login local !--- Authenticate incoming calls locally with username and password !--- configured on the router. autoselect during-login autoselect ppp !--- Launch PPP when PPP packets are received from the client. modem InOut !--- Allow incoming and outgoing calls. transport input all modem autoconfigure type default !--- Apply the modemcap "default" (configured previously) to initalize !--- the modem. Refer to the link Modem-Router Connection Guide !--- for more information. stopbits 1 flowcontrol hardware line aux 0 line vty 0 4 exec-timeout 20 0 password letmein login ! end |
對於希望以隨機時間間隔在較短持續時間內連線到中心辦公室的遠端使用者,這種型別的撥號連線提供了更廉價的解決方案。在以上配置中,使用者通過數據機從案頭撥號,並通過PSTN網路建立到中央辦公室的PPP連線。
要實施此配置,必須配置以下內容:
非同步介面。
非同步線路。
全域性配置模式下的IP地址池。
數據機引數 - modemcap條目和數據機 — 路由器連線指南。
必須在主機中配置撥號網路。
本節提供的資訊可用於確認您的組態是否正常運作。
輸出直譯器工具(僅供註冊客戶使用)支援某些show命令,此工具可讓您檢視show命令輸出的分析。
顯示使用者
顯示介面
顯示行
show ip route
router1#show users Line User Host(s) Idle Location * 0 con 0 idle 00:00:00 1 tty 1 jason Async interface 00:00:34 PPP: 192.168.39.240 3 tty 3 Modem Autoconfigure 00:00:00 4 tty 4 Modem Autoconfigure 00:00:00 5 tty 5 Modem Autoconfigure 00:00:00 6 tty 6 Modem Autoconfigure 00:00:01 7 tty 7 Modem Autoconfigure 00:00:01 8 tty 8 Modem Autoconfigure 00:00:01 9 tty 9 Modem Autoconfigure 00:00:01 10 tty 10 Modem Autoconfigure 00:00:01 11 tty 11 Modem Autoconfigure 00:00:01 12 tty 12 Modem Autoconfigure 00:00:00 13 tty 13 Modem Autoconfigure 00:00:00 14 tty 14 Modem Autoconfigure 00:00:01 15 tty 15 Modem Autoconfigure 00:00:01 16 tty 16 Modem Autoconfigure 00:00:00 Interface User Mode Idle Peer Address router1#show interface asynchronous 1 Async1 is up, line protocol is up Hardware is Async Serial Interface is unnumbered. Using address of Ethernet0 (192.168.39.1) MTU 1500 bytes, BW 115 Kbit, DLY 100000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation PPP, loopback not set Keepalive not set DTR is pulsed for 5 seconds on reset LCP Open Open: IPCP Last input 00:00:28, output 00:00:43, output hang never Last clearing of "show interface" counters 00:29:49 Input queue: 1/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/16 (active/max active/max total ) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 86 kilobits/sec 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 34 packets input, 3147 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 2 input errors, 2 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 16 packets output, 383 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 output buffer failures, 0 output buffers swapped out 0 carrier transitions router1#show line Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int * 0 CTY - - - - - 0 0 0/0 - A 1 TTY 115200/115200- inout - - - 1 1 0/0 - * 2 TTY 38400/38400 - inout - - - 0 0 0/0 - * 3 TTY 300/300 - inout - - - 0 0 0/0 - * 4 TTY 300/300 - inout - - - 0 0 0/0 - * 5 TTY 1200/1200 - inout - - - 0 0 0/0 - * 6 TTY 300/300 - inout - - - 0 0 0/0 - * 7 TTY 300/300 - inout - - - 0 0 0/0 - * 8 TTY 300/300 - inout - - - 0 0 0/0 - * 9 TTY 1200/1200 - inout - - - 0 0 0/0 - * 10 TTY 300/300 - inout - - - 0 0 0/0 - * 11 TTY 300/300 - inout - - - 0 0 0/0 - * 12 TTY 115200/115200- inout - - - 0 0 0/0 - * 13 TTY 115200/115200- inout - - - 0 0 0/0 - * 14 TTY 300/300 - inout - - - 0 0 0/0 - * 15 TTY 300/300 - inout - - - 0 0 0/0 - * 16 TTY 300/300 - inout - - - 0 0 0/0 - 17 AUX 9600/9600 - - - - - 0 0 0/0 - 18 VTY - - - - - 0 0 0/0 - 19 VTY - - - - - 0 0 0/0 - 20 VTY - - - - - 0 0 0/0 - 21 VTY - - - - - 0 0 0/0 - router1#show line 1 Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int A 1 TTY 115200/115200- inout - - - 1 1 0/0 - Line 1, Location: "PPP: 192.168.39.240", Type: "" Length: 24 lines, Width: 80 columns Baud rate (TX/RX) is 115200/115200, no parity, 1 stopbits, 8 databits Status: Ready, Active, No Exit Banner, Async Interface Active Modem Detected, CTS Raised Capabilities: Hardware Flowcontrol In, Hardware Flowcontrol Out Modem Callout, Modem RI is CD, Line usable as async interface Modem Autoconfigure Modem state: Ready Group codes: 0 Line is running PPP for address 192.168.39.240. 0 output packets queued, 1 input packets. Async Escape map is 00000000000000000000000000000000 Modem hardware state: CTS DSR DTR RTS, Modem Configured Special Chars: Escape Hold Stop Start Disconnect Activation ^^x none - - none Timeouts: Idle EXEC Idle Session Modem Answer Session Dispatch 00:10:00 never none not set Idle Session Disconnect Warning never router1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C 192.168.39.0/24 is directly connected, Ethernet0
在Windows 2000主機上設定撥號連線。配置使用者名稱、密碼和電話號碼並撥打連線。
建立撥號連線後,會從路由器中配置的撥號池中分配IP地址。我們可以在主機上發出ipconfig命令來驗證這一點。它在主機中顯示為PPP介面卡。
C:\Documents and Settings\Administrator>ipconfig Windows 2000 IP Configuration Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Cable Disconnected PPP adapter Dial-up Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.39.240 Subnet Mask . . . . . . . . . . . : 255.255.255.255 Default Gateway . . . . . . . . . : 192.168.39.240
要驗證從Windows 2000伺服器主機到Cisco 2511路由器的連線建立情況,可以從主機ping路由器乙太網埠並驗證連線建立情況。這裡的192.168.39.1是路由器的乙太網埠IP地址。
C:\Documents and Settings\Administrator>ping 192.168.39.1 Pinging 192.168.39.1 with 32 bytes of data: Reply from 192.168.39.1: bytes=32 time=170ms TTL=255 Reply from 192.168.39.1: bytes=32 time=111ms TTL=255 Reply from 192.168.39.1: bytes=32 time=110ms TTL=255 Reply from 192.168.39.1: bytes=32 time=100ms TTL=255 Ping statistics for 192.168.39.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 100ms, Maximum = 170ms, Average = 122ms
本節提供的資訊可用於對組態進行疑難排解。
輸出直譯器工具(僅供註冊客戶使用)支援某些show命令,此工具可讓您檢視show命令輸出的分析。
注意:發出debug指令之前,請先參閱有關Debug指令的重要資訊。
debug ppp negotiation — 檢視客戶端是否正在傳遞PPP協商。這是當您檢查地址協商時。
debug ppp authentication — 檢視客戶端是否通過身份驗證。
debug ppp error — 顯示與PPP連線協商和操作相關的協定錯誤和錯誤統計資訊。
debug modem — 檢視路由器是否從數據機接收正確的訊號。
show line [# tty line] — 查詢數據機硬體狀態。
從Cisco 2511路由器獲得以下輸出。它們顯示Windows 2000伺服器正在撥打Cisco 2511的PSTN連結並建立PPP連線。
router1#debug ppp negotiation PPP protocol negotiation debugging is on router1#debug vtemplate Virtual Template debugging is on router1#show debug PPP: PPP protocol negotiation debugging is on Dec 10 18:43:59.079: As1 LCP: I CONFREQ [Closed] id 1 len 50 Dec 10 18:43:59.083: As1 LCP: ACCM 0x00000000 (0x020600000000) Dec 10 18:43:59.087: As1 LCP: MagicNumber 0x59F402A1 (0x050659F402A1) Dec 10 18:43:59.087: As1 LCP: PFC (0x0702) Dec 10 18:43:59.091: As1 LCP: ACFC (0x0802) Dec 10 18:43:59.091: As1 LCP: Callback 6 (0x0D0306) Dec 10 18:43:59.095: As1 LCP: MRRU 1614 (0x1104064E) Dec 10 18:43:59.099: As1 LCP: EndpointDisc 1 Local Dec 10 18:43:59.099: As1 LCP: (0x131701714C44F0EC8F45BABDC596D14B) Dec 10 18:43:59.103: As1 LCP: (0x79DB5300000000) Dec 10 18:43:59.107: As1 LCP: Lower layer not up, Fast Starting Dec 10 18:43:59.107: As1 PPP: Treating connection as a dedicated line Dec 10 18:43:59.111: As1 PPP: Phase is ESTABLISHING, Active Open [0 sess, 0 load] Dec 10 18:43:59.115: As1 LCP: O CONFREQ [Closed] id 3 len 25 Dec 10 18:43:59.119: As1 LCP: ACCM 0x000A0000 (0x0206000A0000) Dec 10 18:43:59.123: As1 LCP: AuthProto CHAP (0x0305C22305) Dec 10 18:43:59.127: As1 LCP: MagicNumber 0x002AF05C (0x0506002AF05C) Dec 10 18:43:59.127: As1 LCP: PFC (0x0702) Dec 10 18:43:59.131: As1 LCP: ACFC (0x0802) Dec 10 18:43:59.135: As1 LCP: O CONFREJ [REQsent] id 1 len 11 Dec 10 18:43:59.139: As1 LCP: Callback 6 (0x0D0306) Dec 10 18:43:59.139: As1 LCP: MRRU 1614 (0x1104064E) Dec 10 18:43:59.155: %LINK-3-UPDOWN: Interface Async1, changed state to up Dec 10 18:43:59.263: As1 LCP: I CONFACK [REQsent] id 3 len 25 Dec 10 18:43:59.267: As1 LCP: ACCM 0x000A0000 (0x0206000A0000) Dec 10 18:43:59.267: As1 LCP: AuthProto CHAP (0x0305C22305) Dec 10 18:43:59.271: As1 LCP: MagicNumber 0x002AF05C (0x0506002AF05C) Dec 10 18:43:59.275: As1 LCP: PFC (0x0702) Dec 10 18:43:59.275: As1 LCP: ACFC (0x0802) Dec 10 18:43:59.279: As1 LCP: I CONFREQ [ACKrcvd] id 2 len 43 Dec 10 18:43:59.283: As1 LCP: ACCM 0x00000000 (0x020600000000) Dec 10 18:43:59.287: As1 LCP: MagicNumber 0x59F402A1 (0x050659F402A1) Dec 10 18:43:59.287: As1 LCP: PFC (0x0702) Dec 10 18:43:59.291: As1 LCP: ACFC (0x0802) Dec 10 18:43:59.291: As1 LCP: EndpointDisc 1 Local Dec 10 18:43:59.295: As1 LCP: (0x131701714C44F0EC8F45BABDC596D14B) Dec 10 18:43:59.299: As1 LCP: (0x79DB5300000000) Dec 10 18:43:59.303: As1 LCP: O CONFACK [ACKrcvd] id 2 len 43 Dec 10 18:43:59.307: As1 LCP: ACCM 0x00000000 (0x020600000000) Dec 10 18:43:59.311: As1 LCP: MagicNumber 0x59F402A1 (0x050659F402A1) Dec 10 18:43:59.311: As1 LCP: PFC (0x0702) Dec 10 18:43:59.315: As1 LCP: ACFC (0x0802) Dec 10 18:43:59.315: As1 LCP: EndpointDisc 1 Local Dec 10 18:43:59.319: As1 LCP: (0x131701714C44F0EC8F45BABDC596D14B) Dec 10 18:43:59.323: As1 LCP: (0x79DB5300000000) Dec 10 18:43:59.327: As1 LCP: State is Open Dec 10 18:43:59.327: As1 PPP: Phase is AUTHENTICATING, by this end [0 sess, 1 load] Dec 10 18:43:59.331: As1 CHAP: O CHALLENGE id 2 len 25 from "router1" Dec 10 18:43:59.459: As1 LCP: I IDENTIFY [Open] id 3 len 18 magic 0x59F402A1 MSRASV5.00 Dec 10 18:43:59.463: As1 LCP: I IDENTIFY [Open] id 4 len 28 magic 0x59F402A1 MSRAS-1-LAB-WIN2K-PC Dec 10 18:43:59.467: As1 CHAP: I RESPONSE id 2 len 26 from "jason" Dec 10 18:43:59.479: As1 CHAP: O SUCCESS id 2 len 4 Dec 10 18:43:59.483: As1 PPP: Phase is UP [0 sess, 1 load] Dec 10 18:43:59.487: As1 IPCP: O CONFREQ [Closed] id 1 len 10 Dec 10 18:43:59.491: As1 IPCP: Address 192.168.39.1 (0x0306C0A82701) Dec 10 18:43:59.567: As1 CCP: I CONFREQ [Not negotiated] id 5 len 10 Dec 10 18:43:59.571: As1 CCP: MS-PPC supported bits 0x00000001 (0x120600000001) Dec 10 18:43:59.575: As1 LCP: O PROTREJ [Open] id 4 len 16 protocol CCP (0x80FD0105000A120600000001) Dec 10 18:43:59.599: As1 IPCP: I CONFREQ [REQsent] id 6 len 40 Dec 10 18:43:59.603: As1 IPCP: CompressType VJ 15 slots CompressSlotID (0x0206002D0F01) Dec 10 18:43:59.607: As1 IPCP: Address 0.0.0.0 (0x030600000000) Dec 10 18:43:59.611: As1 IPCP: PrimaryDNS 0.0.0.0 (0x810600000000) Dec 10 18:43:59.615: As1 IPCP: PrimaryWINS 0.0.0.0 (0x820600000000) Dec 10 18:43:59.615: As1 IPCP: SecondaryDNS 0.0.0.0 (0x830600000000) Dec 10 18:43:59.619: As1 IPCP: SecondaryWINS 0.0.0.0 (0x840600000000) Dec 10 18:43:59.623: As1 IPCP: O CONFREJ [REQsent] id 6 len 34 Dec 10 18:43:59.627: As1 IPCP: CompressType VJ 15 slots CompressSlotID (0x0206002D0F01) Dec 10 18:43:59.631: As1 IPCP: PrimaryDNS 0.0.0.0 (0x810600000000) Dec 10 18:43:59.635: As1 IPCP: PrimaryWINS 0.0.0.0 (0x820600000000) Dec 10 18:43:59.639: As1 IPCP: SecondaryDNS 0.0.0.0 (0x830600000000) Dec 10 18:43:59.643: As1 IPCP: SecondaryWINS 0.0.0.0 (0x840600000000) Dec 10 18:43:59.647: As1 IPCP: I CONFACK [REQsent] id 1 len 10 Dec 10 18:43:59.651: As1 IPCP: Address 192.168.39.1 (0x0306C0A82701) Dec 10 18:43:59.735: As1 IPCP: I CONFREQ [ACKrcvd] id 7 len 10 Dec 10 18:43:59.739: As1 IPCP: Address 0.0.0.0 (0x030600000000) Dec 10 18:43:59.743: As1 IPCP: O CONFNAK [ACKrcvd] id 7 len 10 Dec 10 18:43:59.747: As1 IPCP: Address 192.168.39.240 (0x0306C0A827F0) Dec 10 18:43:59.835: As1 IPCP: I CONFREQ [ACKrcvd] id 8 len 10 Dec 10 18:43:59.839: As1 IPCP: Address 192.168.39.240 (0x0306C0A827F0) Dec 10 18:43:59.843: As1 IPCP: O CONFACK [ACKrcvd] id 8 len 10 Dec 10 18:43:59.847: As1 IPCP: Address 192.168.39.240 (0x0306C0A827F0) Dec 10 18:43:59.851: As1 IPCP: State is Open Dec 10 18:43:59.863: As1 IPCP: Install route to 192.168.39.240 Dec 10 18:44:00.483: %LINEPROTO-5-UPDOWN: Line protocol on Interface Async1, changed state to up
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
04-Feb-2010 |
初始版本 |