本文档说明使用外部调制解调器的点对点协议(PPP)拨入配置。
您需要为要拨入的每个用户配置用户名和密码,因为此配置没有终端访问控制器访问控制器系统(TACACS+)或远程身份验证拨入用户服务(RADIUS)服务器。所有IP地址都从地址池传送到客户端。
对于此配置,您需要:
您希望客户端使用的用户名和密码(即使稍后要添加TACACS+或RADIUS,也需向路由器添加几个名称以测试线路)。
用于创建池和静态路由的IP编址方案。
本文档中的信息基于以下软件和硬件版本。
实验室环境中的Cisco 2511,配置已清除。
路由器上的Cisco IOS® 12.2(10b)版。
四个外部异步调制解调器。
本文档中的信息都是基于特定实验室环境中的设备创建的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您在使用任何命令前已经了解其潜在影响。
此配置还可用于以下硬件和软件版本:
具有异步接口和串行接口的路由器能够配置异步接口。
可以使用WIC-2A/S、8或16个异步端口串行接口。
有关文件规则的更多信息请参见“ Cisco技术提示规则”。
本部分提供有关如何配置本文档所述功能的信息。
注:要查找有关本文档中使用的命令的其他信息,请使用命令查找工具(仅注册客户)。
本文档使用此图所示的网络设置。
本文档使用如下所示的配置。
此配置已在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 users
show interface
show line
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 |
初始版本 |