按需撥入路由(DDR)解決通過電路交換WAN間歇性網路連線的需求。配置DDR主要有兩種方法:傳統DDR和撥號程式設定檔。本文檔介紹撥號程式配置檔案。有關配置傳統DDR的資訊,請參閱以下資源:
我們強烈建議您在配置撥號程式配置檔案之前,閱讀配置和診斷撥號程式配置檔案文檔。
本文件中的資訊是以下列軟體和硬體版本為依據.
採用Cisco IOS®軟體版本12.2(10b)的Cisco 2503
採用Cisco IOS軟體版本12.2(10b)的Cisco 2503
採用Cisco IOS軟體版本12.2(10b)的Cisco 2520
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果在實際網路中工作,請確保在使用任何命令之前瞭解其潛在影響。
撥號器配置檔案將邏輯配置與接收或進行呼叫的物理介面分開。由於這種分離,多個撥號程式配置檔案配置可以共用介面,例如ISDN、非同步數據機或同步串列連線。撥號程式設定檔允許您根據每個呼叫動態地將邏輯和實體組態繫結在一起。這允許物理介面根據傳入或傳出呼叫要求呈現不同的特徵。撥號程式設定檔可定義封裝、存取控制清單、最小或最大呼叫,以及開啟或關閉功能。在使用多個ISDN B通道同時連線到多個遠端目標的情況下,撥號器配置檔案尤其有用。在這種情況下,可以將一個撥號器配置檔案繫結到一組B通道,而將另一個撥號器配置檔案繫結到另一組B通道。這允許同一物理介面同時連線到多個遠端目標。
撥號程式設定檔的元件包括:
撥號器接口 — 使用每個目標撥號器配置檔案的邏輯實體。您可以在路由器中建立任意數量的撥號器介面。特定於目標的所有配置設定都轉到撥號器介面配置中。每個撥號器介面都使用撥號器池,該池是實體介面(ISDN BRI和PRI、非同步資料機和同步序列)的池。
撥號器池 — 每個介面都引用一個撥號器池,該撥號器池是與撥號器配置檔案關聯的一組物理介面。一個物理介面可以屬於多個撥號器池。通過配置可選的priority命令,可以解決特定物理介面的爭用。
物理接口 — 撥號器池中的介面配置為封裝引數。介面還配置為標識介面所屬的撥號器池。撥號器設定檔支援PPP和高階資料連結控制(HDLC)封裝。
Dialer map-class(可選) — 為撥號器介面提供配置引數(例如,ISDN速度、撥號器計時器引數等)。可以從多個撥號器介面引用對映類。
有關撥號程式設定檔的詳細資訊,以及要判斷撥號程式設定檔是否適合您的情況,請參閱設定和疑難排解撥號程式設定檔的檔案。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本節提供用於設定本文件中所述功能的資訊。
注意:要查詢有關本文檔中使用的命令的其他資訊,請使用命令查詢工具(僅限註冊客戶)。
本檔案會使用下圖中所示的網路設定。
本檔案會使用這些設定。
R3:中央站點(思科2503) |
---|
version 12.2 service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! hostname R3 ! aaa new-model aaa authentication login default local aaa authentication ppp default local ! username admin privilege 15 password 7 <deleted> username R1 password 7 <deleted> username R2 password 7 <deleted> !--- For Challenge Handshake Authentication Protocol (CHAP), passwords must !--- be the same on both routers. ip subnet-zero ! isdn switch-type basic-5ess ! interface Ethernet0 ip address 172.22.80.4 255.255.255.0 ! interface BRI0 no ip address encapsulation ppp dialer pool-member 1 !--- Places the interface into dialer pool # from which Dialer interfaces !--- may draw channels as needed. !--- Links the physical interface with the logical dialer interfaces. isdn switch-type basic-5ess ppp authentication chap ppp multilink !--- Configure authentication and multilink on both physical and dialer interfaces. ! interface Dialer0 ip address 172.22.85.1 255.255.255.0 encapsulation ppp dialer pool 1 !--- Defines the pool of physical resources from which the Dialer interface !--- may draw B channels as needed. dialer remote-name R1 !--- Should match the authenticated username of the peer dialer string 6661000 class mapclass1 !--- Dialer0 is linked to map-class mapclass1 dialer load-threshold 128 outbound dialer-group 5 !--- DDR configuration command. !--- This command is linked to the dialer-list 5 command. ppp authentication chap ppp multilink ! interface Dialer1 ip address 172.22.86.1 255.255.255.0 encapsulation ppp dialer pool 1 dialer remote-name R2 dialer string 6662000 dialer-group 5 ppp authentication chap ! router eigrp 69 redistribute static !--- The redistribute static command advertises static routes !--- to a dynamic routing protocol. passive-interface Dialer0 passive-interface Dialer1 !--- The passive-interface command deactivates dynamic routing updates !--- on the dialer interfaces. Prevents the Enhanced Interior Gateway !--- Routing Protocol (EIGRP) process from continuously bringing up the ISDN link. network 172.22.0.0 auto-summary no eigrp log-neighbor-changes ! ip classless ip route 172.22.95.0 255.255.255.0 Dialer1 ip route 172.22.96.0 255.255.255.0 Dialer0 !--- Router uses dialer1 when reaching network 172.22.95.0. !--- Router uses dialer0 when reaching network 172.22.96.0. ! map-class dialer mapclass1 dialer idle-timeout 180 dialer fast-idle 5 dialer-list 5 protocol ip permit !--- Defines DDR interesting traffic for dialer-group 5. Access-list may be used. ! line con 0 line aux 0 line vty 0 4 ! end |
R1:遠端站點(Cisco 2503) |
---|
version 12.2 service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! hostname R1 ! aaa new-model aaa authentication login default local aaa authentication ppp default local ! username admin privilege 15 password 7 <deleted> username R3 password 7 |
R2:遠端工作者(Cisco 2520) |
---|
version 12.2 service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! hostname R2 ! aaa new-model aaa authentication login default local aaa authentication ppp default local ! username admin privilege 15 password 7 <deleted> username R3 password 7 |
有關DDR命令的更多資訊,請參閱使用撥號程式配置檔案命令的對等DDR文檔。
以下是可選計時器命令的清單:
dialer idle-timeout seconds — 指定要用於呼叫的空閒計時器值。如果在指定時間內未傳輸任何感興趣的流量,此計時器將斷開呼叫。預設值為120秒。
dialer fast-idle seconds — 如果有另一個呼叫等待同一介面,並且該介面處於空閒狀態,則指定快速斷開時間。正在等待的呼叫不必等待空閒計時器過期。預設值為20秒。
dialer wait-for-carrier-time seconds — 指定用於呼叫的載波時間值的時間。如果在指定時間內未檢測到載波,將放棄呼叫。
以下是可選對映類命令的清單:
map-class dialer class-name — 指定對映類並進入對映類配置模式。對映類配置通過介面撥號器模式上應用的dialer string # class class-name 命令連結到撥號器配置檔案。以下命令在對映類配置模式下可用:
dialer idle-timeout sec、dialer fast-idle sec、 dialer wait-for-carrier-timesec(請參閱「計時器」部分)。
dialer isdn [speed speed ] [spc] — 指定ISDN線路速度(預設值為64kbps)。 spc選項用於指定ISDN半永久連線。
以下是可選的多鏈路PPP命令清單:
ppp multilink — 指定此撥號器介面使用多重連結PPP(將封包分段到連線到同一目的地的介面套件組合)。 此命令被置於傳入呼叫的物理介面和傳出呼叫的撥號程式介面上。
dialer load-threshold load [outbound |入站 |任一] — 指定多鏈路PPP將在何種流量負載上啟用其他鏈路。有效值為1到255(255為鏈路利用率的100%)。
以下是您可以使用的其他命令清單:
dialer hold-queue packets — 指定等待線路出現的資料包的隊列長度。有效值為0到100。
dialer pool-member number [priority priority] [min-link minimum] [max link maximum] — 將物理介面分配給撥號程式池。
priority priority — 設定撥號器池內物理介面的優先順序(從1到255)。 撥出時,首先選擇優先順序最高的介面。
min-link minimum — 設定為此撥號程式池保留的介面上的ISDN B通道的最小數量(從1到255)。 用於撥號器備份。
max-link maximum — 設定為此撥號器池保留的介面上的ISDN B通道的最大數量(從1到255)。
dialer-list dialer-group protocol protocol-name {permit | deny | list access-list-number} -全域性配置命令,用於定義將啟動DDR連線的相關流量。此命令連結到dialer-group number 介面命令。
permit — 允許訪問整個協定。
deny — 拒絕訪問整個協定。
list — 指定用於定義比整個協定更精細的粒度的訪問清單。
本節提供的資訊可用於確認您的組態是否正常運作。
輸出直譯器工具(僅供註冊客戶使用)支援某些show命令,此工具可讓您檢視show命令輸出的分析。
show dialer [interface type number] — 顯示為DDR配置的介面的常規診斷資訊。如果撥號器正常啟動,Dialer state is data link layer up消息將會顯示。如果出現physical layer up,則表示線路協定已啟動,但網路控制通訊協定(NCP)未啟動。撥號原因行顯示發起撥號的封包的來源和目的地位址。此show命令還會顯示計時器的配置和連線超時前的時間。
show isdn status — 確保路由器與ISDN交換機正確通訊。在輸出中,驗證第1層狀態是否為ACTIVE,以及是否顯示第2層狀態狀態= MULTIPLE_FRAME_ESTABLISHED。此命令還顯示活動呼叫的數量。
本節提供的資訊可用於對組態進行疑難排解。
輸出直譯器工具(僅供註冊客戶使用)支援某些show命令,此工具可讓您檢視show命令輸出的分析。
注意:發出debug指令之前,請先參閱有關Debug指令的重要資訊。
debug isdn q931 — 顯示ISDN網路連線(第3層)的呼叫建立和斷開。
debug isdn q921 — 顯示路由器和ISDN交換機之間D通道上的資料鏈路層消息(第2層)。如果show isdn status命令不顯示第1層和第2層為up,請使用此調試。
debug dialer [events | packets] -顯示有關撥號器介面上接收的資料包的DDR調試資訊。
debug ppp negotiation — 在協商PPP元件(包括鏈路控制協定(LCP)、身份驗證和NCP時,顯示有關PPP流量和交換的資訊。成功的PPP協商首先開啟LCP狀態,然後進行身份驗證,最後協商NCP。
debug ppp authentication — 顯示PPP身份驗證協定消息,包括質詢身份驗證協定(CHAP)資料包交換和口令身份驗證協定(PAP)交換。
debug ppp error — 顯示與PPP連線協商和操作相關的協定錯誤和錯誤統計資訊。
有關撥號器設定檔疑難排解的詳細資訊,請參閱設定和疑難排解撥號器設定檔
R1(172.22.85.2)對R3(172.22.85.1)執行ping操作並觸發ISDN DDR連線:
R1#debug dialer events Dial on demand events debugging is on R1#ping 172.22.85.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.22.85.1, timeout is 2 seconds: *Mar 1 02:27:06.067: BR0 DDR: rotor dialout [priority] *Mar 1 02:27:06.071: BR0 DDR: Dialing cause ip (s=172.22.85.2, d=172.22.85.1) *Mar 1 02:27:06.075: BR0 DDR: Attempting to dial 6663000 *Mar 1 02:27:06.407: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up !--- R1 initiates the DDR process and uses its first BRI B channel. *Mar 1 02:27:06.411: BR0:1: interface must be fifo queue, force fifo *Mar 1 02:27:06.419: %DIALER-6-BIND: Interface BR0:1 bound to profile Di1 *Mar 1 02:27:06.619: Di1 DDR: Authenticated host R3 with no matching dialer map *Mar 1 02:27:06.691: Di1 DDR: dialer protocol up.!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 36/36/36 ms R1# *Mar 1 02:27:07.611: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up *Mar 1 02:27:12.427: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 6663000 R3 !--- Call timeouts, R1 (172.22.85.2) pings R3 (172.22.85.1) !--- and triggers an ISDN DDR connection. R3#debug ppp negotiation PPP protocol negotiation debugging is on R3#debug ppp authentication PPP authentication debugging is on R3# *Mar 1 02:36:13.015: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up !--- R3 receives an ISDN call from R1 *Mar 1 02:36:13.019: BR0:1 PPP: Treating connection as a callin *Mar 1 02:36:13.019: BR0:1 PPP: Phase is ESTABLISHING, Passive Open [0 sess, 1 load] *Mar 1 02:36:13.019: BR0:1 LCP: State is Listen !--- Incoming configuration request *Mar 1 02:36:13.447: BR0:1 LCP: I CONFREQ [Listen] id 62 len 30 *Mar 1 02:36:13.447: BR0:1 LCP: AuthProto CHAP (0x0305C22305) *Mar 1 02:3:13.447: BR0:1 LCP: MagicNumber 0x60C29964 (0x050660C29964) *Mar 1 02:3:13.447: BR0:1 LCP: MRRU 1524 (0x110405F4) *Mar 1 02:3:13.447: BR0:1 LCP: EndpointDisc 1 R1 (0x130B0156656E75732D484B !--- Outgoing configuration request *Mar 1 02:36 13.451:BR0:1 LCP: O CONFREQ [Listen] id 2 len 32 *Mar 1 02:3:13.451: BR0:1 LCP: AuthProto CHAP (0x0305C22305) *Mar 1 02:3:13.451: BR0:1 LCP: MagicNumber 0x0070D085 (0x05060070D085) *Mar 1 02:3:13.451: BR0:1 LCP: MRRU 1524 (0x110405F4) *Mar 1 02:3:13.451: BR0:1 LCP: EndpointDisc 1 R3 (0x130D014A7570697465722D484B) !--- Outgoing configuration acknowledgment *Mar 1 02:3:13.451: BR0:1 LCP: O CONFACK [Listen] id 62 len 30 *Mar 1 02:3:13.451: BR0:1 LCP: AuthProto CHAP (0x0305C22305) *Mar 1 02:3:13.451: BR0:1 LCP: MagicNumber 0x60C29964 (0x050660C29964) *Mar 1 02:3:13.451: BR0:1 LCP: MRRU 1524 (0x110405F4) *Mar 1 02:3:13.451: BR0:1 LCP: EndpointDisc 1 R1 (0x130B0156656E75732D484B) !--- Incoming configuration acknowledgment *Mar 1 02:36:13.511: BR0:1 LCP: I CONFACK [ACKsent] id 2 len 32 *Mar 1 02:36:13.511: BR0:1 LCP: AuthProto CHAP (0x0305C22305) *Mar 1 02:36:13.511: BR0:1 LCP: MagicNumber 0x0070D085 (0x05060070D085) *Mar 1 02:36:13.511: BR0:1 LCP: MRRU 1524 (0x110405F4) *Mar 1 02:36:13.511: BR0:1 LCP: EndpointDisc 1 R3 (0x130D014A7570697465722D484B) !--- Link Control Protocol is open *Mar 1 02:3:13.511: BR0:1 LCP: State is Open 01:49:36: BR0:1 PPP: Phase is AUTHENTICATING, by both [0 sess, 1 load] *Mar 1 02:3:13.511: BR0:1 CHAP: O CHALLENGE id 2 len 31 from "R3" *Mar 1 02:3:13.515: BR0:1 CHAP: I CHALLENGE id 22 len 29 from "R1" *Mar 1 02:3:13.515: BR0:1 CHAP: Waiting for peer to authenticate first *Mar 1 02:3:13.571: BR0:1 CHAP: I RESPONSE id 2 len 29 from "R1" *Mar 1 02:3:13.575: BR0:1 CHAP: O SUCCESS id 2 len 4 *Mar 1 02:36:13.575:BR0:1 CHAP: Processing saved Challenge, id 22 *Mar 1 02:36:13.575:%DIALER-6-BIND: Interface BR0:1 bound to profile Di0 *Mar 1 02:36:13.575:BR0:1 CHAP: O RESPONSE id 22 len 31 from "R3" *Mar 1 02:36:13.575: BR0:1 CHAP: I SUCCESS id 22 len 4 !--- PPP CHAP Authentication succeeded *Mar 1 02:36:13.607:BR0:1 PPP: Phase is VIRTUALIZED [0 sess, 0 load] *Mar 1 02:36:13.611:Di0 PPP: Phase is UP [0 sess, 0 load] !--- PPP NCP begins *Mar 1 02:36:13.611:Di0 IPCP: O CONFREQ [Closed] id 2 len 10 *Mar 1 02:36:13.611:Di0 IPCP: Address 172.22.85.1 (0x0306AC165501) *Mar 1 02:36:13.611:Di0 CDPCP: O CONFREQ [Closed] id 2 len 4 *Mar 1 02:36:13.626: Di0 MLP: Added first link BR0:1 to bundle R1 *Mar 1 02:36:13.626: Di0 PPP: Treating connection as a callout *Mar 1 02:36:13.626: BR0:1 IPCP: MLP bundle interface is built, process packets now *Mar 1 02:36:13.626: BR0:1 IPCP: Redirect packet to Di0 *Mar 1 02:36:13.627: Di0 IPCP: I CONFREQ [REQsent] id 2 len 10 *Mar 1 02:36:13.627: Di0 IPCP: Address 172.22.85.2 (0x0306AC165502) *Mar 1 02:36:13.631: Di0 IPCP: O CONFACK [REQsent] id 2 len 10 *Mar 1 02:36:13.631: Di0 IPCP: Address 172.22.85.2 (0x0306AC165502) *Mar 1 02:36:13.634: BR0:1 CDPCP: MLP bundle interface is built, process packets now *Mar 1 02:36:13.634: BR0:1 CDPCP: Redirect packet to Di0 *Mar 1 02:36:13.635: Di0 CDPCP: I CONFREQ [REQsent] id 2 len 4 *Mar 1 02:36:13.635: Di0 CDPCP: O CONFACK [REQsent] id 2 len 4 *Mar 1 02:36:13.639: Di0 IPCP: I CONFACK [ACKsent] id 2 len 10 *Mar 1 02:36:13.639: Di0 IPCP: Address 172.22.85.1 (0x0306AC165501) *Mar 1 02:36:13.639: Di0 IPCP: State is Open *Mar 1 02:36:13.639: Di0 CDPCP: I CONFACK [ACKsent] id 2 len 4 *Mar 1 02:36:13.639: Di0 CDPCP: State is Open *Mar 1 02:36:13.643: Di0 IPCP: Install route to 172.22.85.2 *Mar 1 02:36:14.607: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state to up *Mar 1 02:36:19.019: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 6661000 R1
當呼叫仍處於活動狀態時:
R3#show dialer BRI0 - dialer type = ISDN Dial String Successes Failures Last DNIS Last status 0 incoming call(s) have been screened. 0 incoming call(s) rejected for callback. BRI0:1 - dialer type = ISDN Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is data link layer up Interface bound to profile Di0 Current call connected 00:00:47 Connected to 6661000 (R1) !--- Call is connected to interface BRI 1/0: first B channel BRI0:2 - dialer type = ISDN Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is idle Di0 - dialer type = DIALER PROFILE Load threshold for dialing additional calls is 128 Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is data link layer up Number of active calls = 1 (R1) !--- Interface Dialer0 is active and connected to R1. Dial String Successes Failures Last DNIS Last status 6661000 0 0 never - Default Di1 - dialer type = DIALER PROFILE Idle timer (120 secs), Fast idle timer (20 secs) Wait for carrier (30 secs), Re-enable (15 secs) Dialer state is idle Number of active calls = 0 Dial String Successes Failures Last DNIS Last status 6662000 0 0 never - Default
此配置演示如何以每次呼叫為基礎,將稱為撥號程式配置檔案的邏輯實體動態繫結到物理介面。通過使用撥號器配置檔案,網路可以更靈活地連線到遠端位置。此外,您可以使用撥號程式設定檔來更好地利用可用資源。因此,您可以使用撥號配置檔案來克服傳統DDR的許多缺點。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
04-Feb-2010 |
初始版本 |