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

配置示例:使用浮动静态路由和按需拨号路由

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


目录


简介

本文档的目的在于配置 ISDN 基本速率接口 (BRI),以便在帧中继电路发生逻辑故障时进行拨号并将流量传输到远程站点。

Enhanced Interior Gateway Routing Protocol (EIGRP) 不在 BRI 上运行。相反,本文档中的示例使用浮动静态路由,以便在通过帧中继电路上的 EIGRP 获知的正常路由丢失时,重定向 BRI 上的数据流。

在所有路由器中,确保启用了 ip classless

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档不限于特定的软件和硬件版本。

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

规则

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

配置

这些配置是完整配置的片断。

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

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

网络图

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

图1 – 网络图

/image/gif/paws/10212/bri0-1.gif

配置

本文档使用以下配置:

  • 分布层路由器 #1

  • 分布层路由器 #2

  • 接入层路由器

  • 远程站点路由器

路由器 C194u 是两个分布层路由器之一。在本示例中,路由器 C194u 具有到远程站点的 BRI。另一个分布层路由器 C194n,具有到远程站点的配套串行接口。

分布层路由器 #1
hostname c194u                                                    
!   

!--- Create a username for the router at the remote site. 

username c194s password 7 XXXXXXXX                                            
!                                                                               
ip subnet-zero                                                                  
isdn switch-type basic-dms100                                                   
!                                                                               
interface Loopback0                                                             
 ip address 192.168.11.141 255.255.255.252                                      
!                                                                               
interface Ethernet0                                                             
 ip address 163.241.222.93 255.255.255.0                                        
 media-type 10BaseT                                                             
!                                                                               
interface BRI0                                                                  
 description to Remote Site c194s, (this end 08358662 08358664)                 
 ip address 192.168.11.138 255.255.255.252                                      
 no ip mroute-cache                                                             
 encapsulation ppp                                                              
 no ip route-cache                                                              
 isdn spid1 0835866201                                                          
 isdn spid2 0835866401                                                          
 dialer idle-timeout 600                                                        
 dialer wait-for-carrier-time 10                                                
 dialer map ip 192.168.11.137 name c194s broadcast 8358661                      
 dialer map ip 192.168.11.137 name c194s broadcast 8358663                      
 dialer hold-queue 5                                                            
 dialer load-threshold 128  outbound                                            
 dialer-group 1                                                                 
 no fair-queue                                                                  
 ppp authentication chap                                                        
 ppp multilink                                                                  
!                                                                               
router eigrp 65535

!--- We redistribute the static routes listed below, so if the Frame Relay
!--- network fails, the other routers in this autonomous system (AS) will 
!--- begin to see the remote networks advertised from this router.  
!--- Normally these routes are learned through EIGRP across the Frame Relay link.
!--- Make the BRI interfaces passive. An alternative is to use a dialer-list 
!--- to identify EIGRP packets as "uninteresting" packets. 

redistribute static                                              
 passive-interface BRI0                                           
 network 192.168.11.0                                                           
 network 163.241.0.0                                                            
 default-metric 64 200 255 1 1500                                               
 no auto-summary                                                                
 eigrp log-neighbor-changes                                                     
!                                                                               
ip classless

!--- Both distribution layer routers have a default route to their Null 
!--- interfaces so that they advertise the 0/0 network to all other routers
!--- in the AS. 

ip route 0.0.0.0 0.0.0.0 Null0

!--- There must be a static route for each network behind the C194s 
!--- router at the remote site. Use the IP address of the BRI interface 
!--- of router C194s, and ensure that the administrative distance is 240.
!--- Note: Summarize these routes if your addressing scheme lends itself 
!--- to summarization. If the Frame Relay network fails, this will force 
!--- packets destined to the remote site out the BRI interface, and will cause 
!--- it to dial and restore connectivity.  

ip route 192.168.11.0 255.255.255.224 192.168.11.137 240          
ip route 192.168.11.32 255.255.255.224 192.168.11.137 240         
ip route 192.168.11.64 255.255.255.224 192.168.11.137 240         
ip route 192.168.11.132 255.255.255.252 192.168.11.137 240        
!                                                                               
access-list 100 deny   icmp any any                                             
access-list 100 permit ip any any                                            
dialer-list 1 protocol ip list 100                                              
!                                                                               
end

以下是路由器 C194u 的 show dialer 命令输出示例:

分布层路由器 #1
c194u#show dialer                                                                
                                                                                
BRI0 - dialer type = ISDN

Dial String      Successes   Failures    Last called   Last status
8358663                  4       1311    01:32:08           failed
8358661               1874       1315    00:02:07       successful
0 incoming call(s) have been screened. 
                                                                                
BRI0:1 - dialer type = ISDN
Idle timer (600 secs), Fast idle timer (20 secs)
Wait for carrier (5 secs), Re-enable (15 secs)
Dialer state is physical layer up
Dial reason: ip (s=192.168.11.138, d=192.168.11.137)

下一个路由器 C194n,是第二个分布层路由器,原因如下。在本图示中,它是帧链路路由器。它没有任何特殊配置。它只含有重分配到 EIGRP 的默认路由。

分布层路由器 #2
hostname c194n                                                    
!                                                                                
!                                                                               
interface Ethernet0                                                             
 ip address 163.241.222.98 255.255.255.0                                        
!                                                                               
interface Serial1                                                               
 no ip address                                                                  
 bandwidth 1544                                                                 
 no ip mroute-cache                                                             
 encapsulation frame-relay                                                      
 no fair-queue                                                                  
!                                                                               
interface Serial1.301 point-to-point                                            
 ip address 192.168.11.130 255.255.255.252                                      
 bandwidth 32                                                                   
 frame-relay interface-dlci 301                                                 
!                                                                               
router eigrp 65535                                                              
 redistribute static                                              
 network 192.168.11.0                                                           
 network 163.241.0.0                                                            
 default-metric 64 200 255 1 1500                                               
 no auto-summary                                                                
 eigrp log-neighbor-changes                                                     
!                                                                               
ip classless                                                                    
ip route 0.0.0.0 0.0.0.0 Null0                                    
!

下一个路由器 C194s 是远程站点路由器,即接入层路由器。它通过分布层路由器将远程网络连接到骨干网。

接入层路由器
!                                                                               
hostname c194s                                                    
!

!--- Create a username for the distribution layer router.

username c194u password 7 XXXXXXXXX                                            
!                                                                               
isdn switch-type basic-dms100                                                   
!                                                                               
interface Loopback0                                                             
 ip address 192.168.11.133 255.255.255.252                                      
!                                                                               
interface Ethernet0                                                             
 ip address 192.168.11.2 255.255.255.224                                        
!                                                                               
interface Serial0                                                               
 no ip address                                                                  
 bandwidth 64                                                                   
 encapsulation frame-relay                                                      
!                                                                               
interface Serial0.300 point-to-point                                            
 ip address 192.168.11.129 255.255.255.252                                      
 bandwidth 32                                                                   
 frame-relay interface-dlci 300                                                 
!                                                                               
interface BRI0                                                                  
 description to Hub Site c194u, (this end 08358661 08358663)                    
 ip address 192.168.11.137 255.255.255.252                                      
 no ip mroute-cache                                                             
 encapsulation ppp                                                              
 no ip route-cache                                                              
 isdn spid1 0835866101                                                          
 isdn spid2 0835866301                                                          
 dialer idle-timeout 600                                                        
 dialer wait-for-carrier-time 10                                                
 dialer map ip 192.168.11.138 name c194u broadcast 8358662                      
 dialer map ip 192.168.11.138 name c194u broadcast 8358664                      
 dialer hold-queue 5                                                            
 dialer load-threshold 128                                                      
 dialer-group 1                                                                 
 no fair-queue                                                                  
 ppp multilink                                                                  
 ppp authentication chap                                                        
!                                                                               
router eigrp 65535

!--- Redistribute the static route, so any routers which you could have attached 
!--- to the Ethernet network 192.168.11.0/27 will see this router as their way 
!--- out to the remainder of the network. However, do not allow this default 
!--- route back into your distribution layer routers. Use a distribute list 
!--- to block the advertisement.

redistribute static                                              
 passive-interface BRI0                                           
 network 192.168.11.0                                                           
 default-metric 64 200 255 1 1500
 distribute-list 2 out Serial0.300                                              
 no auto-summary                                                                
 eigrp log-neighbor-changes                                                     
!                                                                               
ip classless

!--- Use the IP address of the BRI interface of the distribution layer router to 
!--- Add a default route. When the frame network goes down, this will 
!--- push your traffic out the BRI interface, and cause it to dial and
!--- restore connectivity. 

ip route 0.0.0.0 0.0.0.0 192.168.11.138 240                       
!                                                                               
access-list 1 permit any                                                        
!           
access-list 2 deny   0.0.0.0
access-list 2 permit any  
!                                                                    
dialer-list 1 protocol ip list 1                                                
!                                                                               
end                                                                             
!

下一个路由器代表远程站点网络。除了参加接入层路由器的IGP动态路由协议、EIGRP,并无任何特殊需求。

远程站点路由器
hostname c194ec                                                   
!                                                                                
!                                                                               
interface Loopback0                                                             
 ip address 192.168.11.65 255.255.255.224                                       
!                                                                               
interface Ethernet0                                                             
 ip address 192.168.11.1 255.255.255.224                                        
!                                                                               
interface Ethernet1                                                             
 ip address 192.168.11.33 255.255.255.224                                       
!                                                                               
!                                                                               
router eigrp 65535                                                              
 network 192.168.11.0                                                           
 default-metric 64 200 255 1 1500                                               
 no auto-summary                                                                
 eigrp log-neighbor-changes                                                     
!                                                                               
ip classless                                                                    
!                                                                               
end

验证

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

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

当帧中继网络发生故障时,请从远程站点的网络尝试 traceroute。根据网络图(请参见图 1),目标 IP 地址是中心站点路由器的环回接口。

c194ec#trace                                                                    
Target IP address: 192.168.11.141 
Source address: 192.168.11.65 
Tracing the route to 192.168.11.141 

  1 192.168.11.2 4 msec 4 msec 4 msec 
  2  *  *  * 
  3  *  *  
    192.168.11.138 24 msec

请注意,它如何需要若干数据包,以便启用 BRI 接口。在 BRI 停用且数据包丢失前,再次发出 traceroute 命令:

c194ec#traceroute 192.168.11.141 

Tracing the route to 192.168.11.141 

  1 192.168.11.2 4 msec 4 msec 4 msec 
  2 192.168.11.138 20 msec *  20 msec 

再次启用帧交换。在帧中继网络当前可用的情况下,请不要使用 ISDN:

c194ec#traceroute 192.168.11.141
Tracing the route to 192.168.11.141 

  1 192.168.11.2 4 msec 4 msec 4 msec 
  2 192.168.11.130 36 msec 36 msec 32 msec 
  3 163.241.222.93 36 msec *  32 msec

可用帧中继网络的路由表如下所示。请注意如何通过中心站点网络的 EIGRP 来获知单独的路由。还有一个通过 EIGRP 获知的默认路由。

c194ec#show ip route  

Gateway of last resort is 192.168.11.2 to network 0.0.0.0 

     163.241.0.0 255.255.255.0 is subnetted, 1 subnets 
D       163.241.222.0 [90/2221056] via 192.168.11.2, 00:02:09, Ethernet0 
     192.168.11.0 is variably subnetted, 7 subnets, 2 masks 
C       192.168.11.64 255.255.255.224 is directly connected, Loopback0 
C       192.168.11.32 255.255.255.224 is directly connected, Ethernet1 
C       192.168.11.0 255.255.255.224 is directly connected, Ethernet0 
D       192.168.11.128 255.255.255.252 
           [90/2195456] via 192.168.11.2, 00:02:13, Ethernet0
D       192.168.11.132 255.255.255.252
           [90/409600] via 192.168.11.2, 01:23:14, Ethernet0 
D       192.168.11.136 255.255.255.252 
           [90/40537600] via 192.168.11.2, 01:23:14, Ethernet0 
D       192.168.11.140 255.255.255.252 
           [90/2349056] via 192.168.11.2, 00:02:10, Ethernet0 
D*EX 0.0.0.0 0.0.0.0 [170/40614400] via 192.168.11.2, 00:02:10, Ethernet

当帧中继网络发生故障时的路由表如下所示。仍然会有一个默认路由,但在中心站点网络的一些单个路由丢失。但是由于启用了 ip classless,并且您拥有默认路由,您仍然可以访问网络中的任何地方。

c194ec#show ip route 

Gateway of last resort is 192.168.11.2 to network 0.0.0.0 

     192.168.11.0 is variably subnetted, 5 subnets, 2 masks 
C       192.168.11.64 255.255.255.224 is directly connected, Loopback0 
C       192.168.11.32 255.255.255.224 is directly connected, Ethernet1 
C       192.168.11.0 255.255.255.224 is directly connected, Ethernet0  
D       192.168.11.132 255.255.255.252 
           [90/409600] via 192.168.11.2, 01:25:27, Ethernet0 
D       192.168.11.136 255.255.255.252
           [90/40537600] via 192.168.11.2, 01:25:27, Ethernet0
D*EX 0.0.0.0 0.0.0.0 [170/40076800] via 192.168.11.2, 00:00:15, Ethernet

故障排除

目前没有针对此配置的故障排除信息。


相关信息


Document ID: 10212