拨号和接入 : 按需拨号路由 (DDR)

配置路由器,以使用 ISDN BRI 拨号连接多个站点

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

在某些情况下,您会需要配置路由器拨号多个站点。例如,您可能必须要拨通路由器连接到公司网络的某部分,并拨通网络服务提供商(ISP)路由器连接互联网。

本文提交中央路由器访问互联网的配置示例和远程办公室用途综合业务数字网络(ISDN)。远程办公室能也访问中央路由器和互联网到中央路由器。

先决条件

要求

在您继续进行此配置前,请保证您:

  • 验证该ISDN第1层,并且2是UP。欲知更多信息,请参阅使用show isdn status命令关于BRI故障排除

  • 从ISP获取必要信息,例如认证方法,可能是质询握手验证协议(CHAP)或密码认证协议,用户名和密码,编号拨号和拨号接口的IP地址(除非接口使用一个协商得到的地址)。并且,如果NAT是需要的连接多台主机到ISP,请发现。

  • 从远程路由器,请得到关于认证方法、用户名和密码、编号拨号和IP地址的信息。

使用的组件

本文档中的信息基于以下软件和硬件版本:

  • Cisco 803路由器用Cisco IOS 软件版本12.1(11) IP Plus。

    注意: 如果需要配置NAT,请保证您有IP Plus (有“”在IOS文件名)特性组。

  • 思科2501路由器,是远程办公室运行Cisco IOS软件版本12.2(5)。

注意: ISP路由器的配置没有包括。参考一些配置示例的拨号和接入技术支持页

本文档中的信息都是基于特定实验室环境中的设备创建的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您是在真实网络上操作,请确保您在使用任何命令前已经了解其潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

相关产品

此配置可以与有基本速率接口(BRI)接口的所有路由器一起使用。这包括有内置的BRI接口的路由器,例如Cisco 800 (例如, 801, 802, 803, 804)和Cisco1600 (例如, 1603-R和1604-R)系列路由器。它也包括接受BRI广域网接口界面卡的路由器(WIC)或网络模块,类似1600, 1700, 2600和3600系列。欲知关于BRI WIC或网络模块的更多信息,请参见"1600、1700、2600和3600系统路由器广域网接口卡/平台硬件兼容表"。

注意: 请使用show version命令证实您的路由器是否有一个BRI接口。

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 要查找本文档所用命令的其他信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

/image/gif/paws/14562/isdn800_14562.gif

配置

在此配置中,中央路由器被命名为“中央”,远程公司办公室被命名“远程”。

在中央,拨号接口1配置访问互联网。IP地址由ISP动态地分配。NAT用于允许中央LAN、远程LAN和中央远程广域网的IP网络在一个动态分配的IP地址帮助下访问互联网。请与您的ISP联系证实您是否需要NAT。

注意: 我们配置PAP和CHAP,因为这依靠什么ISP配置(然而,只有使用他们中的一个)。

中央
 version 12.1 
  no parser cache 
  service timestamps debug datetime msec 
  service timestamps log datetime msec 
  ! 
  hostname central 
  ! 
  username remote password 0 remote
 
 !--- Username and shared secret password for the router (remote)
  !--- (used for CHAP authentication).
  !--- Shared secret password must be the same on both sides.

  ! 
  isdn switch-type basic-net3
  !  
  ! 
  interface Ethernet0 
   ip address 10.1.0.1 255.255.255.0 
   ip nat inside 

   !--- Ethernet 0 is an inside NAT interface.
   !--- All traffic from this network will be translated.

   no cdp enable 
  ! 
  interface BRI0

   !--- If you have additional BRIs, copy this BRI 0 configuration to the other BRIs.

   no ip address 
   encapsulation ppp 
   dialer pool-member 1

   !--- Assign BRI0 as member of dialer pool 1.
   !--- Dialer pool 1 is specified in interface Dialer 1.

   dialer pool-member 2 

   !--- Assign BRI0 as member of dialer pool 2.
   !--- Dialer pool 2 is specified in interface Dialer 2.

   isdn switch-type basic-net3     

   !--- This depends on the country. 

   no cdp enable 
   ppp authentication chap pap callin

   !--- Permit one-way CHAP and PAP authentication.
   !--- Configure authentication on both the physical and dialer interface.

  ! 
  interface Dialer1 

  !--- Create a dialer interface for every device to which you need to connect.

   description CONNECTION TO INTERNET 
   ip address negotiated 
   
!--- This IP address is obtained from the ISP. If the ISP permits a static
   !--- address, configure that address instead.

   ip nat outside 

   !--- The Outside NAT interface. Because this interface only has one IP address,
   !--- all traffic from the inside network will be Port Address Translated (PAT).

   encapsulation ppp 
   dialer pool 1 

   !--- Dialer profile 1. Remember that interface BRI 0 is a member of this profile.

   dialer remote-name ISP  
   dialer idle-timeout 180 
   dialer string 6122 

   !--- The number used to dial the ISP.

   dialer-group 1 
   
!--- Apply interesting traffic definition from dialer-list 1.

   no cdp enable 
   ppp authentication chap pap callin 
   ppp chap hostname XXXXX   

   !--- XXXXX is the username the ISP expects in order to authenticate this router.
   !--- For more information, refer to the document on ppp chap hostname.

   ppp chap password YYYYY    
  
 !--- YYYYY is the password the ISP expects in order to authenticate this router.

   ppp pap sent-username XXXXX password YYYYY 

   !--- PAP username and password. 
   !--- This is required only if the ISP does not support CHAP.

  ! 
  interface Dialer2 
   description CONNECTION TO REMOTE OFFICE 
   ip address 192.168.17.2 255.255.255.252

   !--- IP address for the connection to the remote office.
   !--- The remote office BRI interface is in the same subnet.

   ip nat inside

   !--- Dialer 2 is an inside NAT interface.
   !--- With this configuration, traffic from remote office is translated
   !--- before it is sent to the ISP.

   encapsulation ppp 
   dialer pool 2 

   !--- Dialer profile 2. Remember that interface BRI 0 is a member of this profile.

   dialer remote-name remote 

   !--- Specifies the remote router name (remote).
   !--- This name must match that used by the remote router to authenticate itself.
   !--- Remember that we configured the router username and password earlier.

   dialer idle-timeout 180 
   dialer string 6121 

   !--- Number used to dial the remote office router.

   dialer-group 1 

   !--- Apply interesting traffic definition from dialer-list 1.

   no cdp enable 
   ppp authentication chap callin 
  ! 
  ip nat inside source list 101 interface Dialer1 overload 

  !--- Establishes dynamic source translation (with PAT) for addresses that are
  !--- identified by the access list 101.

  no ip http server 
  ip classless 
  ip route 0.0.0.0 0.0.0.0 Dialer1 

  !--- Default route. Such traffic will use dialer 1 to the ISP.

  ip route 10.2.0.0 255.255.255.0 Dialer2 

  !--- Route to remote router network. Traffic for 10.2.0.0/24 uses Dialer2.

  ! 
  access-list 101 permit ip 10.1.0.0 0.0.0.255 any 
  access-list 101 permit ip 10.2.0.0 0.0.0.255 any 
  access-list 101 permit ip 192.168.17.0 0.0.0.3 any 
  
!--- Defines an access list that permits the addresses to be translated.
  !--- Note that the Ethernet 0 network, the remote router network and the
  !--- BRI network (between this router and the remote one) will be translated.

  dialer-list 1 protocol ip permit 

  !--- Interesting traffic definition.
  !--- This definition is applied to both connections.
  !--- If you need to define different interesting traffic for each connection,
  !--- create two dialer-lists and apply one to each dialer profile with dialer-group.

  no cdp run 
  ! 
  line con 0 
   exec-timeout 3 0 
  line vty 0 4 
   exec-timeout 3 0 
  ! 
  !  
  end

远程
version 12.2 
  service timestamps debug datetime msec 
  service timestamps log datetime msec 
  ! 
  hostname remote 
  ! 
  username central password 0 remote 

  !--- Username and shared secret password for the router (central)
  !--- (used for CHAP authentication).
  !--- Shared secret must be the same on both sides. 

  ! 
  isdn switch-type basic-net3
  ! 
  interface Ethernet0 
   ip address 10.2.0.1 255.255.255.0 

   !--- Remember that this network is included in the NAT statements on central.

   no cdp enable 
  ! 
  interface BRI0 
    no ip address 
   encapsulation ppp 
   dialer pool-member 1 

   !--- Assign BRI0 as member of dialer pool 1.
   !--- Dialer pool 1 is specified in interface Dialer 1.

   isdn switch-type basic-net3 
   no cdp enable 
   ppp authentication chap 
  ! 
  interface Dialer1 
   ip address 192.168.17.1 255.255.255.252 
   encapsulation ppp 
   dialer pool 1 

   !--- Dialer profile 1. Remember that interface BRI 0 is a member of this profile.  

   dialer remote-name central 

   !--- Specifies the name of the other router (central).
   !--- This name must match that used by the remote router to authenticate itself.
   !--- Remember that we configured the router username and password earlier.

   dialer string 6131

   !--- The number used to dial the central router. 

   dialer-group 1 
   
!--- Apply interesting traffic definition from dialer-list 1.

   pulse-time 0 
   no cdp enable 
   ppp authentication chap callin 
  ! 
  ip classless 
  ip route 0.0.0.0 0.0.0.0 Dialer1 

  !--- Default route. Such traffic will use dialer 1 to the central router.

  no ip http server 
  ! 
  dialer-list 1 protocol ip permit

  !--- All IP traffic is interesting. 

  ! 
  line con 0 
   exec-timeout 3 0 
  line aux 0 
  line vty 0 4 
   exec-timeout 3 0 
  ! 
  end

验证

本部分所提供的信息可用于确认您的配置是否正常工作。

命令输出解释程序工具仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。

  • show isdn active —显示您曾经发出呼叫的ISDN编号,并且指示呼叫是否入站或出站。

  • show caller ip —显示您提供的IP地址的一个主叫信息汇总。

  • show ip interface dialer 1|包括互联网—列出拨号接口的IP信息和状态的摘要。

  • show dialer [interface type number] —显示为按需拨号路由(DDR)配置的接口的一般诊断信息。如果拨号程序适当地过来,此消息出现:

    Dialer state is data link layer up

    如果physical layer up出现,暗示线路通信协议出来,但是网络控制协议(NCP)没有。启动拨号的数据包的源地址和目标地址显示在 dial reason line 中。此show命令也显示计时器的配置和连接超时前的时间。

故障排除

本部分提供的信息可用于对配置进行故障排除。

故障排除命令

命令输出解释程序工具仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。

注意: 在发出 debug 命令之前,请参阅有关 Debug 命令的重要信息

  • debug dialer —显示关于数据包或事件的调试信息在拨号接口。

  • debug isdn q931 —显示关于呼叫建立及拆线的信息ISDN网络连接(在本地路由器(用户端)和网络之间的层3)。

  • debug ppp协商—显示关于点对点协议(PPP)流量的信息并且在PPP组件的协商时交换,并且包括关于链路控制协议(LCP)、验证和NCP的信息。成功的PPP协商将首先开放LCP状态,然后进行验证,最后进行NCP协商。

  • debug ppp authentication —导致debug ppp命令显示认证协议消息,包括CHAP信息包交换和PAP交换。

  • debug ip peer —包含关于对等体的信息。

调试输出

要排除故障配置,请使用这些调试:

   central#debug isdn q931 
   ISDN Q931 packets debugging is on 
   
   central#debug dialer 
   Dial on demand events debugging is on 
   
   central#debug ppp negotiation 
   PPP protocol negotiation debugging is on 
   
   central#debug ppp authentication 
   PPP authentication debugging is on 
   
   central#debug ip peer 
   IP peer address activity debugging is on 

呼叫中央的路由器发起呼叫到互联网:198.133.219.25是在互联网的一个IP地址。

   central#ping 198.133.219.25

   :.!!!! 
   Success rate is 80 percent (4/5), round-trip min/avg/max = 40/41/44 ms 

   *Mar 1 00:06:12.984: BR0 DDR: rotor dialout [priority] 
   *Mar 1 00:06:12.988: BR0 DDR: Dialing cause ip (s=172.17.243.115, 
    d=198.133.219.25)    
   *Mar 1 00:06:12.988: BR0 DDR: Attempting to dial 6122 
   *Mar 1 00:06:12.996: ISDN BR0: TX -> SETUP pd = 8 callref = 0x01 

   !--- central initiates the call to ISDN number 6122. 

   *Mar 1 00:06:13.000: Bearer Capability i = 0x8890 
   *Mar 1 00:06:13.008: Channel ID i = 0x83 
   *Mar 1 00:06:13.008: Called Party Number i = 0x80, '6122', Plan:Unknown,
   Type:Unknown 
   *Mar 1 00:06:13.088: ISDN BR0: RX <- CALL_PROC pd = 8 callref = 0x81 
   *Mar 1 00:06:13.092: Channel ID i = 0x89 
   *Mar 1 00:06:13.244: ISDN BR0: RX <- CONNECT pd = 8 callref = 0x81 

   !--- central receives a connect message : the ISDN B channel is established. 

   *Mar 1 00:06:13.252: ISDN BR0: TX -> CONNECT_ACK pd = 8 callref = 0x01 
   *Mar 1 00:06:13.260: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up 
   *Mar 1 00:06:13.268: BR0:1: interface must be fifo queue, force FIFO 
   *Mar 1 00:06:13.272: %DIALER-6-BIND: Interface BR0:1 bound to profile Di1 
   *Mar 1 00:06:13.280: BR0:1 PPP: Treating connection as a callout 
   *Mar 1 00:06:13.280: BR0:1 PPP: Phase is ESTABLISHING, Active Open 
   *Mar 1 00:06:13.284: BR0:1 PPP: No remote authentication for call-out 
   *Mar 1 00:06:13.284: BR0:1 LCP: O CONFREQ [Closed] id 1 len 10 
   *Mar 1 00:06:13.284: BR0:1 LCP: MagicNumber 0x108130DD (0x0506108130DD) 
   *Mar 1 00:06:13.300: BR0:1 LCP: I CONFREQ [REQsent] id 132 Len 15 
   *Mar 1 00:06:13.300: BR0:1 LCP: AuthProto CHAP (0x0305C22305) 

   !--- The ISP wants to use CHAP authentication. 

   *Mar 1 00:06:13.304: BR0:1 LCP: MagicNumber 0xE4225290 (0x0506E4225290) 
   *Mar 1 00:06:13.304: BR0:1 LCP: O CONFACK [REQsent] id 132 Len 15 
   *Mar 1 00:06:13.308: BR0:1 LCP: AuthProto CHAP (0x0305C22305) 
   *Mar 1 00:06:13.308: BR0:1 LCP: MagicNumber 0xE4225290 (0x0506E4225290) 
   *Mar 1 00:06:13.308: BR0:1 LCP: I CONFACK [ACKsent] id 1 Len 10 
   *Mar 1 00:06:13.312: BR0:1 LCP: MagicNumber 0x108130DD (0x0506108130DD) 
   *Mar 1 00:06:13.312: BR0:1 LCP: State is Open 
   *Mar 1 00:06:13.320: BR0:1 PPP: Phase is AUTHENTICATING, by the peer 
   *Mar 1 00:06:13.328: BR0:1 AUTH: Started process 0 pid 22 
   *Mar 1 00:06:13.328: BR0:1 CHAP: I CHALLENGE id 118 Len 27 from "posets"    
   *Mar 1 00:06:13.332: BR0:1 CHAP: Using alternate hostname XXXXX 
   *Mar 1 00:06:13.332: BR0:1 CHAP: Username posets not found 
   *Mar 1 00:06:13.336: BR0:1 CHAP: Using default password 
   *Mar 1 00:06:13.336: BR0:1 CHAP: O RESPONSE id 118 Len 26 from "XXXXX"    
   *Mar 1 00:06:13.360: BR0:1 CHAP: I SUCCESS id 118 Len 4 
   
!--- central receives a CHAP SUCCESS from ISP. 

   *Mar 1 00:06:13.360: BR0:1 PPP: Phase is UP 
   *Mar 1 00:06:13.364: BR0:1 IPCP: O CONFREQ [Not negotiated] id 1 Len 10 
   *Mar 1 00:06:13.364: BR0:1 IPCP: Address 0.0.0.0 (0x030600000000) 
   *Mar 1 00:06:13.368: BR0:1 IPCP: I CONFREQ [REQsent] id 108 Len 10 
   *Mar 1 00:06:13.368: BR0:1 IPCP: Address 194.183.201.1 (0x0306C2B7C901) 
   *Mar 1 00:06:13.368: BR0:1: IPPOOL: validate address = 194.183.201.1 
   *Mar 1 00:06:13.372: BR0:1 set_ip_peer(3): new address 194.183.201.1 
   *Mar 1 00:06:13.372: BR0:1 IPCP: O CONFACK [REQsent] id 108 Len 10 
   *Mar 1 00:06:13.376: BR0:1 IPCP: Address 194.183.201.1 (0x0306C2B7C901) 
   *Mar 1 00:06:13.380: BR0:1 IPCP: I CONFNAK [ACKsent] id 1 Len 10 
   *Mar 1 00:06:13.380: BR0:1 IPCP: Address 194.183.201.3 (0x0306C2B7C903) 

   !--- 194.183.201.3 is assigned by ISP to dialer 1 of central. 

   *Mar 1 00:06:13.384: BR0:1 IPCP: O CONFREQ [ACKsent] id 2 Len 10 
   *Mar 1 00:06:13.384: BR0:1 IPCP: Address 194.183.201.3 (0x0306C2B7C903) 
   *Mar 1 00:06:13.396: BR0:1 IPCP: I CONFACK [ACKsent] id 2 Len 10 
   *Mar 1 00:06:13.400: BR0:1 IPCP: Address 194.183.201.3 (0x0306C2B7C903) 
   *Mar 1 00:06:13.400: BR0:1 IPCP: State is Open 
   *Mar 1 00:06:13.400: Di1 IPCP: Install negotiated IP interface address
   194.183.201.3 
   *Mar 1 00:06:13.412: BR0:1 DDR: dialer protocol up 
   *Mar 1 00:06:13.416: Di1 IPCP: Install route to 194.183.201.1 
   *Mar 1 00:06:14.360: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1,
   changed state to up 
   *Mar 1 00:06:19.276: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 6122
   unknown

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 14562